Skip to content

refactor: move ChatSidebar's render code into chat-sidebar owners - #20524

Merged
bolichen97 merged 1 commit into
mainfrom
refactor/linecap-f03-chatsidebar-p2
Oct 15, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
refactor/linecap-f03-chatsidebar-p2

Conversation

@bolichen97

@bolichen97 bolichen97 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Bring website/src/pages/ChatSidebar.tsx under the 1,200-line target by moving its render code into owners under pages/chat-sidebar/, with no behaviour change.

The repository is adopting a hard rule that no hand-written file exceeds 2,000 lines (#20192). After the session row moved out (#20309), ChatSidebar.tsx is still 5,360 lines: one component function that draws every lane, folder block, the header, the search dock, the Older Sessions pane, the folder modal and two header-menu panels inline. This second step moves those render bodies out, so the sidebar shell is a file of hooks and wiring.

Why it matters

A 5,000-line component is hard to review and collides with every concurrent sidebar change: a fix to a folder menu, a dock notice and the history pane all edit the same function. After this step each of those lives in its own file, and the shell that every one of them depends on is under 900 lines.

Not a goal

  • Any behaviour, markup, style or copy change: every moved render body is byte-identical apart from the glue listed under Move audit.
  • Moving any hook call: every hook stays in the shell, in the order it runs today.
  • Migrating the native confirm() dialogs, the restyle sites or any other backlog the moved code carries.

What changed (motivation → approach → change)

The shell keeps every hook call, in its current order, so React runs the same hooks and effects in the same sequence. After its last hook call it builds one SidebarScope object (its props, its own state, what its owner hooks returned and four confirming callbacks) and hands it to render owners that call no hooks. The row and folder factories run once per render, after the scope is built, so the paint-order row stamps belong to that render's pass as before. Two hook blocks that only their own panel reads become owner hooks at the same call position (useSessionCleanup, useBulkModelSwitch, added to the pinned CALL_ORDER): useSessionCleanup holds the cleanup block's three useState, its preview useQuery and its archive useMutation; useBulkModelSwitch holds four useState, useId, useAvailableModelsQuery, three useMemo, the switch useMutation, two useRef and useListboxKeyboard. Each statement is byte-identical and runs in the same place in the sequence, so the effect-bearing hooks keep their order. The native confirm() dialogs stay in ChatSidebar.tsx (the file eslint's native-dialog allowlist names) as the callbacks the owners call.

New owner (website/src/pages/chat-sidebar/) Lines Holds
scope.ts 509 ChatSidebarProps (moved) and SidebarScope, the interface between the shell and its render owners
laneRows.tsx 237 how a lane draws its rows: the row behind its window stub with its paint-order stamp, the dormant section, the Older Sessions hint, the crew groups
folderBlocks.tsx 965 the tree's folder blocks: header row and hover cluster, both menus, the body with the pinned conductor card, the hidden-folder reveal, the create-failure notice
listLanes.tsx 523 the conductor, flat and tree lanes, with the drag overlay and chat-pane drop target the flat and tree lanes share
boardLane.tsx 750 the tag-column board: column headers, filter popover, card drop, column folder blocks, unfile strip
SidebarHeader.tsx 356 the header: list menu and split New button
SearchDock.tsx 1,194 the dock over the lanes: its field (lane toggle, sort and filter menu, the label tables) and its shelf (active filter chips, list-level notices)
HistoryPane.tsx 354 the Older Sessions splitter, footer and pane
folderModal.tsx 87 the one folder create / settings modal
sessionCleanup.tsx 122 useSessionCleanup and the cleanup panel
bulkModelSwitch.tsx 174 useBulkModelSwitch and the model switch panel

ChatSidebar.tsx goes from 5,360 to 899 lines and keeps every export it had (export { … } from the new owners). dateSegment, which both the flat lane and the Older Sessions pane head their groups with, joins the shared chrome.tsx. Three files are under 150 lines on purpose: folderModal.tsx is the one folder modal, a render owner with its own owner-map row; sessionCleanup.tsx and bulkModelSwitch.tsx each pair an owner hook (listed in CALL_ORDER) with the one panel that reads it.

Move audit

website/src/pages/ChatSidebar.tsx: 5360 -> 899 lines; moved 97.88% (line-multiset)
   unmatched removed lines: 96

The 96 unmatched removed lines are glue, each accounted for: 68 import lines (each owner imports what its code uses); the 9 JSX slot wrappers whose bodies moved ({cleanupOpen && (() => {, })()}, {bulkModelOpen && (, <ListDock field={(, )} shelf={(, )}>, {folderModal && ( and two )}); the 6 confirm() call sites, which call the shell's confirming callbacks instead (same keys, same guarded action, same short-circuit); export added to dateSegment and ChatSidebarProps; four moved comments that named a position in the old file; the six lines of the shell's docblock; and one stale section heading (// ── Session row (reference-style: …) ──) whose component left in #20309.

git diff and git diff --minimal add the same lines in every changed file (the shell: 107 added, 4,536 removed).

One upstream change to ChatSidebar.tsx landed after #20309: #20184's text-warn -> text-warn-text on the board's hidden-folders button. It is carried byte-for-byte into chat-sidebar/boardLane.tsx, where the board block now lives.

Comment citations (KC28 L29)

Comments and prose that named ChatSidebar.tsx as the home of code this split (or #20309) moved now name the owner; only the cited path or name changes. Found by a sweep of every comment and doc line that mentions ChatSidebar (303 lines classified, each proposed edit checked against the tree).

File Old New
docs/system-specs/modules/ops-mission-control.md:3006 `pages/ChatSidebar.tsx` `pages/chat-sidebar/SearchDock.tsx`
website/scripts/check-i18n-strings.mjs:532, :593 pages/ChatSidebar.tsx pages/chat-sidebar/SearchDock.tsx
website/eslint-rules/i18n-strict.js:25 `pages/ChatSidebar.tsx` `pages/chat-sidebar/SearchDock.tsx`
website/src/pages/chat-sidebar/SessionRow.tsx:211 ./chat-sidebar/rows ./rows
src/kiro_crew/mcp_dashboard.py:1871 ChatSidebar chat-sidebar/folderBlocks.tsx
website/playwright/chat.spec.ts:11 (ChatSidebar.tsx aria-label) (chat-sidebar/SidebarHeader.tsx aria-label)
website/playwright/sidebar-folder-alignment.spec.ts:18 src/pages/ChatSidebar.tsx src/pages/chat-sidebar/folderBlocks.tsx
website/playwright/sidebar-folder-collapse-floor.spec.ts:6 ChatSidebar's list-view toggles chat-sidebar/folderBlocks.tsx's list-view toggles
website/playwright/sidebar-hairline-alignment.spec.ts:15 ChatSidebar.tsx chat-sidebar/HistoryPane.tsx
website/playwright/sidebar-sticky-folder-header.spec.ts:5 ChatSidebar chat-sidebar/folderBlocks.tsx
website/scripts/capture-i18n-labels.mjs:8 `pages/ChatSidebar.tsx` `pages/chat-sidebar/SearchDock.tsx`
website/scripts/capture-warn-text-contrast.mjs:32 ChatSidebar chat-sidebar/boardLane.tsx
website/scripts/check-i18n-strings.mjs:414 `ChatSidebar`'s `chat-sidebar/SearchDock.tsx`'s
website/src/apps/issue-radar/lib/links.ts:127 ChatSidebar chat-sidebar/SearchDock.tsx
website/src/apps/ops-mission-control/OpsMissionControlPage.tsx:78 pages/ChatSidebar.tsx pages/chat-sidebar/SearchDock.tsx
website/src/hooks/useAvailableModels.ts:20 ChatSidebar chat-sidebar/bulkModelSwitch.tsx
website/src/hooks/useAvailableModels.ts:41 ChatSidebar chat-sidebar/bulkModelSwitch.tsx
website/src/index.css:2255 ChatSidebar chat-sidebar/SidebarHeader.tsx
website/src/index.css:3119 ChatSidebar chat-sidebar/folderBlocks.tsx
website/src/index.css:3151 ChatSidebar chat-sidebar/folderBlocks.tsx
website/src/index.css:3168 ChatSidebar chat-sidebar/SessionRow.tsx
website/src/index.css:3178 ChatSidebar chat-sidebar/SessionRow.tsx
website/src/pages/ArtifactDeployPage.tsx:87 `FILTER_LABEL_KEY` in ChatSidebar `FILTER_LABEL_KEY` in chat-sidebar/SearchDock.tsx
website/src/pages/chat/ToolDetails.tsx:237 ChatSidebar chat-sidebar/SearchDock.tsx
website/src/pages/chat/messageTime.ts:10 ChatSidebar.tsx chat-sidebar/chrome.tsx
website/src/pages/chat/sessionOrder.ts:171 ChatSidebar chat-sidebar/chrome.tsx
website/src/pages/chat/sessionRowWindow.tsx:53 ChatSidebar's chat-sidebar/laneRows.tsx's
website/src/pages/chat/useChatPageSessionController.ts:116 ChatSidebar's chat-sidebar/HistoryPane.tsx's
website/src/pages/settings/SecurityPanel.tsx:69 pages/ChatSidebar.tsx pages/chat-sidebar/SearchDock.tsx
website/src/test/ChatSidebar.offline.test.tsx:31 ChatSidebar chat-sidebar/HistoryPane.tsx
website/src/test/folderTree.test.ts:140 ChatSidebar's chat-sidebar/folderBlocks.tsx's and chat-sidebar/boardLane.tsx's
website/src/test/labelKeyTables.test.ts:6 `ChatSidebar` `chat-sidebar/SearchDock.tsx`
website/src/test/recentWindow.test.ts:16 ChatSidebar.tsx chat-sidebar/SearchDock.tsx
website/src/uiLocations/areas/chat.ts:71 ChatSidebar chat-sidebar/SidebarHeader.tsx
website/src/utils/channelOrigin.ts:73 `ChatSidebar.tsx` `chat-sidebar/HistoryPane.tsx`

Backwards compatibility

Compatible: every name pages/ChatSidebar.tsx exported before this change still resolves from it to the same object (SIDEBAR_DISPLACEMENT_WINDOW, FILTER_LABEL_KEY, FILTER_DESCRIPTION_KEY, SORT_LABEL_KEY, FOLDER_SORT_LABEL_KEY are re-exported with export { … } from), the default export is unchanged, and the specs that vi.mock('../pages/ChatSidebar') still replace the whole sidebar, because nothing outside the sidebar imports an owner.

Removes nothing: a move; no prop, export, route, key or behaviour is removed.

Tests

No assertion's matcher or expected value changes. Source-reading pins now read the code where it lives (KC28 L30 re-points and joins, L40(8) for negative halves), each proven to still reach it by a mutation in its new home that turns it red:

  • ChatSidebar.ownerComposition.test.ts: CALL_ORDER gains useSessionCleanup and useBulkModelSwitch at their call position.
  • switchSlotCallsiteClassification.test.ts: the folder menu's and folder row's two announced sites move from the ChatSidebar.tsx row to a chat-sidebar/folderBlocks.tsx row.
  • hoverVariantPolicy.test.ts: three rows point at chat-sidebar/folderBlocks.tsx and one at chat-sidebar/HistoryPane.tsx.
  • searchFilterBar.parity.test.tsx: the sidebar entry reads the shell joined with its owners, where the search row now lives.
  • ChatSidebar.hiddenFolderBoardTrace.test.tsx: the hidden-folder control reads the joined sidebar surface it already scans.
  • ResizeHandle.parity.test.tsx, useInteractiveModels.test.ts, kiroLightShellHooks.test.ts, ChatPage.remoteBoundGates.test.tsx: only the negative halves that read ChatSidebar.tsx before the split (no hand-rolled vertical separator, no filterInteractiveModels( in the bulk switcher, no hand-spelled sidebar sidebar-inner card, no inline executor === 'remote' in the interrupted-row builder) read the shell joined with every owner; the positive halves still read the one file that holds their construct (ChatSidebar.tsx, or chat-sidebar/SessionRow.tsx for the crew-bound row).

.github/file-line-cap-baseline.txt loses ChatSidebar.tsx's row, which now sits at 899 lines (scripts/check_file_line_cap.py: 0 failures). The row review rule session-row-fixed-height (website/AUTOSDE.yaml) gains chat-sidebar/HistoryPane.tsx, which draws the history row, and the restyle baseline's 24 ChatSidebar.tsx sites move by hand to SearchDock.tsx 13, SidebarHeader.tsx 9 and boardLane.tsx 2 (same total).

Local gates on this commit, re-cut from the recipe on main 21cb2ced0c and rebased cleanly onto 4cf57981d1 (main changed no sidebar file since the first cut): tsc -p tsconfig.app.json 0; eslint src --max-warnings 0 0; jscpd 0 clones; gen-ui-index --check up to date; restyle ratchet, theme colors, phantom classes, focus cue, i18n gates, feature-map, brand, comment-history and docs-lint pass; take-away: no take-away shape; semgrep 1.78 (CI's rule set) over the 50 changed code files 0 findings, and it parses every new file (scope.ts spells out the two useScrollEdges result types rather than an instantiation expression semgrep cannot parse). Vitest: the 200 sidebar files 2,736/2,736 pass, with every new owner at or above 87.9% lines (SearchDock.tsx 88.1%, boardLane.tsx 87.9%, folderModal.tsx 88.0%, the rest 90-100%); the other 385 files of the frontend related set 11,756/11,756 pass (last run at main fbca1a17ef); the 68 backend test files that read a changed doc, rule file or mcp_dashboard.py 5,134 pass. The 15 re-pointed or joined pins each go red under a mutation in the code's new home. scripts/local-gate.py --dry-run selects 956 backend + 519 frontend files (most of them the cross-surface sets), so the floor above ran instead and CI owns the broad matrix.

Manual verification

N/A — a verbatim move whose markup is unchanged; the sidebar's 200 rendering test files cover every moved owner.

Screenshots / video

Why no screenshot: a verbatim code move with no markup, style or copy change, so nothing renders differently.

Related Issues

Part of #20192

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners October 14, 2026 22:25
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 14, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) October 14, 2026 23:05
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 9c9efb9e1f17daac9aabc332c9c3152a80ed75d8 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: PASS

Click through the four destructive sidebar actions (delete folder, delete column, clear closed sessions, delete history session) and confirm each still asks before deleting.

[UX-REVIEWED] 9c9efb9

Description read

[DESCRIPTION-READ] b56a19661d14f6006de58134b1df25e31f253555bf148449976c86858696a68e

That sha256 names everything this verdict read: the PR description, plus the 3 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 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 9c9efb9e1f17daac9aabc332c9c3152a80ed75d8 — 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

Five test files each add their own copy of the pages/chat-sidebar/ directory walk. SIDEBAR_SURFACE in ChatSidebar.hiddenFolderBoardTrace.test.tsx:100 already does this walk; check the copies stay in step with it.

What this change ships

Inventory (10 items) — 10 justified

Intent: get ChatSidebar.tsx under the repo's file-size cap by moving its render code into owner files, with no behaviour change. This is a refactor (ADDITION of files, no new capability).

  1. The sidebar's render code moves into eleven files under pages/chat-sidebar/; ChatSidebar.tsx goes from 5,360 to 899 lines — justified
  2. A new SidebarScope interface in scope.ts that hands shell state to the render owners — justified
  3. The useSessionCleanup and useBulkModelSwitch hooks are pulled out at the same call position, and the pinned CALL_ORDER grows by two — justified
  4. dateSegment moves to the shared chrome.tsx — justified
  5. ChatSidebar.tsx drops off the file-line-cap baseline — justified
  6. The restyle baseline's 24 flagged sites are split 13 / 9 / 2 across the new owner files — justified
  7. HistoryPane.tsx is added to the AUTOSDE rule's file list — justified
  8. Source-pin tests (switchSlot, hover-variant) now name the owner file instead of ChatSidebar.tsx — justified
  9. Parity and source tests read the shell joined with every owner file — justified
  10. About 30 comments and doc lines that pointed at ChatSidebar.tsx now point at the owner file — justified

[FIRST-PRINCIPLES-REVIEWED] 9c9efb9

Description read

[DESCRIPTION-READ] 16ac8810df964ccad3b8c85ab43a680668e9ee6d94c4a800b2c66dfebef75054

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 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 9c9efb9e1f17daac9aabc332c9c3152a80ed75d8 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Nothing to check.

[DESIGN-REVIEWED] 9c9efb9

Description read

[DESCRIPTION-READ] e755529da1fe98e0679c70debd0403da2fff7fb36a3f6d29518074388a10d72f

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 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 9c9efb9e1f17daac9aabc332c9c3152a80ed75d8 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 9c9efb9

Verdict parsed from the review's SHA-scoped output markers for commit 9c9efb9e1f17daac9aabc332c9c3152a80ed75d8.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 9c9efb9e1f17daac9aabc332c9c3152a80ed75d8: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 9c9efb9e1f17daac9aabc332c9c3152a80ed75d8 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 9c9efb9

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 9c9efb9e1f17daac9aabc332c9c3152a80ed75d8: <one-sentence reason>

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 14, 2026
ChatSidebar.tsx (5,360 lines after the session-row move) still drew
every lane, folder block, the header, the dock, the Older Sessions pane,
the folder modal and the cleanup and model switch panels inline. Those
render bodies move verbatim into render owners under pages/chat-sidebar/
that call no hooks; the shell keeps every hook call in its order, the
native confirm() dialogs as callbacks, and builds one SidebarScope after
its last hook call. The cleanup and bulk model switch hook blocks become
owner hooks at the same call position. ChatSidebar.tsx goes to 899
lines.

Part of #20192
@bolichen97
bolichen97 force-pushed the refactor/linecap-f03-chatsidebar-p2 branch from ec9b608 to 9c9efb9 Compare October 15, 2026 01:42
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 15, 2026
@bolichen97

bolichen97 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/scripts/restyle-baseline.json, website/src/test/useInteractiveModels.test.ts, docs/feature-map/README.md, docs/system-specs/modules/history.md and .github/file-line-cap-baseline.txt since this head went green (a37cfae -> 4cf5798); CI re-running.

The two textual conflicts were shared rows next to this PR's own: the restyle baseline gained other files' rows, and #20382/#20534 re-pointed chatPane and the settings panel in useInteractiveModels.test.ts beside this PR's sidebar join. No upstream commit touched ChatSidebar.tsx or pages/chat-sidebar/, so nothing needed porting. The split was re-cut from its recipe on the new main: every code file is byte-identical to the previous head, and the shared files carry the same edits next to main's. Re-gated at main 21cb2ce (the last step onto 4cf5798 was a clean rebase, range-diff identical): tsc, eslint, i18n, the 200 sidebar test files (2,736 tests), restyle ratchet, feature-map, brand, comment-history and docs-lint; the line-cap guard (0 failures) and L36 on 4cf5798. The 385 related frontend files (11,756 tests) last ran at fbca1a1.

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 15, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Punchline: the four destructive sidebar actions still ask before deleting — rebutted (verified, each one still confirms)

All four confirm() calls stay in ChatSidebar.tsx (the file eslint's native-dialog allowlist names), with the same i18n keys and the same guarded action, as deleteFolderWithConfirm, deleteColumnWithConfirm, clearClosedSessionsWithConfirm and deleteHistorySessionWithConfirm; the six moved call sites (both folder menus, the board column, Delete all, the history row's close and delete) call them, and the row's !remoteInstanceId && short-circuit is kept.
Tests at this head: ChatSidebarW3Coverage "deletes the folder only once the confirm is accepted" and "right-click deletes only through the same confirm as the ⋯ menu"; ChatSidebarCoverage "deletes one history session behind a confirmation" and "clears all closed sessions behind a confirmation".
The board column has no committed test, so I ran a throwaway probe on this head (not part of the PR): confirm declined leaves deleteTagColumn uncalled, confirm accepted calls it with the column id.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • span=ab06fc015ae9 Suggestion: one shared test helper for the chat-sidebar directory walkers — rebutted (out of this PR's scope; tracked as a follow-up)

The walkers are the minimum edit the campaign's source-pin rule allows here: each re-pointed test joins the shell with its owners in place, assertions unchanged. A shared helper is a new test module outside this split's claim, and two of the five call sites are tests #20309 already merged, so consolidating them is a separate refactor.
Tracked as a follow-up by the campaign owner; this PR keeps each walker local to the test that reads the sidebar.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 15, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Punchline: the new chat-sidebar/ directory walks stay in step with SIDEBAR_SURFACE — rebutted (checked: same surface, one deliberate filter)

Every walk this PR adds or that #20309 added (listShellParity, sessions.locations, searchFilterBar.parity, ResizeHandle.parity, remoteBoundGates, kiroLightShellHooks, useInteractiveModels) reads what SIDEBAR_SURFACE reads: the shell ChatSidebar.tsx plus a recursive walk of pages/chat-sidebar/ keeping .ts/.tsx, so a new owner file joins every one of them with no edit.
The one difference is deliberate: they also drop *.test.* files under chat-sidebar/ (rows.test.ts, folderConductor.test.ts, scrollPeek.test.tsx), so an owner's own test text cannot satisfy a positive pin or trip a negative one; SIDEBAR_SURFACE keeps them because its plural rule scans every file there. Three walks sort readdirSync for a stable join; no check depends on the order.
Folding the copies into one helper is out of this PR's scope and tracked as a follow-up (see the Design disposition).

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after a maintainer read the review lanes on this head: all clean.

@bolichen97
bolichen97 merged commit 9812914 into main Oct 15, 2026
104 of 112 checks passed
@bolichen97
bolichen97 deleted the refactor/linecap-f03-chatsidebar-p2 branch October 15, 2026 04:54
CrysisDeu added a commit that referenced this pull request Oct 15, 2026
When a tag filter or active status chip narrows the session list, a 'Pinned ·
always shown' caption appears as a header above the first pinned session row in
the root lane (tree root and flat list). The caption makes the exemption visible:
the pinned band is always shown, whatever the active filter.

The caption fires only when a tag filter (activeTagIds.size > 0) or active
unpaused status chips (activeFilters.size > 0 && !filtersPaused) are on — not
for the model filter or status hides, which do not exempt pinned rows. It is
absent during a text search and when no filter narrows the list.

The caption is a root-lane header only. Folder bodies and board columns do not
repeat it; the plain divider between pinned and unpinned sections is unchanged.

New key pages.chatSidebar.pinned_always_shown in all 12 catalogs + en-XA.
Three new tests in ChatSidebar.filterDimensions.test.tsx.

Compatible with PR #20524 refactoring: uses new listLanes.tsx and scope.ts.
chenmingwei23 pushed a commit that referenced this pull request Oct 15, 2026
…line (#20749)

* fix(sidebar): dim folder and New-menu writes while the gateway is offline

Items in the folder and New-chat menus now dim, refuse at the sink and carry one
reason row per menu; a folder action refused offline shows a neutral notice and
no longer claims "Folder update failed".

Ported from #9485 onto main's chat-sidebar split (#20524): the gates live in
folderBlocks.tsx, boardLane.tsx and SidebarHeader.tsx, and the sink refusals in
the folders/create/drag hooks. The commit's screenshots are dropped.

Fixes #20736

* refactor(sidebar): move the offline menu-row gate into utils/offline

A new module under website/src/pages trips the feature-map gate; the helper belongs beside offlineProps anyway.

Co-authored-by: rnoack1 <rnoack@amazon.com>

---------

Co-authored-by: Robert Noack <rnoack@amazon.com>
Co-authored-by: EC2 Default User <ec2-user@ip-172-31-10-71.ec2.internal>
iamwhatever pushed a commit that referenced this pull request Oct 23, 2026
When a tag filter or active status chip narrows the session list, a 'Pinned ·
always shown' caption appears as a header above the first pinned session row in
the root lane (tree root and flat list). The caption makes the exemption visible:
the pinned band is always shown, whatever the active filter.

The caption fires only when a tag filter (activeTagIds.size > 0) or active
unpaused status chips (activeFilters.size > 0 && !filtersPaused) are on — not
for the model filter or status hides, which do not exempt pinned rows. It is
absent during a text search and when no filter narrows the list.

The caption is a root-lane header only. Folder bodies and board columns do not
repeat it; the plain divider between pinned and unpinned sections is unchanged.

New key pages.chatSidebar.pinned_always_shown in all 12 catalogs + en-XA.
Three new tests in ChatSidebar.filterDimensions.test.tsx.

Compatible with PR #20524 refactoring: uses new listLanes.tsx and scope.ts.
iamwhatever pushed a commit that referenced this pull request Oct 23, 2026
…ist (#20589)

* feat(sidebar): label the pinned band while a tag filter narrows the list

When a tag filter or active status chip narrows the session list, a 'Pinned ·
always shown' caption appears as a header above the first pinned session row in
the root lane (tree root and flat list). The caption makes the exemption visible:
the pinned band is always shown, whatever the active filter.

The caption fires only when a tag filter (activeTagIds.size > 0) or active
unpaused status chips (activeFilters.size > 0 && !filtersPaused) are on — not
for the model filter or status hides, which do not exempt pinned rows. It is
absent during a text search and when no filter narrows the list.

The caption is a root-lane header only. Folder bodies and board columns do not
repeat it; the plain divider between pinned and unpinned sections is unchanged.

New key pages.chatSidebar.pinned_always_shown in all 12 catalogs + en-XA.
Three new tests in ChatSidebar.filterDimensions.test.tsx.

Compatible with PR #20524 refactoring: uses new listLanes.tsx and scope.ts.

* refactor(sidebar): read the pinned-band caption flag from the row model

The caption predicate restated which filters exempt pinned rows. Each filter
dimension now declares exemptsPinned, and buildSidebarRows derives
pinnedExemptNarrowing from it, so the caption and the exemption share one rule.
Adds tag-filter caption tests (resolved tag shows it, unresolved id does not).

---------

Co-authored-by: EC2 Default User <ec2-user@ip-172-31-10-71.ec2.internal>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants