Skip to content

Commit 6bc0a1c

Browse files
committed
fix(frontend): let the configuration header reach the panel edge
Reserving a scrollbar gutter kept the sticky headers short by the scrollbar's width, and the earlier attempt to stretch them across it did not work: the browser clips painting at the content box, so the notch stayed. The config panel now reserves nothing and shows no scrollbar, so its headers span the panel edge to edge and the layout never shifts. The panel still scrolls with the wheel and its section headers still pin.
1 parent 1012e48 commit 6bc0a1c

3 files changed

Lines changed: 13 additions & 43 deletions

File tree

web/oss/src/components/Playground/Components/MainLayout/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {chatPanelMaximizedAtom} from "@/oss/components/AgentChatSlice/state/pane
2222
// Direct file import — the SessionInspector barrel would statically pull the (dynamic,
2323
// open-on-demand) inspector drawer back into this chunk.
2424
import PanelSessionInspectorButton from "@/oss/components/SessionInspector/PanelSessionInspectorButton"
25-
import {useScrollbarGutterVar} from "@/oss/hooks/useScrollbarGutterVar"
2625
import {routerAppIdAtom} from "@/oss/state/app/selectors/app"
2726
import {playgroundEarlyAgentStateAtom} from "@/oss/state/workflow"
2827

@@ -269,10 +268,9 @@ const PlaygroundMainView = ({
269268
const animateSplit = justToggled || holdAnimate
270269

271270
const variantRefs = useRef<(HTMLDivElement | null)[]>([])
272-
const {configPanelRef, setConfigPanelRef, setGenerationPanelRef} = usePlaygroundScrollSync({
271+
const {setConfigPanelRef, setGenerationPanelRef} = usePlaygroundScrollSync({
273272
enabled: isComparisonView,
274273
})
275-
useScrollbarGutterVar(configPanelRef)
276274

277275
const handleAddRunnable = useCallback(async () => {
278276
const selection = await openEntitySelector({
@@ -386,7 +384,7 @@ const PlaygroundMainView = ({
386384
ref={setConfigPanelRef}
387385
className={clsx([
388386
{
389-
"ag-scroll-quiet ag-scroll-bleed grow w-full min-h-0 overflow-y-auto":
387+
"ag-scroll-no-bar grow w-full min-h-0 overflow-y-auto":
390388
!isComparisonView,
391389
"grow w-full min-h-0 overflow-x-auto flex [&::-webkit-scrollbar]:w-0":
392390
isComparisonView,

web/oss/src/hooks/useScrollbarGutterVar.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

web/oss/src/styles/globals.css

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -937,16 +937,15 @@ body {
937937
background-color: var(--ag-scroll-thumb-hover);
938938
}
939939

940-
/* Full-bleed rows inside a quiet scroller. Sticky headers must span the panel edge to edge,
941-
but the reserved gutter cuts them short, so let the scroller's children stretch across it
942-
and have the thumb overlay them. The gutter width is measured (it is platform-dependent,
943-
and zero on overlay-scrollbar systems) and published as --ag-scroll-gutter by
944-
useScrollbarGutterVar. */
945-
.ag-scroll-bleed {
946-
overflow-x: hidden;
947-
}
948-
949-
.ag-scroll-bleed > * {
950-
width: calc(100% + var(--ag-scroll-gutter, 0px));
951-
margin-inline-end: calc(-1 * var(--ag-scroll-gutter, 0px));
940+
/* Scrollers whose sticky headers have to reach the panel edge. A reserved gutter would cut
941+
every header short by the scrollbar's width, and the content box is the only place the
942+
browser will paint, so this panel keeps no scrollbar at all: full-width rows, and no shift
943+
when the content grows past the viewport. */
944+
.ag-scroll-no-bar {
945+
scrollbar-width: none;
946+
}
947+
948+
.ag-scroll-no-bar::-webkit-scrollbar {
949+
width: 0;
950+
height: 0;
952951
}

0 commit comments

Comments
 (0)