Skip to content

Commit 6f0d0f0

Browse files
committed
feat(frontend): render the overlay scrollbar in the config panel
Wires OverlayScrollbar into the playground config pane: the pane becomes the positioned hover group, and the thumb is rendered as a sibling of the scroller so it floats over the content.
1 parent 79e26d8 commit 6f0d0f0

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • web/oss/src/components/Playground/Components/MainLayout

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import AgentChatSkeleton from "@/oss/components/AgentChatSlice/components/AgentC
2121
import {chatPanelMaximizedAtom} from "@/oss/components/AgentChatSlice/state/panelLayout"
2222
// Direct file import — the SessionInspector barrel would statically pull the (dynamic,
2323
// open-on-demand) inspector drawer back into this chunk.
24+
import OverlayScrollbar from "@/oss/components/OverlayScrollbar"
2425
import PanelSessionInspectorButton from "@/oss/components/SessionInspector/PanelSessionInspectorButton"
2526
import {routerAppIdAtom} from "@/oss/state/app/selectors/app"
2627
import {playgroundEarlyAgentStateAtom} from "@/oss/state/workflow"
@@ -268,7 +269,7 @@ const PlaygroundMainView = ({
268269
const animateSplit = justToggled || holdAnimate
269270

270271
const variantRefs = useRef<(HTMLDivElement | null)[]>([])
271-
const {setConfigPanelRef, setGenerationPanelRef} = usePlaygroundScrollSync({
272+
const {configPanelRef, setConfigPanelRef, setGenerationPanelRef} = usePlaygroundScrollSync({
272273
enabled: isComparisonView,
273274
})
274275

@@ -375,7 +376,7 @@ const PlaygroundMainView = ({
375376
The notice lives OUTSIDE the scroller, so it sits at the pane's bottom
376377
edge regardless of content height or scroll position. */}
377378
<div
378-
className={clsx("flex h-full min-h-0 w-full flex-col", {
379+
className={clsx("group relative flex h-full min-h-0 w-full flex-col", {
379380
// Config = the raised authoring surface (covers the notice too).
380381
"ag-panel-raised": isAgentConfig,
381382
})}
@@ -437,6 +438,9 @@ const PlaygroundMainView = ({
437438
)}
438439
</>
439440
</section>
441+
{!isComparisonView ? (
442+
<OverlayScrollbar target={configPanelRef} />
443+
) : null}
440444
{!isComparisonView && isAgentConfig && primaryConfigId ? (
441445
<AgentCommitNotice revisionId={primaryConfigId} />
442446
) : null}

0 commit comments

Comments
 (0)