diff --git a/packages/ui/src/components/model-picker/ModelPickerList.tsx b/packages/ui/src/components/model-picker/ModelPickerList.tsx index 3b778c36..132f8fa2 100644 --- a/packages/ui/src/components/model-picker/ModelPickerList.tsx +++ b/packages/ui/src/components/model-picker/ModelPickerList.tsx @@ -288,9 +288,9 @@ const SortableProviderSection: React.FC<{ }; const STICKY_HEADER_OFFSET = 32; -const STICKY_FADE_MAX_SIZE = 48; -const STICKY_FADE_MIN_SIZE = 32; -const STICKY_FADE_CLEAR_MAX_SIZE = 24; +const STICKY_FADE_MAX_SIZE = 52; +const STICKY_FADE_MIN_SIZE = 36; +const STICKY_FADE_CLEAR_MAX_SIZE = 28; const scrollIntoView = (container: HTMLElement | null, node: HTMLElement | null) => { if (!node) return; @@ -420,8 +420,8 @@ export const ModelPickerList: React.FC = ({ const selectionStore = selectionStoreRef.current; const itemRefs = React.useRef<(HTMLDivElement | null)[]>([]); const scrollRef = React.useRef(null); - const sectionHeaderSentinelRefs = React.useRef>(new Map()); const stickyFadeSizeRef = React.useRef(0); + const sectionHeaderSentinelRefs = React.useRef>(new Map()); const [stuckSectionHeaders, setStuckSectionHeaders] = React.useState>(new Set()); const keyboardOwnsSelectionRef = React.useRef(false); const lastMousePositionRef = React.useRef<{ x: number; y: number } | null>(null); @@ -882,8 +882,8 @@ export const ModelPickerList: React.FC = ({ & { scrollShadowSize?: number; /** Suppress the top fade (e.g. when sticky headers sit at the top edge). */ hideTopScrollShadow?: boolean; + /** Suppress the bottom fade while retaining scroll-state tracking. */ + hideBottomScrollShadow?: boolean; userIntentOnly?: boolean; /** Forwarded to the inner element (e.g. textarea). */ disabled?: boolean; @@ -40,6 +42,7 @@ export const ScrollableOverlay = React.forwardRef { @@ -61,6 +64,7 @@ export const ScrollableOverlay = React.forwardRef} size={scrollShadowSize} hideTopShadow={hideTopScrollShadow} + hideBottomShadow={hideBottomScrollShadow} className={cn( "overlay-scrollbar-target overlay-scrollbar-container", preventOverscroll && "overscroll-none",