Skip to content

Keep the model picker scrollable in short viewports - #1596

Merged
ymichael merged 2 commits into
get-bb:mainfrom
Juns-g:juns/fix-model-reasoning-menu-scroll
Aug 21, 2026
Merged

ymichael merged 2 commits into
get-bb:mainfrom
Juns-g:juns/fix-model-reasoning-menu-scroll

Conversation

@Juns-g

@Juns-g Juns-g commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • constrain the desktop model picker to the popover available height
  • allow the full menu to scroll so reasoning options remain reachable
  • keep compact drawer sizing unchanged

Tests

  • pnpm exec turbo run test --filter=@bb/app --force
  • pnpm exec turbo run typecheck --filter=@bb/app --force
  • pnpm exec turbo run lint --filter=@bb/app --force
  • pnpm exec turbo run build --filter=@bb/app --force
  • verified at a 1000x400 viewport that wheel scrolling reveals the final reasoning option

AGENT GENERATED: by GPT-5.4

@Juns-g

Juns-g commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Hi @SawyerHood — could you approve the fork workflows and trigger SlopCop for this focused UI fix when convenient? Thanks!

@ymichael ymichael self-assigned this Aug 21, 2026
@ymichael
ymichael force-pushed the juns/fix-model-reasoning-menu-scroll branch from df6637f to 88d6e5c Compare August 21, 2026 18:10
@ymichael
ymichael merged commit d65cea9 into get-bb:main Aug 21, 2026
12 checks passed
SawyerHood added a commit that referenced this pull request Aug 23, 2026
## What was wrong

The desktop model menu held two scroll regions. The popover capped
itself at the Radix available height and scrolled, while the model list
kept its own `shrink-0 max-h-[min(250px, available - 80px)]` scroller
inside it (added in #1596). The 80px constant does not cover the real
chrome: the provider tabs (33px), the search field (37px), the reasoning
rows (189px), the fast-mode toggle (34px) and the dividers add up to
~295px. So in a short viewport the model list held its full height, the
reasoning rows sat below the fold, and the wheel or touch gesture that
started over the models was captured by the inner scroller instead of
the popover. A user reported that the reasoning options at the bottom
were unreachable after zooming in.

Measured on `main` at a 1000x520 viewport: the popover was 341px tall
with 536px of content, and the reasoning section ended at y=681 — 161px
below the viewport.

## What changed

`apps/app/src/components/pickers/ModelReasoningPicker.tsx` gives the
desktop menu a single scroll region.

- The popover is now `overflow-hidden` and pins the provider tabs and
the search field (`shrink-0`).
- A new body element under `MenuHoverProvider` owns `min-h-0 flex-1
overflow-y-auto overscroll-contain`, so the model rows, the reasoning
rows, the fast-mode toggle and the footer action scroll together.
- The model list drops its desktop cap and its own scroller. Its sticky
"Model" and "Reasoning" section labels now stick to the shared region.
- The compact drawer path keeps its previous markup, so mobile behavior
is unchanged.

Trade-off: on a tall viewport with a very long list (for example during
a search), the reasoning rows are no longer pinned below a 250px model
scroller. One predictable scroll region is worth more than a pin that
only held while the menu fit anyway.

No wire or CLI surface changed.

## How you verified

Browser checks through the doobie CLI against the dev app, Codex
provider (8 models, 6 reasoning levels):

| Viewport | Before | After |
| --- | --- | --- |
| 1000x520 | 1 overflowing scroll region, but the reasoning section
ended 161px below the fold and the provider tabs and search field
scrolled away with the rows | 1 scroll region; tabs and search stay
pinned and one wheel gesture reveals every reasoning row and Fast mode |
| 1000x400 | 2 nested scroll regions (popover 436/219, model list
241/141); the gesture over the models was consumed by the inner list
before the popover moved, and the whole reasoning section started
off-screen | 1 scroll region; clicking "Ultra" commits the level (the
trigger reads `5.6-Sol Ultra`) |
| 1000x900 | no scroller | no scroller, menu unchanged |
| 500x800 (compact) | drawer | drawer unchanged |

Also confirmed the search field stays pinned during a search and that
arrow-key navigation still scrolls the highlighted row into view at
1000x400.

Tests: replaced the picker's desktop scroll test with `scrolls the
desktop models and reasoning rows as one region`, which asserts exactly
one scroll region and that it contains both the models listbox and the
reasoning rows. It fails on the previous code (`expected [ …(2) ] to
have a length of 1 but got 2`) and passes now.

Commands:

- `pnpm exec turbo run typecheck --filter=@bb/app`
- `pnpm exec turbo run lint --filter=@bb/app`
- `pnpm exec turbo run test --filter=@bb/app` (422 files, 3288 tests
passed)
- `pnpm exec turbo run build --filter=@bb/app`

Reported by a user over DM; no GitHub issue was open for it.

> AGENT GENERATED
@Juns-g
Juns-g deleted the juns/fix-model-reasoning-menu-scroll branch November 25, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants