Repository navigation
Description
Description
In the desktop UI, the agent select in the composer footer opens upward (placement="top-start"). When more agents are configured than fit between the footer and the top of the window, the menu is not clamped to the window height: it renders past the top edge and is clipped by the app window instead of being scrollable. The agents above the cut are unreachable — there is no scrollbar, the mouse wheel / trackpad does not scroll the list, and keyboard navigation does not move the view either.
This makes a large share of configured agents impossible to select.
Steps to reproduce
- Configure many agents (I have 31 project agents plus the built-ins; with roughly 15+ the list already overflows).
- Open any session.
- Click the agent selector at the bottom left of the composer (shows the current agent, e.g. "Shared-Lead").
- The dropdown opens upward and the list extends past the top of the window; the items above the cut are clipped by the app frame and cannot be reached.
Expected behaviour: the list is clamped to the available height and scrolls (like the model/provider select lists do), with the currently selected agent scrolled into view when opened.
Environment
- UI: OpenCode Desktop
1.18.34(macOS 27.0.0, arm64) - Also verified as still present on the latest release
v1.18.35and on thedevbranch source - OS: macOS 27.0.0 (arm64)
Root cause (verified in the shipped bundle and current source)
- The composer agent/model/variant select is
ComposerEditorSelectinpackages/app/src/composer/editor/editor.tsx(shipped asPromptInputV2Select→MenuV2in 1.18.34). It rendersMenuwithgutter={6} modal={false} placement="top-start"and no height constraint onMenu.Content. [data-component="menu-v2-content"]inpackages/ui/src/navigation/menu/menu.cssdeclares nomax-heightand nooverflow-y, so the floating surface grows unbounded.- corvu's popper only applies
maxWidth/maxHeightwhenfitViewportis enabled, and its default isfitViewport: false. - Contrast with
select-v2-content, whose listbox hasmax-height: 12rem; overflow-y: auto— select-style lists scroll correctly, menu-style lists (agent, model, variant, command menus) do not.
Suggested fix
Give menu-style floating surfaces a viewport clamp, e.g.:
- pass
fitViewportfor the composer selects, and/or - add
max-height: var(--kb-popper-content-available-height)plusoverflow-y: autoto[data-component="menu-v2-content"], and - scroll the selected item into view when the menu opens.
Related
- Agent list scrolling issue in OpenCode build button #46987 "Agent list scrolling issue in OpenCode build button" — same root cause (no
max-height/ scroll container on an overflowing list) - Web UI status popover: MCP/plugin list cannot be scrolled (no max-height) #43668 Web UI status popover list (MCP/plugins) cannot be scrolled — same root cause
- [BUG] Adding provider. Cant scroll down to select others providers #41726 Provider selection list cannot be scrolled down
- desktop: Models/Providers dialogs cannot be scrolled (mouse wheel and arrow keys dead, no scrollbar) #50175 desktop: Models/Providers dialogs cannot be scrolled (mouse wheel and arrow keys dead, no scrollbar)
Note: the screenshot was intentionally not attached, per the reporting guidelines — the description above contains the details needed to reproduce.
Activity
opencode-agent commentedon Oct 10, 2026
Thanks for the detailed report. You reported this on v1 (1.18.34), but v2 has the same problem, so I reproduced it there.
Setup: a project with 31 primary agents in
.opencode/agent/, the v2 web UI (same app code as desktop) in a 600px-tall window. In a new session I clicked Choose agent in the composer.Result: the menu opens upward to 928px tall, with its top 547px above the window. 20 of the 33 agents are cut off. The menu has no max-height and doesn't scroll with the wheel. This happens on 2.0.26 and still happens on the latest
dev(7b3d4ce). The relevant code is the composer select'sMenu(placement="top-start", no height limit) andmenu-v2-contentinmenu.css(nomax-height, nooverflow-y), as you found.On v2, the agent selector only appeared after I turned on Settings → General → "Show custom agents".
The recording and screenshot below show the clipped menu, and the script below reproduces it with Playwright.
Related: #46987 (same symptom, on v1), #48789 (model selector should fit the screen), #50175, #41726, #43668.
recording.mp4
Reproduction script (repro-web.ts)
Run it:
bun repro-web.tsargszero commentedon Oct 10, 2026
I'd like to work on this.
Confirmed against current
dev.[data-component="menu-v2-content"]inpackages/ui/src/navigation/menu/menu.cssdeclares neithermax-heightnoroverflow-y, and the composer agent select (ComposerEditorSelect,packages/app/src/composer/editor/editor.tsx) renders<Menu.Content>with no height constraint, so the floating surface grows unbounded.Two findings that make this smaller than it looks:
--kb-popper-content-available-heightonto the popper positioner unconditionally (@kobalte/core/src/popper/popper-root.tsx, set before thefitViewportbranch), so the clamp does not depend on enablingfitViewport.menu-v2-content:packages/app/src/settings/settings.cssgives.settings-mobile-menu[data-component="menu-v2-content"]amax-height: var(--kb-popper-content-available-height)plusoverflow-y: auto.Plan: add the viewport clamp and
overflow-y: autoto the shared menu content rule so every menu-style surface scrolls like the select lists already do, then add a geometry regression case to the composer keeper suite (packages/app/e2e/regression/composer.spec.ts) asserting the menu stays inside the viewport and its content is reachable by scrolling. I'll look at scrolling the selected item into view on open as a follow-up in the same PR if it stays small.Happy to take a different shape if you'd rather keep the change scoped to the composer rather than the shared rule.
ehealthwares commentedon Oct 10, 2026
Fix submitted in #54391 (
fix(ui): clamp menu content to available height so long lists scroll). It clamps[data-component="menu-v2-content"]to the height corvu's popper already publishes as--kb-popper-content-available-heightand makes the surface scrollable, so the agent/model/variant selects (and other menu surfaces) stay reachable when the list is taller than the window. Includes aLongListStorybook fixture with 32 agents to reproduce.fix(ui): let standard menu appearance scroll as well as compact
argszero commentedon Oct 10, 2026
Standing down on this one — #54391 (
fix(ui): clamp menu content to available height so long lists scroll) covers it, and it covers it better than my plan did.For the record, what I had confirmed independently before opening it into a conflict:
--kb-popper-content-available-heightis published unconditionally on the floating element by Kobalte's popper root (@kobalte/core/src/popper/popper-root.tsx, set just before thefitViewportbranch), so the clamp does not depend on enablingfitViewport— which matches what fix(ui): clamp menu content to available height so long lists scroll #54391 relies on. (The issue text and the PR body both say "corvu's popper"; the publisher is Kobalte, and thekb-prefix is the tell. Worth correcting in the comment so the next reader looks in the right place — it changes nothing about the fix.)[data-component="menu-v2-content"]inpackages/ui/src/navigation/menu/menu.cssdeclares neithermax-heightnoroverflow-y, while the select listbox caps at12remwithoverflow-y: auto— so the contrast in the report is real.packages/app/src/settings/settings.cssalready applies exactly this pattern to amenu-v2-content(.settings-mobile-menu), so this is following an existing convention rather than inventing one.The part I had missed, and #54391 caught, is
[data-appearance="standard"]'soverflow: hidden— that declaration wins over a newoverflow-yat equal specificity, so a vertical-only clamp silently does nothing for standard menus. Narrowing it tooverflow-x: hiddenis the right call.No competing patch from me. Thanks for picking it up.