Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/code-session-rail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export function CodeSessionRail({
onExpand,
}: CodeSessionRailProps) {
const groups = groupCodeRailSessions(sessions);
const openRailClassName = onExpand ? "py-2" : "overflow-y-auto py-2";
const newButton = open && onNewSession ? (
<div className="px-2 pb-1">
<button
Expand Down Expand Up @@ -93,7 +94,7 @@ export function CodeSessionRail({
return (
<nav
aria-label="Coding sessions"
className={`flex h-full min-h-0 flex-col ${open ? "overflow-y-auto py-2" : "items-center gap-1"}`}
className={`flex h-full min-h-0 flex-col ${open ? openRailClassName : "items-center gap-1"}`}
>
{newButton}
{groups.map((group) => (
Expand Down
10 changes: 10 additions & 0 deletions src/components/code-surface-mode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,16 @@ assert.match(
/onClick=\{\(\) => \{\s*onExpand\?\.\(\);\s*onSelect\(row\.id\);/,
"collapsed session buttons expand before selection",
);
assert.match(
rail,
/const openRailClassName = onExpand \? "py-2" : "overflow-y-auto py-2";/,
"SurfaceRail-hosted sessions defer scrolling to the shared rail while the narrow standalone list remains scrollable",
);
assert.match(
rail,
/open \? openRailClassName : "items-center gap-1"/,
"the session navigation applies the layout-specific open-state scrolling contract",
);

assert.match(
composer,
Expand Down
Loading