Skip to content

Commit f0df398

Browse files
sestinjcursoragent
andauthored
fix(gui): remove awkward inner scroll on onboarding API-key card (#12802)
* fix(gui): remove awkward inner scroll on onboarding API-key card 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> * fix(gui): remove empty onboarding route scroll trap Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d3f60ba commit f0df398

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

gui/src/pages/gui/Chat.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export function Chat() {
386386

387387
<StepsDiv
388388
ref={stepsDivRef}
389-
className={`overflow-y-scroll pt-[8px] ${showScrollbar ? "thin-scrollbar" : "no-scrollbar"} ${history.length > 0 ? "flex-1" : ""}`}
389+
className={`pt-[8px] ${showScrollbar ? "thin-scrollbar" : "no-scrollbar"} ${history.length > 0 ? "min-h-0 flex-1 overflow-y-scroll" : "shrink-0"}`}
390390
>
391391
<DeprecationBanner dismissable={true} />
392392
{highlights}
@@ -411,7 +411,7 @@ export function Chat() {
411411
</div>
412412
))}
413413
</StepsDiv>
414-
<div className={"relative"}>
414+
<div className={"relative shrink-0"}>
415415
<ContinueInputBox
416416
isMainInput
417417
isLastUserInput={false}

gui/src/pages/gui/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { Chat } from "./Chat";
33

44
export default function GUI() {
55
return (
6-
<div className="flex w-screen flex-row overflow-hidden">
7-
<aside className="4xl:flex border-vsc-input-border no-scrollbar hidden w-96 overflow-y-auto border-0 border-r border-solid">
6+
<div className="flex min-h-0 w-screen flex-row overflow-x-hidden">
7+
<aside className="4xl:flex border-vsc-input-border no-scrollbar hidden min-h-0 w-96 overflow-y-auto border-0 border-r border-solid">
88
<History />
99
</aside>
10-
<main className="no-scrollbar flex flex-1 flex-col overflow-y-auto">
10+
<main className="no-scrollbar flex min-h-0 flex-1 flex-col">
1111
<Chat />
1212
</main>
1313
</div>

0 commit comments

Comments
 (0)