Skip to content

fix(gui): remove awkward inner scroll on onboarding API-key card#12802

Merged
sestinj merged 2 commits into
mainfrom
fix/onboarding-card-scroll-v2
Jun 18, 2026
Merged

fix(gui): remove awkward inner scroll on onboarding API-key card#12802
sestinj merged 2 commits into
mainfrom
fix/onboarding-card-scroll-v2

Conversation

@sestinj

@sestinj sestinj commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Problem

When the Continue side panel first opens with no models configured, the API-key onboarding card is trapped in an awkward, cramped inner scroll area with its own scrollbar instead of laying out naturally in the panel.

Root cause

In the empty chat state (gui/src/pages/gui/Chat.tsx):

  • main (in gui/src/pages/gui/index.tsx) is a fixed-height (100vh, via Layout's GridDiv) flex flex-col overflow-y-auto scroll container.
  • Its children — the StepsDiv (holding the deprecation banner) and the relative section (main input + onboarding card) — were left with the default flex-shrink: 1.
  • StepsDiv also had an always-on overflow-y-scroll.

So once the banner + input + onboarding card exceeded the panel height, the flex children were squeezed and StepsDiv's overflow-y-scroll became a nested, cramped scrollbox — confining the onboarding card to a small inner scroll area.

Fix

gui/src/pages/gui/Chat.tsx (2 lines):

  • Apply overflow-y-scroll to StepsDiv only when there is chat history (i.e. when it is flex-1); in the empty state make it shrink-0.
  • Mark the input/onboarding relative section shrink-0.

This keeps the onboarding card at its natural height and lets the whole panel scroll as one (normal panel scroll), with no cramped inner box. The chat layout (history present) is unchanged: StepsDiv is still flex-1 overflow-y-scroll and the input is still pinned at the bottom.

Before / after

Before After
Empty state, short panel banner clipped, card crammed into a small inner scroll area with its own scrollbar banner fully visible, card flows at natural size, single natural panel scroll

Verification

  • cd gui && NODE_OPTIONS="--max-old-space-size=4096" npm run build → exits 0 (tsc + vite).
  • eslint on the changed file → clean.
  • vitest run src/pages/gui/chat-tests/Chat.test.tsx → 3/3 pass.
  • Layout behavior validated with a standalone HTML reproduction of the exact nesting chain rendered in headless Chrome (before = cramped/clipped, after = natural flow).

⚠️ This is a visual change — please verify in the VS Code Extension Development Host (F5) with no models configured.

Made with Cursor

In the empty chat state, `main` is a fixed-height (100vh) flex scroll
container. Its children (the StepsDiv banner area and the input/onboarding
section) were allowed to flex-shrink, and StepsDiv's always-on
`overflow-y-scroll` turned into a cramped nested scrollbox. This trapped
the onboarding API-key card in a small inner scroll area instead of
letting it lay out naturally.

Only enable StepsDiv's overflow scroll when there is chat history (when it
is `flex-1`), and mark both the empty-state StepsDiv and the input section
`shrink-0` so the onboarding card keeps its natural height and the panel
scrolls as one. Chat layout (history present) is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sestinj
sestinj requested a review from a team as a code owner June 18, 2026 20:54
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 18, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

Co-authored-by: Cursor <cursoragent@cursor.com>
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jun 18, 2026
@sestinj
sestinj merged commit f0df398 into main Jun 18, 2026
45 of 53 checks passed
@sestinj
sestinj deleted the fix/onboarding-card-scroll-v2 branch June 18, 2026 23:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant