diff --git a/src/apps/officer-web/Screens/Dashboard/Layout/Spotlight/Spotlight.tsx b/src/apps/officer-web/Screens/Dashboard/Layout/Spotlight/Spotlight.tsx index 561da96f..36a3fff3 100644 --- a/src/apps/officer-web/Screens/Dashboard/Layout/Spotlight/Spotlight.tsx +++ b/src/apps/officer-web/Screens/Dashboard/Layout/Spotlight/Spotlight.tsx @@ -25,7 +25,18 @@ import { useSpotlightItems, type SpotlightItem } from './useSpotlightItems'; // // Escape closes, arrows move, enter goes. The mouse works, but nothing here is designed around it. -const MAX_RESULTS = 8; +/* + No cap, deliberately, and it used to be 8. + + Eight was fine on the machine it was written on, which has few plugins. On a populated server the dock + carries fourteen plugin tiles and the core items alone fill all eight slots — so with an empty query the + list stopped at Browser and every plugin was unreachable unless you already knew its name well enough to + type it. A launcher you can only use for things you can already name is not doing the job. + + The container has scrolled since it was written (`max-h-[52vh] overflow-y-auto`), so there was never a + layout reason for the limit, and the truncation was silent — nothing said "and 20 more", which is how a + cap becomes indistinguishable from a missing feature. +*/ /** * Is the user typing into something? @@ -71,8 +82,15 @@ const Row = ({ onPick: () => void; }) => { const Icon = item.icon; + // Keyboard navigation has to survive a list taller than the box. `block: 'nearest'` scrolls only when the + // row is actually out of sight, so arrowing through the visible middle of the list does not jump it. + const ref = useRef(null); + useEffect(() => { + if (active) ref.current?.scrollIntoView({ block: 'nearest' }); + }, [active]); return (