Skip to content

feat(chat): let the board-view sidebar grow past 1400px on wide windows - #14870

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
jeeshofone:fix/14853-sidebar-max-window
Oct 6, 2026
Merged

bolichen97 merged 1 commit into
kirodotdev:mainfrom
jeeshofone:fix/14853-sidebar-max-window

Conversation

@jeeshofone

@jeeshofone jeeshofone commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: In board view on a wide window the session sidebar can be dragged wider than 1400 px, as far as the window allows while the chat pane keeps its minimum width. The list views (tree, flat, conductor) keep the 1400 px ceiling, since a session list gains nothing from a wider sidebar. A width saved in board view is a saved preference like any other: list view paints it at 1400, board view paints it again, and a narrower window paints it as wide as that window allows and leaves it saved. Main already treats the stored width this way (ChatPage: "clamp for render but leave the preference for the wide viewport"); this branch keeps that rule for widths above 1400, which main never had to store. That makes the stored width and the painted width two separate values, and a saved width wider than the current view or window survives a drag or nudge that ends where it started. The Opus 5 review blocked on resize.ts:98 on head 2af8364 for exactly that: a nudge that changed nothing replaced the wider saved width with the painted one, so keeping the two values apart is what stops this branch shipping that regression.

One paint rule holds on both sides of 1400 in board view: every painted width is held to the room beside the nav rail and a minimum chat pane, so on a 1200 px window a saved 1400 and a saved 1401 paint at the same width and the chat pane keeps its 320 px minimum. Without it, a saved 1400 painted as stored while a saved 1401 was held to the room, so the width jumped at the 1400 boundary and a board drag to 1400 squeezed the chat pane below its minimum. This also removes the narrow-window overhang tracked in #16094. It changes one pinned geometry on purpose: the board-column Playwright specs (session-tags-folders, session-tags-e2e) prime a stored 1400 on an 1800 px viewport, and main's clampSidebarWidth test pinned that the drawer stays 1400 there, because reserving the chat pane in the clamp alone once made the drawer 1244 px around a 1400 px root and broke both specs. On this branch the root and the drawer both paint 1800 - 236 - 320 = 1244 px, so they agree, and the new board-column e2e geometry test in clampSidebarWidth.test.ts pins that pair. Both specs ran and passed at that paint in the E2E job on head 8a794f4 (job; the harness allows no skipped spec).

A switch between list and board view repaints the root at once, as main's board auto-widen and its restore already do.

SIDEBAR_MAX = 1400 in website/src/pages/chat/sidebarWidth.ts is an absolute ceiling. The pointer drag and the arrow-key nudge both clamp to it, and every stored-width reader throws away a saved value above it. On a 3440 px window a board view's lanes stop at 1400 px, about 40% of the window, and at 5120 px at about 27%, although clampSidebarWidth and panelReserve could seat a much wider sidebar beside a CHAT_PANE_MIN_W chat pane.

Why it matters

On ultra-wide monitors most of the window goes to a single transcript while the board view's lanes stay cramped, and there is no setting that lifts the sidebar ceiling. Settings > Chat > Content Width > Full only widens the transcript.

Not a goal

  • A wider list view. Past 1400 px a session list has nothing to put in the extra width, so the list views keep SIDEBAR_MAX as their ceiling and paint a wider saved width at 1400.
  • Changing how notices (notification banner, computer-use live view, artifact comment errors) stack against the app-root dialogs. Main paints those dialogs above them at any sidebar width.
  • Changing the board view's automatic widening (boardSidebarWidth keeps its SIDEBAR_MAX ceiling; the user can drag the board wider by hand).
  • A new setting, percentage or constant for the sidebar maximum.
  • A chat-pane reserve in the list views, and an edge fade on the board's lane strip. Both were in earlier heads of this PR and moved to the follow-up feat(chat): reserve the chat pane in every view and cue clipped board lanes #17136 so each can be judged on its own. Here the list views reserve only the nav rail, as the drawer's own clamp does on main.

Screenshots / video

Each image is described in the sentence above it. Images 1 and 4 are from a headless Chromium against an isolated gateway built from the named code. Images 2, 3, 6 and 7 were captured on head dcf4b26, whose paint for these states this head keeps, from the repo's isolated ChatPage capture entry (the real ChatPage and ChatSidebar, six fixture sessions, a fixture transcript and, for board view, three fixture lanes that each match every fixture session; API answered by fixtures, served by the website's vite dev server on 127.0.0.1); the 236 px column on their left is a blank stand-in for the nav rail, the width the app reserves for it. No dialog or scrim is open in any frame (checked in the capture script before each shot).

  1. Before (origin/main), 3440 px window, sidebar dragged to its maximum: the drag stops at 1400 px.

Before, 3440 px: sidebar stops at 1400 px

  1. After, list view, 3440 px window, the same drag (handle dragged 5000 px right): the sidebar stops at 1400 px (mc-sidebar-width 1400, aria-valuemax 1400), as on main. The list views gain nothing from more width, so their ceiling is unchanged.

After, list view, 3440 px: the drag still stops at 1400 px

  1. After, board view, 3440 px window, stored 1400, handle dragged 5000 px right: the sidebar reaches 2884 px (mc-sidebar-width 2884, aria-valuemax 2884), the three lanes share the width, and the chat pane keeps its 320 px minimum on the right. In list view the same saved 2884 paints the sidebar at 1400 px and stays saved (a separate capture with mc-sidebar-width 2884 at 3440 px: root 1400 px, aria-valuenow 1400, mc-sidebar-width still 2884).

After, board view, 3440 px: sidebar reaches 2884 px and three lanes share it, beside a 320 px chat pane

  1. After, board view, the narrow-window paint: the 2884 px width saved on the 3440 px window, loaded on a 1440 px window. The sidebar paints at 884 px, the resize handle is on screen at the sidebar's right edge, and the chat pane keeps its 320 px minimum. The saved 2884 is kept for the wider window.

After, board view, 1440 px: a width saved at 3440 px paints at 884 px beside a 320 px chat pane

  1. After, board view, mc-sidebar-width saved as 2884 and the window loaded at 1200 px: the sidebar paints at 644 px (1200 - 236 rail - 320 chat pane) with its header, search box and lanes, the resize handle is on screen at its right edge, and mc-sidebar-width still reads 2884.

After, board view, 1200 px: a width saved at 3440 px paints at 644 px

  1. Before (origin/main), 1440 px window, stored 1400, the handle dragged to its maximum: the sidebar stays at 1400 and overhangs the window, leaving the chat pane under its minimum. On this branch the same stored 1400 paints at 884 px in board view (1440 - 236 rail - 320 chat pane) and at 1204 px in list view (1440 - 236 rail) and stays saved, the same paint as image 3 for a saved 2884; the 1440 px and 1200 px cases are pinned by ChatSidebar.resizeTouch and clampSidebarWidth tests listed below.
Image 4 (before): 1440 px window, stored 1400, overhang on main

Before (origin/main), 1440 px, stored 1400: the sidebar overhangs the window

Manual verification

From the capture entry above, driving the handle with a headless Chromium mouse drag on this head:

Window View Start Result
3440 px list stored 260, drag 5000 px right root 1400, stored 1400, aria-valuemax 1400
3440 px list stored 2884 root 1400, stored 2884
3440 px board stored 1400, drag 5000 px right root 2884, stored 2884, aria-valuemax 2884, chat pane 320
1440 px board stored 2884 root 884, stored 2884, chat pane 320
1200 px board stored 2884 root 644, stored 2884, chat pane 320
1200 px board stored 1400 root 644, stored 1400, chat pane 320 (vitest, ChatSidebar.resizeTouch)
1200 px list stored 1400 root 964 (window minus rail), stored 1400 (vitest, ChatSidebar.resizeTouch)

What changed (motivation → approach → change)

  • Goal: in board view the drag ceiling follows the room the layout already reserves, not a fixed pixel cap; the list views keep 1400.
  • Approach: one function, sidebarRoomWidth({ winW, railW, chatMin }), is the room beside the live nav rail (useRailWidth) and a CHAT_PANE_MIN_W chat pane, floored at SIDEBAR_MIN. In board view it holds the paint and is the drag ceiling; the list views take the smaller of SIDEBAR_MAX and the room beside the rail alone. A raised fixed cap would be wrong on the next wider screen and could push the chat pane below its minimum.
  • Change:
    • chat-sidebar/resize.ts: useSidebarResize takes boardActive and fillsHost, and reads the live window width from useWindowWidth, the one store ChatPage also reads (a new hook in hooks/useWindowWidth.ts, on the window's resize event), so the sidebar and the drawer paint against the same width in the same render and no caller passes it in. The drag, the arrow-key nudge and aria-valuemax use that ceiling, read at call time through refs. ChatSidebar calls the hook after useBoardColumns (the pinned hook order in ChatSidebar.ownerComposition.test.ts moves with it).
    • Seat and paint: outside board view the stored width is held to SIDEBAR_MAX, sidebarPaintWidth holds it to the room, and one layout effect reports the painted width to ChatPage, which seats the drawer at it through main's clampSidebarWidth (the mobile drawer and the sessions embed reserve no chat pane). A saved 2884 paints 1400 in list view and 2884 in board view, and switching never rewrites it. ChatPage's first read and the collapsed recents flyout are held to 1400.
    • Stored widths: parseStoredSidebarWidth(raw) replaces the three copies of the SIDEBAR_MIN..SIDEBAR_MAX check and keeps a wider saved width.
    • No-op resizes: commitResize is the one place a drag or nudge saves, and a resize that ends on the painted width it began from keeps the stored preference.
    • The header's compact steps and the board auto-widen read the painted width.

Backwards compatibility

Compatible: the mc-sidebar-width key and its format are unchanged. Every value main accepts still loads as the same width on the same window in list view; board view now paints it beside the chat pane's minimum, so on a window too narrow for both it paints narrower than on main and stays saved. A value above 1400, which main discarded, now loads as saved, paints at 1400 in list view, and paints beside a minimum chat pane in board view.

Readers of the stored width, and how each still works:

  • ChatPage's first read (before ChatSidebar reports its seat): reads the value through parseStoredSidebarWidth, held to 1400, so a board-view width never widens the first frame or the collapsed recents flyout.
  • useSidebarResize (mc-sidebar-width and mc-sidebar-width-pre-board): reads any value at or above SIDEBAR_MIN as saved; the paint, not the reader, holds it to the view and the window.
  • The board-column Playwright specs prime 1400 at an 1800 px viewport: that value loads unchanged and paints 1244 px with the drawer at the same width (pinned in clampSidebarWidth.test.ts; both specs passed at that paint in CI).
  • The Crew Members roster has its own key, untouched.

Rolling back to a build without this change: its readers drop a stored value above 1400 and fall back to 260 px, so a board width saved past 1400 resets once; values at or under 1400 load as before.

Tests

  • website/src/test/ChatSidebar.resizeTouch.test.tsx:
    • new list view ceiling block, 3440 px window: a drag to the far right stops at SIDEBAR_MAX, saves 1400 and reports aria-valuemax 1400; a saved 2884 paints at 1400, the host is told 1400, and an ArrowRight plus a drag pushed right both keep the saved 2884; switching list to board to list paints 1400, 2884, 1400, 2884 and keeps the saved 2884 throughout; board view still accepts a drag from 1400 to 2884 and saves it. The first three fail on head 70afd09 (the list view dragged to 2884 and painted the saved 2884 with an inset).
    • the board view window-relative drag ceiling block (the earlier window-relative cases, now rendered in board view): at 3440 px and 5120 px a drag passes SIDEBAR_MAX and leaves exactly CHAT_PANE_MIN_W for the chat pane; nudges stop at the same ceiling; a width saved at 3440 px paints beside a minimum chat pane on a 1440 px window and comes back when the window widens; a window narrowed after a wide drag paints inside the drawer and drags from there; a press with no travel, a pen's zero-delta moves, a swallowed nudge and a drag pushed against the ceiling each keep a wider saved width; a nudge that does move saves; fillsHost reserves no chat pane; a wide saved width painted narrow gets the tiny header; at 1440 px the ceiling and aria-valuemax are the room beside the rail and a minimum chat pane; at 1200 px a saved 1400 and a saved 1401 paint the same in list view (beside the rail) and in board view (beside the rail and a minimum chat pane); both fail with the old stored <= SIDEBAR_MAX early return. A board view on a 1200 px window with 1400 saved tells the host 1200 - rail - 320, then 1400 once the window widens to 3440; this fails when the report sends the seat width instead of the painted width.
  • website/src/test/ChatPage.previewExpandSessions.test.tsx: with 2884 saved on a 3440 px window and the sidebar collapsed, the recents flyout opens 1400 px wide and the saved width stays; this fails on head ad75048 (the flyout opened 2884 px wide).
  • website/src/test/ChatSidebar.persistenceContract.test.tsx (stored-width cases now run on a 2400 px window, wide enough for 1400): a stored 1401 loads as saved and paints at 1400 in list view; switching to board view with 2884 saved on a 1440 px window writes no pre-board width and keeps 2884.
  • ChatSidebar.resizeTouch.test.tsx moves the window by setting innerWidth and firing resize, the event useWindowWidth listens to, so every width case drives the real update path. No other test or capture fixture changes: ChatSidebar takes no window-width prop.
  • website/src/test/clampSidebarWidth.test.ts: the board-column e2e geometry (stored 1400 at 1800 px paints the root and the drawer at the same 1244 px), sidebarRoomWidth at 1440 / 3440 / 5120 px, parseStoredSidebarWidth accept / reject cases, sidebarPaintWidth at and past SIDEBAR_MAX, including a 1200 px window where 1400 and 1401 paint the same (fails with the old early return), and a drawer width built from sidebarPaintWidth then clampSidebarWidth that leaves exactly the chat minimum.

Run locally on this head (one commit on main e281eca): every vitest file under src/test/ChatSidebar*, src/test/ChatPage*, clampSidebarWidth and sidePanelFillWidth, plus integration/ChatSidebar* (199 files, 2181 tests passed); npx tsc -b, npx eslint on the changed files, check-phantom-classes, check-theme-colors and check-restyle-ratchet: clean. The board-column Playwright specs passed at the 1244 px paint in CI's E2E job on head 8a794f4 (link above).

Related Issues

Closes #14853

Checklist

  • One commit, with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable): N/A, no doc or system spec describes the 1400 px ceiling
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

@jeeshofone
jeeshofone requested a review from a team September 29, 2026 00:00
@jeeshofone
jeeshofone requested a review from a team as a code owner September 29, 2026 00:00
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Sep 29, 2026
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — 🟡 CONCERNS

UX-level review of 8632fafed2adc71672964cd104c1fced63c6e7ab via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

Switching between list and board view now snaps the sidebar between 1400 and up to 2884 px. No recording shows that jump, and no first-time reader has seen these states.

Watch

  • Width jump on a view toggle. The list view caps the painted width (seatWidth = boardActive ? sidebarWidth : Math.min(sidebarWidth, SIDEBAR_MAX)), and rootStyle applies the board width "at once". So a user who dragged the board to 2884 sees the same sidebar lose half its width as soon as they switch to list view, with no motion linking the two widths. Main already snapped on auto-widen, but only up to 1400 px, so this jump can be about twice as large. It happens on every toggle. Fix: attach a short recording of a list↔board toggle at 3440 px, or animate the width change.
  • Lanes cut off at the sidebar edge. In attachment-05 (1200 px window) the "DONE" lane is sliced at the sidebar's right edge, with nothing showing the strip scrolls. The narrower paint makes this more likely now. The edge fade is deferred to feat(chat): reserve the chat pane in every view and cue clipped board lanes #17136, so make sure that follow-up lands.

[UX-REVIEWED] 8632faf

Description read

[DESCRIPTION-READ] 1ffdf8bb47a75c3d52ad55ab3e5a692a4c1a4c9c26d7f0dd83556ca3b0826daa

That sha256 names everything this verdict read: the PR description, plus the 9 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 8632fafed2adc71672964cd104c1fced63c6e7ab via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Confirm that existing board users accept a narrower board on mid-width windows: a saved 1400 on an 1800 px window now paints 1244 px.

[DESIGN-REVIEWED] 8632faf

Description read

[DESCRIPTION-READ] e84be823f29a16b25c30f542e5a08d9ccdbc3354e61fdd7afd5f1664d570ccf3

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 8632fafed2adc71672964cd104c1fced63c6e7ab via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 8632faf

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of 8632fafed2adc71672964cd104c1fced63c6e7ab via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Check that the board-column Playwright specs still pass at the 1244 px paint on head 8632faf. The E2E run the description cites ran on 8a794f4.

What this change ships

Inventory (10 items) — 10 justified

Intent: let users of board view on ultra-wide windows drag the session sidebar past 1400 px. This is an ADDITION; it also fixes the narrow-window overhang in #16094.

  1. In board view, a drag or arrow nudge can widen the sidebar up to the window minus the nav rail and a 320 px chat pane — justified
  2. A saved width above 1400 now loads as saved instead of falling back to 260 — justified
  3. In board view the sidebar is always held beside a minimum chat pane, so a saved 1400 on an 1800 px window now paints at 1244 — justified
  4. On a narrow window the list view's sidebar no longer overhangs; it is held to the window minus the rail (Session sidebar: a stored width up to 1400 px overhangs a narrow window #16094) — justified
  5. The list views paint a wider saved width at 1400 and keep the saved value — justified
  6. A drag or nudge that ends where it started no longer overwrites a wider saved width — justified
  7. The sidebar tells ChatPage its painted width on every change, including a view switch and a window resize — justified
  8. The collapsed recents flyout is capped at 1400 — justified
  9. Board auto-widen compares against the painted width, not the saved one — justified
  10. New fillsHost prop and shared useWindowWidth hook; ChatPage's local resize listener is replaced (2 consumers each) — justified

[FIRST-PRINCIPLES-REVIEWED] 8632faf

Description read

[DESCRIPTION-READ] 8995ba3034b8245cc3c1ccc5b079ef648549050895f2a742d71560fbb7418439

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 8632fafed2adc71672964cd104c1fced63c6e7ab via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 8632faf

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 29, 2026
@jeeshofone
jeeshofone force-pushed the fix/14853-sidebar-max-window branch from ab633ec to ad7940f Compare September 29, 2026 01:24
@jeeshofone

Copy link
Copy Markdown
Contributor Author

CI status for head ad7940f (rebased onto main 7610731 to pick up #14883, which fixed the test_pid_reader_ratchet count that was red on the first head). The diff touches only website/, so none of the reds below come from this change:

A fresh head once the installation rate limit clears should rerun the review lanes.

@jeeshofone
jeeshofone force-pushed the fix/14853-sidebar-max-window branch from ad7940f to 934f71e Compare September 29, 2026 03:12
@jeeshofone

Copy link
Copy Markdown
Contributor Author

Dispositions for the reviews of ab633ec76, addressed on new head 934f71ec7 (rebased onto main 2e09b1030):

Opus 5 finding 1: ChatSidebar.tsx drag ceiling vs the painted column. Fixed. After a drag to 2884 on a 3440 px window, a mid-session narrowing left the root at style={{ width: sidebarWidth }} = 2884 inside the narrower drawer. The root now paints at sidebarPaintWidth (website/src/pages/chat/sidebarWidth.ts): a stored width past SIDEBAR_MAX is held to the room beside the rail once the window narrows (a new resize listener in ChatSidebar tracks the window), so the root and its resize handle stay in the drawer. Widths up to 1400 paint exactly as on main, so the overhang main already allowed on narrow windows is unchanged, and that case stays out of scope per ## Not a goal. A drag or arrow nudge now starts from the painted width, so the first pull moves the edge at once. The stored preference is kept for a wider window, as ChatPage already keeps it. Regression: a window narrowed after a wide drag paints the root inside the drawer and drags from there in ChatSidebar.resizeTouch.test.tsx, plus sidebarPaintWidth cases in clampSidebarWidth.test.ts. Both fail on ab633ec76.

Opus 5 finding 2: useRailWidth.ts getRailWidth during the first render pass. Fixed. getRailWidth now answers from the persisted mc-nav collapse preference through railWidthFor until App first calls setRailWidth, and from the published track after that. Focus mode is never persisted, so it is off at load. Both the ChatPage and ChatSidebar initialisers use it. With a collapsed rail on a 1920 px window, a saved 1526 now restores as 1526, not 1400. Regressions: a width saved against a collapsed rail loads intact before App publishes the rail and the two getRailWidth before App publishes the rail cases. Both fail on ab633ec76.

Design Review note: a max-width drag with a side panel open. No change needed. sidePanelFillWidth (SidePanel.tsx) computes chatAvail = winW - railW - sidebarW from effectiveSidebarWidth and switches the panel to fill whenever chatAvail < SIDE_PANEL_MIN_W + CHAT_PANE_MIN_W. At the new ceiling chatAvail is exactly CHAT_PANE_MIN_W (320), so the panel fills the chat column the same way it already does when a 1400 px sidebar crowds a narrower window. The render path does not change, so the panel does not remount. The ceiling deliberately reserves only the chat minimum, because the fill mode already handles the panel.

UX Review Watch: fork-lane cap, no first-time blind read. Acknowledged. The screenshots still cover every drag state this PR changes, and the handle and its copy are unchanged. The narrowed-window case this head adds cannot be shown in one static frame, so its test covers it. The blind read would need a maintainer to push the branch to this repository.

GPT 5.6 / First Principles: no findings on ab633ec76. The re-review of 934f71ec7 is pending.

The product question on #14853 about an arbitrary share versus a fraction, and a persisted bound, is still open for the issue author. This PR does not settle it. It implements the window-relative ceiling described above.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 29, 2026
@jeeshofone
jeeshofone force-pushed the fix/14853-sidebar-max-window branch from 934f71e to 83a4031 Compare September 29, 2026 05:13
@jeeshofone

Copy link
Copy Markdown
Contributor Author
  • span=369fcac16148: the paint ceiling reserves nothing for the chat pane above SIDEBAR_MAX

Fixed on new head 83a403151. sidebarPaintWidth now holds a stored width to sidebarMaxWidth({ winW, railW, chatMin }) instead of winW - railW, and ChatPage's effectiveSidebarWidth (which feeds OverlayDrawer and panelReserve) passes the stored width through sidebarPaintWidth before clampSidebarWidth, so drawer and root agree. Because sidebarMaxWidth never returns less than SIDEBAR_MAX, a width up to 1400 is never touched, and the board-geometry pin in clampSidebarWidth.test.ts (stored 1400, window 1800) is unchanged and still passes.
Your example now holds: a width of 4726 saved at 5120 px paints at 3440 - 236 - 320 = 2884 after a resize to 3440 px, leaving the chat pane CHAT_PANE_MIN_W.
Regressions: a window narrowed to a still-wide width keeps the chat pane its minimum in ChatSidebar.resizeTouch.test.tsx (save at 5120 px, resize to 3440 px), plus sidebarPaintWidth cases at 2000 px and 5120-to-3440 px and a drawer-width case built from sidebarPaintWidth then clampSidebarWidth in clampSidebarWidth.test.ts. All of them fail with this head's source reverted to 934f71ec7.

@jeeshofone

Copy link
Copy Markdown
Contributor Author
  • span=ad9dd3f470e2: winW - railW lets a 2000 px window paint a 1764 px sidebar

Fixed on new head 83a403151, as suggested: the paint ceiling past SIDEBAR_MAX is now sidebarMaxWidth, which subtracts CHAT_PANE_MIN_W. At 2000 px with the rail expanded, a stored 2884 paints at 1444 (2000 - 236 - 320), and ChatPage's drawer width uses the same value. sidebarPaintWidth({ stored: 2884, winW: 2000, railW: 236, chatMin: 320 }) is pinned at 1444 in clampSidebarWidth.test.ts. That case fails on 934f71ec7, which returned 1764.

@jeeshofone

Copy link
Copy Markdown
Contributor Author
  • span=01150fa16b67: ChatSidebar ships its own winW state and resize listener, duplicating ChatPage's

Fixed on new head 83a403151 with the subtraction you proposed. ChatSidebar's winW state and resize effect are gone. It takes an optional winW prop, and both production render sites in ChatPage (the embedded sessions pane and the drawer) pass the winW ChatPage already tracks. A direct render that omits the prop reads window.innerWidth at render time, with no listener. After this head setWinW(window.innerWidth) appears once across ChatPage.tsx and ChatSidebar.tsx, in ChatPage.
The narrowed-window test in ChatSidebar.resizeTouch.test.tsx now drives the width through that prop (a rerender with the new winW), the way ChatPage delivers it.

@jeeshofone

Copy link
Copy Markdown
Contributor Author
  • span=f0e1244f6b16: no blind first-time reader has evaluated the changed resize behaviour

Accepted and deferred, as the review itself says this is the fork lane's limit and not an author gap. The only changed control is the existing resize handle's ceiling, and the screenshots still show every static state this PR changes: 3440 px at the new 2884 px maximum beside a 320 px chat pane, and 1440 px unchanged from main. Head 83a403151 changes only how a width past 1400 is held when the window narrows (the chat pane now keeps its 320 px minimum), which is not visible in one static frame and is covered by tests. The handle, its label and its copy are unchanged. A blind read needs a maintainer to push the branch to this repository.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 29, 2026
@jeeshofone

Copy link
Copy Markdown
Contributor Author
  • span=13041f13c796: no first-time reader has cold-read the widened-sidebar layout

Accepted and deferred. The review confirms every shown state matches the diff and names this as the fork lane's limit, not a defect. The change alters no label or copy, only the existing resize handle's ceiling. A blind read needs a maintainer to push the branch to this repository.

@jeeshofone

Copy link
Copy Markdown
Contributor Author
  • Design Review Watch (reviewed on dbaa6ee), board auto-widen compares the stored width: fixed on 295b944a2. useBoardColumnMutations now takes the painted width (paintedWidthRef from useSidebarResize) and compares the lanes' target with it, while widenForBoard still records the saved width under the pre-board key. With today's constants the outcome is the same either way (a clipped width paints at least window minus 236 minus 320, and the board's target is capped at window minus 220 minus 520), so the lanes were not squeezed below what main gives them; the comparison now matches what the screen shows by construction. New case in ChatSidebar.persistenceContract.test.tsx: 2884 saved, 1440 px window, switch to board view: the saved 2884 stays and no pre-board width is written. A probe that forces the widen fails it (920 saved). Design Review is PASS on 295b944a2.

@jeeshofone

Copy link
Copy Markdown
Contributor Author
  • UX Review Watch, attachment 2 shows a faint chat pane: accepted. The image was captured on an earlier head, and the image alone does not show why the pane is faint, so it is not clean evidence for this head. I will replace it with a fresh capture of this head at 3440 px in a new browser session with no dialog opened. Until then this item stays open and the PR is not ready on the UX lane.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

@jeeshofone

Copy link
Copy Markdown
Contributor Author
  • UX Review Watch (reviewed on dbaa6ee), a drag on a narrower window overwrites a wider saved width: kept as designed. A drag that moves is the user choosing a width, and saving it is what the handle does on main. The accidental cases (a press with no travel, pen jitter, a drag back to its start, pushing against the ceiling, an arrow key the ceiling swallows) all keep the wider saved width, and tests cover each one. Keeping a separate width per window size would be a new preference model with its own reset and discoverability questions. That belongs in its own change, not in this widening.

@jeeshofone

Copy link
Copy Markdown
Contributor Author
  • Opus 5 Review FINDING, sidebarWidth.ts:26, a width up to 1400 can overhang a 1440 px window: kept, tracked as Session sidebar: a stored width up to 1400 px overhangs a narrow window #16094 (linked under "Not a goal"). That overhang is main's behaviour for any width up to 1400, and images 5 and 6 show it unchanged. Holding those widths beside a chat pane minimum changes the narrow-window paint for every saved width, including the board's automatic width, which clampSidebarWidth deliberately leaves unheld. That needs its own change with its own board pins.

@jeeshofone

Copy link
Copy Markdown
Contributor Author
  • GPT 5.6 Review (reviewed on 8ba5b83, downgraded on adjudication), the embedded sidebar sizes against the outer window: deferred. ChatPage already sized the drawer and the sidebar from window.innerWidth on main, so the embed basis is not new here. No mount in this repository puts the full ChatPage sidebar inside a host narrower than the window. Measuring the host would mean a ResizeObserver threaded through ChatPage, ChatSidebar and the resize hook, plus a first-paint ordering rule, for an embed path with no in-repo user. GPT reports no findings on 295b944a2.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

Dispositions for head d1c5745 (code delta from baedb1d: useRailWidth.ts and the mc-nav read in App.tsx reverted to main's; tests adjusted).

First Principles, item 5 (rail first frame): fixed by subtraction. published, getRailWidth and readNavCollapsed are gone, useRailWidth uses main's getSnapshot again, and App.tsx reads mc-nav inline as on main. The only consumer that cared was a sidebar saved beside a collapsed rail painting 162 px narrower until App's effect publishes the track, and nothing writes a width during that frame (drag, nudge and the board widen all run on user action or after the publish). The four tests for it went with it; the collapsed-rail ceiling tests now publish the rail with setRailWidth(74) the way App does.

First Principles, item 4 (keeping a wider saved width): kept, Goal amended. The PR body's Goal now states it: a width saved on a wide window is a saved preference, painted as wide as a narrower window allows and left saved for the wide one. Main already has this rule in ChatPage ("clamp for render but leave the preference for the wide viewport"); on main it never mattered because no stored width could exceed 1400. Without sidebarStoredAtStart, the moved-flag and the two no-op guards, a press on the handle (or one ArrowRight against the ceiling) on a laptop screen would silently overwrite the 2884 saved on the ultra-wide monitor with whatever the laptop paints, which is the regression the tests for heads 1181a61, 85774b8 and 2af8364 pin.

UX, chat pane faint in image 2: fixed. Image 2 was recaptured on this code at 3440 px with no dialog or scrim open (the capture script checks that before the shot); the chat pane is fully legible.

UX, image 7 from an earlier head: fixed. Recaptured on this code (now image 6): 2884 saved, 1200 px window, sidebar paints 644 px, handle on screen, mc-sidebar-width still 2884. The committed copy under temp-screenshots/ is removed from the branch, so nothing needs dropping at merge. The old dialog-layering image is removed, since this branch no longer changes dialog layers.

UX, a full-width drag leaves a 320 px chat pane: by design, no change. 320 px is the existing CHAT_PANE_MIN_W the side panel already enforces; the user only gets there by dragging to the limit, and one drag back undoes it. Neither the default (260) nor the board auto-widen can land on the new ceiling: boardSidebarWidth still caps at SIDEBAR_MAX (listed under Not a goal).

UX, saved width outlasts a narrower window: intended, now in the Goal. Same rule as First Principles item 4 above.

UX, no first-time reader has seen the drag: a cold read by a maintainer is outside what the author can supply; every state is in the screenshots.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

Dispositions for head f53666c (code delta from d1c5745: chat-sidebar/resize.ts only).

First Principles, item 6 (move-skip guard): fixed by subtraction. sidebarMovedRef and the first || dx === 0 skip in onMove are deleted; the release-time restore in onEnd is the one guard. A move with no horizontal travel lands on the start width, so release restores the stored preference. Both press tests (no move, and a pen reporting moves with no horizontal travel) pass with the restore alone, as the review predicted; the targeted run is 513 files, 6618 tests, all passing.

UX, "a saved wide width comes back unexpectedly": no change, the suggested rule already holds. A drag on a narrow window that ends below the room the window allows saves that width: the only drag that saves nothing is one that ends exactly where it started, which on a narrowed window is also the room itself. A drag that ends at its own start changed nothing on screen, so the wide monitor keeps the width the user last set there. The PR's Goal now states this rule.

UX, the 320 px chat pane at the new maximum: the review marks this as a product decision for a human, not a defect. 320 px is the existing CHAT_PANE_MIN_W, the default stays 260, and the board auto-widen still caps at 1400, so only an explicit drag to the limit reaches it. Holding position for a maintainer's call, together with the lane's request for a first-time reader, which the author cannot supply.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

Dispositions for head e11af60 (rebased onto main 4e0aa9b; code delta from f53666c: sidebarWidth.ts and the three list lanes in ChatSidebar.tsx).

UX, rows stretched across very wide sidebars: fixed with the suggested row cap. Past 1400 px the tree, flat and conductor lanes take the extra width as inline-end padding (listLanePadEnd(paint) = paint - 1400 + 8), so a session row is never wider than in a 1400 px sidebar and its date and pin stay beside its title. Up to 1400 px the lanes keep their class padding exactly as on main; board columns still use the full width, which is what the extra width is for. Image 2 is recaptured on this head: sidebar 2884 px, rows 1360 px wide, lane end padding 1492 px, chat pane 320 px, no dialog open. New tests: ChatSidebar.resizeTouch.test.tsx ("past SIDEBAR_MAX the list lane pads its far edge...", fails on f53666c) and listLanePadEnd cases in clampSidebarWidth.test.ts. Targeted run on this head: 516 files, 6648 tests passed; tsc -b and eslint clean.

First Principles, item 4 (stored vs painted width): kept, Goal now names it. The Goal states that a saved width wider than the current window survives a drag or nudge that ends where it started, and cites the Opus 5 BLOCKING finding at resize.ts:98 (head 2af8364): a nudge that changed nothing overwrote the wider saved width with the painted one. Keeping the two values apart is what prevents that regression. The rail first-frame change (item 5) was already subtracted on d1c5745: no test needed it.

UX, no first-time reader has seen the drag: a cold read by a maintainer is outside what the author can supply; every state is in the screenshots.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

Dispositions for head 70afd09 (code delta from e11af60: ChatSidebar.tsx, chat-sidebar/resize.ts, sidebarWidth.ts and three tests).

First Principles, item 9 (optional winW with a window.innerWidth fallback): fixed by subtraction. winW is now required on ChatSidebarProps and useSidebarResize, and the ?? window.innerWidth fallback is deleted. ChatPage is the only production renderer and passes it at both sites. The two test harnesses that exercise the width (ChatSidebar.resizeTouch, ChatSidebar.persistenceContract) pass window.innerWidth themselves.

UX, list view detached at wide widths: fixed with the suggested alignment. The cap moved from the lane to the sidebar root: in the list views (tree, flat, conductor) the root insets its content by the width past 1400 (listColumnInset), so the header, the New button, the search box, notices, rows and the Older Sessions footer all share the column a 1400 px sidebar has. The root and its resize handle still span the painted width, and board view uses the full width. Image 2 is recaptured on this head (sidebar 2884 px, content inset 1484 px, chat pane 320 px). Tests: the list-column case in ChatSidebar.resizeTouch.test.tsx (fails on f53666c) and listColumnInset cases in clampSidebarWidth.test.ts. Targeted run on this head: 516 files, 6648 tests passed; tsc -b and eslint clean.

UX suggestion, keep the list-view drag ceiling at 1400: not taken in this head. #14853 asks for the session list as well as the board to grow on wide screens, and the list content now stays readable at any width. Whether a list-view drag past 1400 should be allowed at all is a product call for a maintainer.

UX, no first-time reader: a cold read by a maintainer is outside what the author can supply.

@jeeshofone

Copy link
Copy Markdown
Contributor Author
  • Opus, ChatPage.tsx initial sidebarWidth loads a board-view width above 1400 into the flyout: fixed in dcf4b26.

ChatPage now reads the stored width at most SIDEBAR_MAX until ChatSidebar reports its seat width (board view raises it from its first layout effect, before the frame paints), and SessionFlyout gets Math.min(effectiveSidebarWidth, SIDEBAR_MAX), since the flyout is a session list and the last reported seat width can be a board view's.
Regression: ChatPage.previewExpandSessions.test.tsx "opens no wider than 1400 px" (2884 saved, 3440 px window, sidebar collapsed, flyout opened by ArrowDown) asserts a 1400 px flyout and an untouched saved 2884. It fails without the ChatPage.tsx change (flyout 2884 px).

@jeeshofone

Copy link
Copy Markdown
Contributor Author
  • UX, the sidebar's width jumps when you switch views: kept, by design; head dcf4b26.

This is the product ruling the previous round's UX, Design and First Principles items asked for: the list views keep the 1400 px ceiling and only board view seats a wider width, so a width the user dragged out in board view comes back in board view and paints at 1400 in list view. The saved width is one value per user, as on main, so switching views has to change the painted width; main already changes it on a view switch (the board auto-widen and the pre-board restore). The change is not a hard cut at the drawer: OverlayDrawer tweens its outer width whenever the user is not dragging, so the chat pane reflows over the drawer's own transition. It only happens to a user who chose a board width past 1400. Whether that reflow is acceptable on a view switch is the human confirmation the item asks for, which the author cannot supply.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

Replies to the head 70afd09 review items, all addressed in head dcf4b26 (one commit on main 105630f):

  • UX, "the extra width is empty in list view"; Design, "list view gains nothing from the extra width"; First Principles item 5, "the ceiling is raised in every view": fixed as suggested. listColumnInset and the list padding are deleted. useSidebarResize takes boardActive; the drag, the nudge and aria-valuemax use the window-relative ceiling only in board view and SIDEBAR_MAX in the list views. A width saved in board view paints 1400 in list view and is kept for board view. New ChatSidebar.resizeTouch.test.tsx cases: a list-view drag at 3440 px stops at 1400; list, board, list keeps a saved 2884; board view still accepts 2884. Image 2 is recaptured (list view stops at 1400).
  • UX, "no screenshot shows board view at a wide width": fixed. Image 7 is board view at 3440 px dragged to 2884 px with three lanes; images 3 and 6 (the narrow-window paint) are recaptured in board view.
  • Design, "the saved and painted widths are separate and the no-op rules exist only to keep them consistent": the split stays, with one owner. The split is still needed (a saved 2884 paints 1400 in list view), so commitResize in chat-sidebar/resize.ts is now the single place a drag or nudge saves: a resize that ends on the painted width it began from keeps the stored preference. Both the pointer drag and the arrow-key nudge go through it.
  • UX, "no first-time reader has seen these screenshots": a cold read by a maintainer is outside what the author can supply.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

UX review disposition, new head caaa761 (reviewed head dcf4b26).

Width jumps when you switch views: fixed. A switch between list and board view now eases the sidebar root's width for 150 ms (VIEW_SWITCH_WIDTH_MS in website/src/pages/chat-sidebar/resize.ts), so the 2884 to 1400 px change reads as a resize of the same element. It arms only when boardActive flips after the board columns have loaded (viewSettled), so the columns arriving on first load paint at once. A drag or an arrow-key nudge clears it immediately, and useReducedMotion turns it off under prefers-reduced-motion. The new width ease on a view switch only block in ChatSidebar.resizeTouch.test.tsx pins all four: the ease on a switch and back, none on the first paint, a drag or a nudge, a drag right after a switch dropping it, and none under reduced motion.

The chat pane can shrink to its minimum: as intended, and now held on every window. This head also holds every painted sidebar width, on either side of 1400, to the room beside the nav rail and a 320 px chat pane, so a sidebar can never push the chat pane below that minimum (before this head a saved 1400 on a 1200 px window still did). Whether 320 px is a usable chat pane at full drag is the existing CHAT_PANE_MIN_W floor main already uses for the side panel; it is not changed here, and confirming it is a maintainer's call at merge.

No first-time reader has read the screenshots cold: that is a maintainer-run step I cannot do as the author. The screenshots and the manual-verification table in the description cover each state, including the new 1200 px row.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

Dispositions for the reviews of caaa761, new head 8a794f4.

UX BLOCK, no recording of the view-switch ease: fixed. The description now carries two recordings (item 5) on a 3440 px window with 2884 saved: board to list to board at real speed, and the same switch with CSS animations slowed to 0.1x. Sampled root widths on the way down were 2884, 2382, 1960, 1633, 1431, 1400, so it is one element resizing, not a swap. The two Watch items: the lane strip clipping at 1200 px is the board's existing horizontal scroll, unchanged by this PR, and the cold read is a maintainer-run step I cannot do as the author.

Design, the chat-pane reserve upstream of the clamp: kept, with both clear conditions met. The board-column Playwright specs (session-tags-folders, session-tags-e2e, stored 1400 on an 1800 px viewport) passed in the E2E job on caaa761, which already had this paint rule. What broke them before was the drawer being narrower than the root inside it. Here the drawer and the root take the same painted width, so they agree. The clampSidebarWidth docstring and its test comment now state the rule: the paint reserves the chat pane and the clamp does not, because reserving it twice would make the drawer narrower than the root. The list-view change on windows under about 1956 px is intended. It is the #16094 overhang.

First Principles item 9, Number.isFinite fallbacks: removed. sidebarMaxWidth, sidebarRoomWidth and sidebarPaintWidth are now plain arithmetic, and the fallback test is gone. The real non-finite input was not the SidePanel mocks. It was 104 ChatSidebar renders in 97 test files that left out the required winW prop. Each now passes winW={window.innerWidth}, as ChatPage does. Without that, ChatSidebarCoverage's narrow-header test painted NaN and failed.

First Principles item 6, the 150 ms ease: kept. This PR causes the jump it smooths. Main never stored a width above 1400, so main never moved a list/board switch from 2884 to 1400. The UX lane flagged that jump as a regression this PR ships, and the recordings show the ease turning it into a visible resize. An instant resize is right for a drag, because the pointer is the continuity there. A view switch has no pointer motion, so nothing else ties the two widths together. The ease costs one state pair, one timer and the viewSettled input. That input exists so the columns' first load does not animate, and the tests pin it.

Frontend Lint, unit literal at resize.ts:91: fixed. The transition string now sits under a transition style key (rootStyle). check-unit-literals.mjs reports 0 added against main.

Backend Tests (Windows) (2): test_memory_store_dashboard.py::test_dashboard_backup_uses_configured_retention assert 7 == 3 (job) is outside this website-only diff. It is the same retention flake already seen on other PRs, and this new head reruns it.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

Dispositions for the reviews of 8a794f4, new head 932c39e (rebased onto main af1eb61, still one commit).

First Principles item 9, sidebarMaxWidth has one consumer: removed. The board-view drag ceiling is now sidebarRoomWidth itself, the same function that holds the paint, and the list views take the smaller of it and SIDEBAR_MAX (chat-sidebar/resize.ts, sidebarCeiling). sidebarMaxWidth and its tests are gone. The one input where the two differed was a board view in a host the sidebar fills (sessions embed) where the room past the rail is between 1400 and 1720 px: there the ceiling is now the host's full room instead of 1400, which is what that host paints anyway.

First Principles item 4, the narrow-window paint and the deleted e2e pin: both clear conditions addressed. Both board-column Playwright specs (session-tags-folders, session-tags-e2e, stored 1400 on an 1800 px viewport) ran and passed at the 1244 px paint in the E2E job on 8a794f4 (job); the harness fails on any skipped spec, so both executed. The pin is back in a new form: clampSidebarWidth.test.ts now has a board-column e2e geometry block asserting that stored 1400 at 1800 px paints the root at 1244 and the drawer at the same 1244, which is the property the old pin protected (the drawer was once 1244 around a 1400 root). The description's Goal paragraph now names that geometry change and why it is intended. The paint is not limited to widths above 1400 on purpose: that split is the 1400/1401 seam, where a saved 1400 paints as stored and squeezes the chat pane below its minimum while a saved 1401 is held to the room.

UX Watch 1, the third lane cut off with no sign it scrolls: fixed. The lane strip now measures itself with useScrollEdges, the same hook and cue the session tab strip uses, and paints a pointer-transparent, aria-hidden fade on each edge that hides lanes. It re-measures on scroll, on a box resize and when the column count changes. Images 8 and 9 in the description show the 1200 px board from your attachment-05 with the fade on the right edge, then on the left once the strip is scrolled to its end. ChatSidebar.boardStripEdgeCue.test.tsx pins the three states; two of its tests fail without the cue.

UX Watch 2, the chat pane at 320 px on a wide window: kept. 320 px is CHAT_PANE_MIN_W, the floor the side panel and the drawer already hold the chat pane to elsewhere in the app, so this PR adds no new floor. Getting the room back does not need a long drag: switching to any list view paints the sidebar at 1400 at once (with the 150 ms ease) and keeps the saved board width for the next board visit, and the arrow keys on the focused handle move it in 16 or 64 px steps (Shift).

UX headline, no first-time reader: that cold read is a maintainer-run step I cannot do as the author.

Backend Tests (Windows) (7) test_runtime_cleanup_windows on 8a794f4 is outside this website-only diff and was fixed on main by #16499, #16500 and #16501; this head is rebased past them.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

Dispositions for the reviews of 932c39e, new head 70be56b.

UX Watch 1, the edge fade too faint: fixed. The fade is now 48 px wide and starts from the page background, which is darker than the lane cards, so the clipped titles fade into a visible shadow instead of into the same colour. Images 8 and 9 in the description are re-captured on this head (same 1200 px board, strip scrollWidth 692, clientWidth 642), plus an enlarged crop of the right edge.

UX Watch 2, the cold read of list view shrinking a wide board width: that read is a maintainer-run step I cannot do as the author. What the user sees is covered: the saved board width is never rewritten by a switch, board view paints it again on return, and the switch eases on the side panel's width curve so it reads as a resize rather than a reset.

First Principles item 6, the view-switch ease: kept, with its surface cut. This PR causes the jump the ease covers: main never stored a width above 1400, so on main a list/board switch never moved the sidebar from 2884 to 1400. The ease no longer has its own spelling. VIEW_SWITCH_WIDTH_MS and the width 150ms ease-out literal are gone; the root now uses sidePanelDimTransition('width') and SIDE_PANEL_MOTION_MS from sidePanelMount.ts, the same width motion the side panel uses, so the dashboard has one width ease. What remains is the viewSwitching flag and its timer, which keep the transition off drags, nudges, window resizes and the columns' first load. The UX lane's watch item on this head (whether a user reads the list-view shrink as their width being lost) is the user-facing reason the ease exists, so I am keeping it rather than removing it.

Design Watch 1, winW callers outside src: fixed. All six website/capture/*.tsx fixtures that render ChatSidebar and the three website/integration/ChatSidebar* test files now pass winW={window.innerWidth}, as ChatPage does. No caller is left without it (checked with a repo-wide search for <ChatSidebar outside src). The prop stays required, with no fallback, per the earlier First Principles ruling. The three integration files pass (67 tests).

Design Watch 2, Backwards compatibility: the description's section now lists every reader of mc-sidebar-width (ChatPage's first read, useSidebarResize with the pre-board key, the Playwright primes) and what each does with a stored value, plus what a rollback does: an older build drops a stored value above 1400 and falls back to 260 px once.

Backend Tests (Windows) (5) on 932c39e: test_wake_judge_feedback.py::TestJudgeTickReportsWhetherItAsked::test_a_committed_row_keeps_the_join_key_when_sweep_outlives_budget assert None is True (job) is outside this website-only diff and has no issue or fix PR yet. This new head reruns it.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

Dispositions for the reviews of 70be56b, new head 0c91ab0.

First Principles item 8, the view-switch ease: removed. You are right that main already repaints at once on a view switch (widenForBoard on entering board view, restorePreBoardWidth on leaving it), so this PR's switch now does the same. resize.ts no longer has lastView, viewSwitching, the timer, either setViewSwitching(false) call, the useReducedMotion read or the sidePanelDimTransition spread, and the hook no longer takes viewSettled. rootStyle is { width: paintedSidebarWidth }. The ease tests are gone with it, and the recording of the ease is removed from the description. The saved board width still survives a switch: list view paints it at 1400 and board view paints it again, as the list view ceiling tests pin.

UX Watch, the right-edge fade barely shows: fixed. The fade on both edges is now 64 px and holds the page-background tone over its outer 15 percent before it clears, so the clipped Done lane's titles visibly dim at the right edge, as the Planned lane's do at the left. I checked the strip's pixels on both captures: the two gradients are mirror images, and nothing sits on top of the right one. Images 8 and 9 and the enlarged right-edge crop are re-captured on this head.

UX headline, no first-time reader: a maintainer-run step I cannot do as the author.

Local on this head: npx tsc -b, eslint on the changed files, unit-literal, phantom-class and restyle gates, and 220 vitest files (2367 tests) under ChatSidebar*, ChatPage*, clampSidebarWidth, useScrollEdges, sidePanel* and integration/ChatSidebar*: all pass. Every other check on 70be56b was green.

@iamwhatever

Copy link
Copy Markdown
Contributor

The core change is coherent. The stored width and the painted width are tracked separately, list views keep the 1400 cap, and the tests cover drag, nudge and the board e2e geometry. Most of the 119 files are a one-line winW prop added to existing tests. I'm holding for a maintainer to accept two scope additions. One is the global chat-pane reserve, which narrows list-view sidebars on smaller windows. The other is the edge-fade feature, which still needs a light-theme capture.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

@iamwhatever thanks. Both scope additions are out of this PR and in the follow-up #17136, so each can be judged on its own. New head 5b808e2 (rebased onto main c6bfd72, still one commit).

  • The global chat-pane reserve: removed here. In the list views the sidebar now reserves only the nav rail, as the drawer's own clamp does on main; only board view, the one view that grows past 1400 px, leaves the chat pane its 320 px minimum. On a 1200 px window a saved 1400 paints at 1200 - 236 = 964 px in list view and 644 px in board view (ChatSidebar.resizeTouch). The sidebar now reports the width it paints at, and ChatPage seats the drawer at it through main's clampSidebarWidth, so ChatPage no longer computes a chat-pane reserve of its own. feat(chat): reserve the chat pane in every view and cue clipped board lanes #17136 extends the reserve to every view.
  • The lane-strip edge fade: removed here, with ChatSidebar.boardStripEdgeCue.test.tsx and the three temp-screenshots/14853-board-strip-edge-cue/ PNGs. feat(chat): reserve the chat pane in every view and cue clipped board lanes #17136 carries it, with a light-theme capture of the 1200 px board added next to the dark ones.

First Principles item 6 on 0c91ab0 (the edge fade as a second feature): fixed by that removal; every part the subtraction listed is gone from this PR.

UX Watch items on 0c91ab0 (light theme not shown, the fade over the clipped lane's header buttons): both are about the fade, which this PR no longer ships. They are answered on #17136, whose light-theme frames show the clipped lane fading out at the right edge and, once scrolled, at the left. The UX headline item (no first-time reader) is a maintainer-run step I cannot do as the author.

Local on this head: npx tsc -b, eslint on the changed files, phantom-class, theme-colour and restyle gates, vitest under ChatSidebar*, ChatPage*, clampSidebarWidth and sidePanel* (215 files, 2301 tests) and integration/ChatSidebar* (3 files): all pass.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

Dispositions for the UX and First Principles reviews of 5b808e2 (no new head: neither item has a change that belongs in this PR).

UX Watch 1, the clipped lane at a 1200 px paint has no sign it scrolls: this is the edge fade, which moved to #17136 at a maintainer's request so it can be judged on its own. #17136 now carries the source for it on head 5eb6830 (useScrollEdges on the column-strip scroller, a right fade while a lane is clipped past the right edge, a left fade once scrolled), with light- and dark-theme captures from that head. Adding it back here would undo the split the maintainer asked for.

UX Watch 2, a drag to the ceiling on a 3440 px window leaves the chat pane 320 px: kept. The board-view ceiling is sidebarRoomWidth = window - nav rail - CHAT_PANE_MIN_W (chat/sidebarWidth.ts, chat-sidebar/resize.ts), so the chat pane never goes below the minimum the side panel and the drawer already hold it to. The user reaches that width only by dragging there, and dragging back restores the room.

UX, no first-time blind read: that read is a maintainer-run step that the author cannot do from a fork.

First Principles item 8, make winW optional with a window.innerWidth default: kept required. The optional prop with that fallback is what this PR had until head 70afd09, where First Principles item 9 asked for the fallback to be removed because only direct test renders used it. Making it optional again would bring that fallback back. ChatPage is the only production renderer and passes its tracked winW at both sites. The one-line test edits make each direct render state the window width it paints against.

The two lanes stay CONCERNS for a maintainer to rule on; nothing else on this head is open.

@jeeshofone

Copy link
Copy Markdown
Contributor Author

Dispositions for the First Principles and UX reviews of 5b808e2. New head 8a3e9a3 (one commit, rebased onto main e281eca).

First Principles item 8, the required winW prop and its ~100 one-line test edits: fixed by subtraction. ChatSidebar no longer takes a window-width prop at all. useSidebarResize reads the width from a new useWindowWidth hook (hooks/useWindowWidth.ts, a useSyncExternalStore on the window's resize event), and ChatPage reads the same hook in place of its own useState + resize listener. Both read one snapshot in the same render, so the drawer and the sidebar root still paint against the same width, and there is no ?? window.innerWidth fallback for direct renders (the concern item 9 raised on 70afd09): every renderer, ChatPage and the tests alike, goes through the one path. The 102 fixture, capture and integration files are back to main; the PR now changes 11 files. ChatSidebar.resizeTouch.test.tsx moves the window by setting innerWidth and firing resize, so its width cases drive the real update path.

UX Watch 1, a lane clipped at a 1200 px paint has no sign it scrolls: that cue is #17136, split out at a maintainer's request. Its new head 4c1f0b8 also answers the UX finding there: the edge chevron is now a labelled button that scrolls the strip by one lane.

UX Watch 2, a drag to the ceiling on a 3440 px window leaves the chat pane 320 px: kept, as on 5b808e2. The board-view ceiling is sidebarRoomWidth (window - nav rail - CHAT_PANE_MIN_W), the minimum the side panel and the drawer already hold the chat pane to, and the user reaches it only by dragging there.

UX, no first-time blind read: a maintainer-run step that cannot be supplied from a fork.

For #17136's UX note asking that this PR carry evidence of a board sidebar past 1400 px: image 7 in the description shows board view on a 3440 px window dragged to 2884 px (aria-valuemax 2884), and images 3 and 6 show that saved 2884 painted on 1440 px and 1200 px windows.

Also in this head: a test that a board view on a 1200 px window with 1400 saved tells the host 1200 - rail - 320, then 1400 once the window widens to 3440 (it fails when the report sends the seat width instead of the painted width).

In board view the drag, arrow-key nudge and aria-valuemax use the room
beside the live nav rail and a CHAT_PANE_MIN_W chat pane (sidebarRoomWidth),
the same function that holds the paint. The list views cap at SIDEBAR_MAX,
since they gain nothing from a wider sidebar, and reserve only the nav rail,
as the drawer's own clamp does. useSidebarResize takes boardActive and
reports the width the root paints at to ChatPage from one layout effect,
and ChatPage seats the drawer at that width. ChatPage reads the stored
width at most SIDEBAR_MAX until that report, and holds the collapsed
sidebar's recents flyout, a session list, to SIDEBAR_MAX.

A width past SIDEBAR_MAX saved in board view is kept as saved: list view
paints it at SIDEBAR_MAX and board view paints it again. In board view
every painted width, on either side of SIDEBAR_MAX, is held to the room
beside the rail and a minimum chat pane (sidebarRoomWidth), so a saved 1400
and a saved 1401 paint the same on a narrow window, the chat pane keeps its
minimum, and the root and its resize handle stay inside the drawer. The
drag ceiling and aria-valuemax are held to the same room, read from the
live window width. A drag or nudge starts from the painted width.
The sidebar and ChatPage read that width from one store (useWindowWidth,
on the window's resize event), so both paint against the same width in
the same render and no caller passes it in.

commitResize is the one place a drag or nudge saves: a resize that ends
on the painted width it began from (a press with no travel, or pushing
against the ceiling) keeps the stored preference. The mobile drawer and
the sessions embed stretch the sidebar to their own width, so their paint
reserves no chat pane (fillsHost). The header's compact and tiny collapse
and the board auto-widen read the painted width.

Closes kirodotdev#14853
@jeeshofone

Copy link
Copy Markdown
Contributor Author

Dispositions for the UX review of 8a3e9a3. New head 8632faf: the same tree, re-headed to rerun one Windows shard.

UX Watch, no first-time reader: the lane says it cannot go above CONCERNS without one, and that read is a maintainer-run step that cannot be supplied from a fork.

UX Watch, clipped board lanes on narrow windows with no hint: the edge fade is #17136, split out at a maintainer's request; it is ready to land right after this PR.

CI on 8a3e9a3: the one red, Backend Tests (Windows) (1) test_dashboard_server_coverage.py::TestWindowEntryHandler::test_handler_follows_a_re_pointed_dist (WinError 32 on a temp file), is the single-test Windows flake tracked in #15412; this PR changes only website/.

@iamwhatever

Copy link
Copy Markdown
Contributor

Reviewed again at the new head, still not approving (crew-pr-reviewer). This is a UI feature (+689/-80), and it needs a maintainer's or design review.

@bolichen97 bolichen97 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.

Reviewed on behalf of the maintainers (sweep 2026-10-06): full diff read, callers verified against current main, readiness passed, required checks green, no blocking review threads. Product note accepted on the maintainers' behalf: in board view the painted sidebar now reserves a 320px chat pane, so a manually widened board sidebar on ~1636-1956px windows paints up to 156px narrower after upgrade (saved preference kept). The two scope additions iamwhatever held on were removed to #17136. Approving and merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let the session sidebar grow past 1400 px on ultra-wide monitors

3 participants