Skip to content

feat(dashboard): settings to keep the side panel open and pin Summary - #21007

Merged
iamwhatever merged 1 commit into
kirodotdev:mainfrom
jingchaodev:feat/side-panel-pin
Oct 22, 2026
Merged

iamwhatever merged 1 commit into
kirodotdev:mainfrom
jingchaodev:feat/side-panel-pin

Conversation

@jingchaodev

@jingchaodev jingchaodev commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Let a user keep the chat's side panel open in every chat and pin the session Summary in it, so what a chat was about is one glance away.

The side panel remembers open or closed per chat, and a chat where you never opened it starts closed. A user who always works with the panel open has to open it again in almost every chat. The Summary tab sits behind the panel's + menu, so reading what a chat was about takes three steps per chat: open the panel, open the menu, pick Summary.

Why it matters

With many chats open, coming back to one starts with these clicks every time. Summary is the panel's way back into a chat, and behind a menu it is easy to skip on exactly the chats where it helps most.

Not a goal

  • Changing what anyone sees by default: both settings are off, and with them off the panel behaves exactly as today.
  • Making the panel's open state one global value for everyone.
  • Pinning views other than Summary, or letting users choose which views are pinned.
  • Generating summaries: Pin Summary shows the existing Summary tab and needs session summaries on.

What changed (motivation → approach → change)

Today a chat starts with the panel closed until you open it there, and Summary sits behind the + menu. A user who always reads Summary opens the panel and picks it again in almost every chat. Two opt-in settings in Settings → Chat → Side panel remove those steps:

Setting What it does
Keep Side Panel Open (dashboard.side_panel_always_open) The panel opens in every chat the chat page enters: a new chat, a chat you switch to, a resumed chat, and after a reload. Closing it hides it until you switch chats.
Pin Summary in Side Panel (dashboard.side_panel_pin_summary) Summary becomes the first pinned tab, ahead of Changes, Artifacts and Files. It cannot be closed, leaves the + menu, and is the tab a plain open of the panel lands on.

Keep Side Panel Open saves nothing as a chat's own choice. The slot-entry reducers in store/chat/activity.ts and store/chat/lifecycle.ts read a sidePanelAlwaysOpen flag from store/chat/state.ts. They open the panel only when the entry changes the chat, so a return to the chat page keeps a closed panel closed. Turning it off puts every chat back on its saved mc-activity-open:<slot> value. The full chat page and a popped-out chat window turn the flag on (pages/chat/page/paneLayout.tsx). A phone, where the panel covers the chat, and an embedded companion chat turn it off. Lifting that hold reopens the panel the setting opened, and opens it for a chat entered during the hold (sidePanelReopenSlot), unless the user toggled the panel. The hold lives in the store because the panel toggle reads the store: under a draw-time hide, a phone tap would save the chat closed and show no change. Turning the setting on also opens the chat on screen, after a return from Settings too: the store keeps the setting the full chat page last reported.

Pin Summary must not take over a panel opened for something specific, like a file chip or a sub-agent card. So the tab strip store, hooks/usePanelTabs.ts, counts tab requests per chat, including one for the tab already shown. A tab created for discovery, such as Git or Changes for a new link (pages/chat/useChatPageResourcesController.tsx), is not a request and does not pull the panel off Summary after the landing. The chat page ends a show when the panel closes or its chat changes, even from another page. The panel lands on Summary once per show, and only when no request came since the last show ended, so a remount such as the find pane closing does not move the tab. Summary is pinned only while session summaries are on. While they are off, the Pin Summary row says so and names the Sessions page, and saving Session summaries refreshes each chat's cached summary state (pages/settings/ChatPanel.tsx). Until a chat's summary read answers, the strip keeps its pinned block and the panel waits to land on Summary. It is never pinned on a host that withholds Summary. pages/chat/SidePanel.tsx calls the pinned-block code in pages/chat/usePinnedViews.ts. With four pinned chips, inactive ones drop to their icons below a 520px strip instead of 400px (pages/chat/pinnedViews.css), so all four fit at the default panel width.

On the backend, config/sections_dashboard.py adds both booleans to DashboardConfig, config/loader_builders.py reads them from config.json, and dashboard/file_api/dashboard_config.py serves them in the GET and PUT with invalid_<key> error codes. The strings are in all 12 languages under website/src/i18n. config-baseline.json, settings-registry.generated.json, ui-index.generated.json and commandPalette/settingsRegistry.gen.ts are regenerated. The feature map has a row for each setting, and session-summary.md describes the pinned Summary.

Backwards compatibility

Compatible: both settings default to off, and with them off every slot-entry path, the pinned block and the + menu behave as they do on main. syncPinned gains an optional second argument; its one caller still passes the whole pinned list.

Removes nothing: the diff adds two opt-in settings and removes no stored key, route, view or public function.

Tests

  • test/test_side_panel_dashboard_config.py: both settings default off, save and load, a non-boolean value falls back to off, and the schema carries a label and help.
  • test/test_dashboard_files_coverage.py: both keys are in the boolean-rejection, error-code and PUT-then-GET round-trip tables.
  • website/src/test/chatSlice.sidePanelAlwaysOpen.test.ts: a switched-to, new and resumed chat enter with the panel open and save no choice; a same-chat entry and a rejected switch keep a closed panel closed; a phone or embed hold that closed a panel the setting opened reopens it when the hold lifts, a chat entered during the hold opens then, also after a trip back to the first chat, and neither happens after a toggle or the setting turning off during the hold; a switch to a missing chat that falls back during the hold keeps the first chat's reopen, and opens its panel when the hold lifts during the load, unless a toggle or the setting turning off came before or during it; a turn-on made while a phone holds it off opens nothing; the first report of a setting that is on opens the chat on screen, unless the user toggled the panel before it; a dispatch from an embedded chat, which carries no setting, keeps the stored setting; the same value arriving again does not reopen a closed panel; turning it off puts every chat back on its saved choice.
  • website/src/test/sidePanelPinSummary.test.tsx: Summary is pinned first with no close control and leaves the + menu; a plain show lands on Summary; an open that asked for a tab keeps it, including the tab already shown; an automatic open still lands on Summary, and after the landing a Git or Changes discovery open adds its tab while Summary keeps the focus, unless a tab was chosen, the show had no landing, Pin Summary is off or the open was explicit; a remount keeps the tab; a chat switch lands on Summary; nothing is pinned while summaries are off or on a host that withholds Summary; turning it off leaves Summary as a closable tab. While a chat's summary read is in flight, a pinned Summary stays first and not closable and no reordered strip is saved; the read answering off unpins it; the panel lands on Summary only once the read answers on.
  • website/src/test/usePanelTabs.test.ts: leading pinned views; one landing per show; the request count includes the tab already shown and a view opened by slot, and leaves out store writes and automatic opens; every opener the hook and the module export counts as a tab choice, and an opener the test does not list fails it; the last strip the chat page reported outlives the page, so a first report naming another chat ends the old show and the same strip reported again ends nothing.
  • website/src/test/ChatPage.gitPanelGate.test.tsx: the chat page opens the panel with the setting on, not on a phone (checked after the config read lands), and an embedded chat turns it off while a popped-out chat window opens it; turning the setting on opens the chat on screen, whether the chat page was up, unmounted by Settings, or behind an embedded chat that mounted first; a trip through an embedded companion chat reopens the panel the setting opened, also when an artifact companion switched to its own chat; a config read that answers after the chat is shown, or after a failed first read, still opens it, unless the user closed the panel first; a return with no setting change keeps a closed panel closed; closing the panel ends a show, and so does a chat change made while the chat page is away, while a remount on the same chat does not; the Git tab is an automatic open.
  • website/src/test/SettingsChatPanelCoverage.test.tsx: both toggles start off and save when turned on; the Pin Summary row names Session summaries and where they live while they are off, and drops that line once they are on; saving Session summaries refreshes the cached summary queries.

Each fix from review was proven: putting the old behavior back makes its test fail.

Determinism, for the new and changed tests:

  • Backend (test/test_side_panel_dashboard_config.py): 20 of 20 runs green at -n0, 10 of 10 at -n 4 --dist loadgroup --max-worker-restart=2 beside test_auto_open_git_panel_config.py and test_mcp_app_panel_config.py, and all 8 ids green in a shuffled order (seed 8906).
  • Frontend (sidePanelPinSummary, chatSlice.sidePanelAlwaysOpen, usePanelTabs, ChatPage.gitPanelGate, SettingsChatPanelCoverage): 10 of 10 runs green, and green in 3 shuffled orders (--sequence.shuffle, seeds 11, 4242 and 90210), 255 tests each.

Manual verification

Captured against the built SPA with fixture APIs (the screenshots below). Turning each toggle on sends its PUT. With both on, the chat opens with the panel on Summary, pinned first. Picking Changes and then switching chats lands on Summary again, and the + menu has no Summary entry while it is pinned.

A blind read of these screenshots, by a reader given only the images, described what both settings do, what the Session summaries line asks, and the icon-only pinned tabs (Changes, Artifacts, Files).

Screenshots / video

A fork without write access cannot use gh --attach, so the nine PNGs are committed under temp-screenshots/side-panel-pin/. A maintainer removes that folder before merging. Captured from the built SPA with fixture APIs.

The chat with both settings on: the panel is open, Summary is the first pinned tab, and the panel opened on it. The inactive pinned tabs show only their icon at the default panel width.

Chat with both settings on, light

After picking Changes and switching chats, the new chat's panel is open on Summary again:

After a chat switch the panel lands on Summary

The + menu while Summary is pinned: Summary is a tab, so it is not in the menu.

The + menu without Summary

Settings → Chat → Side panel with both toggles on, and the Pin Summary hint open:

Pin Summary hint

With Session summaries off, the Pin Summary row names the setting it needs:

Pin Summary row with Session summaries off

More frames: both toggles off (the default), both on, the Keep Side Panel Open hint, and the chat in dark theme

Both toggles off

Both toggles on

Keep Side Panel Open hint

Chat with both settings on, dark

Related Issues

Closes #20944

Checklist

  • At most two commits (one is the norm), 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)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

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

@jingchaodev
jingchaodev requested review from a team and KiroCrewCaptain as code owners October 15, 2026 23:57
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention labels Oct 15, 2026
@jingchaodev

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in ChatPage.tsx, useChatPanelDashboard.ts, the chat store (state.ts, lifecycle.ts, chatSlice.ts, chatSlice.publicSurface.test.ts), docs/feature-map/README.md and the 13 locale catalogs since this PR opened (93617e9 -> fe87f5b). The rebase was clean and regenerating the generated files changed nothing. CI on the new head 8f014e9 awaits maintainer approval.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 16, 2026
@jingchaodev

Copy link
Copy Markdown
Contributor Author

Rebased: main conflicted in website/src/pages/ChatPage.tsx and docs/feature-map/README.md (8f014e9 on fe87f5b -> 81c3e90 on 9b99f5f). #21054 moved the side panel renders into pages/chat/page/ChatSidePanels.tsx, so Pin Summary now passes through ChatSidePanels to both SidePanel renders. The feature map keeps main's Session title row and this PR's two rows. CI on the new head awaits maintainer approval.

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Oct 16, 2026
@jingchaodev

Copy link
Copy Markdown
Contributor Author

Rebased: main conflicted in src/kiro_crew/config/sections.py (81c3e90 on 9b99f5f -> 67d7e5c on 02928b1). #21129 split that file into sections_* owner modules, so the two DashboardConfig fields, side_panel_always_open and side_panel_pin_summary, now live in src/kiro_crew/config/sections_dashboard.py with the same defaults and help text. CI on the new head awaits maintainer approval.

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Oct 16, 2026
@bolichen97

Copy link
Copy Markdown
Contributor

This PR conflicts with main again. Please rebase onto current main. Several open PRs touch SidePanel.tsx and the chat settings panel, so expect one more rebase after they land. A full review runs automatically after you push.

Checked: head 67d7e5c is open and GitHub reports it as conflicting with main.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of cc01d4045e2fa2711781d0897dbca0faa9001035 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: both settings are opt-in, default off, and leave the panel as it is on main when off. No assertion is removed, and committed screenshots show the new surfaces.

Notes

  • Keep Side Panel Open adds three store fields (sidePanelAlwaysOpen, sidePanelAlwaysOpenSetting, sidePanelReopenSlot), and the reopen value is also saved in slotSwitchOrigin. Together they span activity.ts, runState.ts, slotSwitch.ts and lifecycle.ts, and the comments already admit a hold-during-read case they don't cover. That is a lot of state for one convenience toggle. A follow-up could collapse the phone/embed hold into one derived "effective on" value so the reopen bookkeeping goes away.
  • Pin Summary's per-show tracking (tabChoices, stoppedAt, shownPanelSlot) lives at module level in usePanelTabs.ts. That works now, but every new opener must remember to pass choice or automatic correctly. The opener-enumeration test in usePanelTabs.test.ts is the only guard, so keep it strict.

[DESIGN-REVIEWED] cc01d40

Description read

[DESCRIPTION-READ] 626d08235bedddd04abe4a30aaec9fefe828c46ccaeb0f6f4544588940a80b09

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 17, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS

UX-level review of cc01d4045e2fa2711781d0897dbca0faa9001035 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

The screenshots cover every added row, hint, the summaries-off notice, the pinned strip in both themes, the chat switch and the + menu. Nothing blocks. No first-time reader has seen them, because this fork lane has no blind read; pushing the branch to this repository runs one.

[UX-REVIEWED] cc01d40

Description read

[DESCRIPTION-READ] 2c40b7b35ac50bcbcd3dbc4bc73a3e605623e4b597e90c2b3a16b928884d5cda

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

Copy link
Copy Markdown
Contributor

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

Premise-level review of cc01d4045e2fa2711781d0897dbca0faa9001035 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 does not.

First-Principles-Verdict: PASS

Both settings are off by default and each has a nameable harm; nothing blocks. Two parts are bigger than the Goal needs.

Notes

  • Item 6 — oversized: the Goal is "keep the chat's side panel open in every chat", but the diff adds a reopen path for when the phone or embed hold lifts, including recovery for a switch to a missing chat (sidePanelReopenSlot, slotSwitchOrigin.sidePanelReopenSlot, the switchSlot.rejected branch). Shipping none of it costs one click, or the next chat switch, after a resize across the phone width. Subtraction: delete sidePanelReopenSlot, its slotSwitch.ts save and restore, and the enterActiveSlot assignment, so lifting the hold opens nothing. Clears when: the mechanism is removed, or a human amends the Goal.
  • Item 10 — one consumer, generalized: syncPinned(available, leading: readonly ViewKind[] = []) has 1 production caller (grep syncPinned\( in website/src, tests excluded). It only ever passes SUMMARY_FIRST or [], and the description's Not a goal lists "Pinning views other than Summary". Subtraction: replace leading with summaryFirst: boolean.

What this change ships

Inventory (10 items) — 8 justified

Intent: a user wants the side panel open in every chat, with Summary one glance away. ADDITION.

  1. Opt-in Keep Side Panel Open setting opens the panel on every chat entry — justified
  2. Opt-in Pin Summary setting pins Summary first; it cannot be closed — justified
  3. A pinned Summary leaves the + menu — justified
  4. A plain open of the panel lands on Summary once per show — justified
  5. Git/Changes/Issues discovery opens no longer take focus from a landed Summary — justified
  6. The phone/embed hold reopens the panel when it lifts, including after a failed switch — oversized
  7. The Pin Summary row says when session summaries are off — justified
  8. Saving Session summaries refreshes every chat's cached summary state — justified
  9. Inactive pinned chips drop to icons below 520px while Summary is pinned — justified
  10. syncPinned takes a generalized leading array parameter — one consumer, generalized

(Capped at 10; the two config keys, their GET/PUT validation and the regenerated registries are folded into items 1–2.)

[FIRST-PRINCIPLES-REVIEWED] cc01d40

Description read

[DESCRIPTION-READ] e2a4a0da541816a50493593431ff355a1af27a4609482a1e72c96e2f3540fbe5

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 17, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings (all downgraded on adjudication)

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

Opus 5.5 adjudication downgraded every blocking finding. Downgraded: the remedy each one needs is disproportionate to the harm it prevents. Adjudication downgraded all 1 blocking finding(s): the remedy each one requires is disproportionate to the harm it prevents.

Review details

BLOCKING -- website/src/store/chat/slotSwitch.ts:803 -- Preserve the origin’s reopen when a phone hold starts mid-switch

if (state.sidePanelReopenSlot === target) state.sidePanelReopenSlot = origin.sidePanelReopenSlot
Trigger: With Keep Side Panel Open enabled and chat A open without a saved open choice, select a deleted chat, narrow the viewport while switchSlot loads, receive its 404, then widen again. setSidePanelAlwaysOpen clears A’s cached open state, and this rejection branch replaces the pending reopen with the origin snapshot’s null.
Outcome: A’s panel remains closed on desktop despite the setting remaining enabled and no user close action.
Anchor: defect
Fix: Capture the origin’s reopen intent when a hold clears its cached open state, then restore it on rejection while preserving toggle and setting-off cancellation.

[BLOCK-MERGE-DOWNGRADED] cc01d40
[GPT-REVIEWED] cc01d40

Adjudication (Opus 5.5) — is blocking on each finding proportionate?

F1 — rung LOW. The failure needs every one of these at once:

  • Keep Side Panel Open is on and A was opened by the setting.
  • The user switches to a chat that has since been deleted.
  • The viewport narrows past the phone breakpoint during that one switch, which sets a hold of on:false, setting:true (patch activity.ts:1502 puts the reopen on the target, and restoreSavedActivityOpen resets A's bucket).
  • The server returns 404, so the restore runs with activeSlot back on A (website/src/store/chat/slotSwitch.ts:778, :792), and patch slotSwitch.ts:1617 puts back the origin's saved null.
  • The viewport widens again.

When it happens, A's panel is visibly closed. One toggle reopens it (patch activity.ts:1470), and the next switch to another chat opens that chat's panel through entryActivityOpen (patch state.ts:1635). Nothing is lost or exposed, and the code's own comment already names this gap (patch slotSwitch.ts:1614-1616).

The real fix adds more origin snapshot state and its own cancellation rules for toggle and setting-off, on a path that is already heavy with guards. That ongoing reading cost is larger than a one-click recovery after a rare chain of events.

[ADJUDICATION] cc01d4045e2fa2711781d0897dbca0faa9001035 total=1 uphold=0 downgrade=1
DOWNGRADE F1 website/src/store/chat/slotSwitch.ts:803 reason=disproportionate-remedy
[GPT-ADJUDICATED] cc01d4045e2fa2711781d0897dbca0faa9001035

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

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

Review details

No findings.

Notes:

  • The PR commits seven PNGs under temp-screenshots/side-panel-pin/ at the repo root. They look like review evidence, not source files.

[OPUS-REVIEWED] cc01d40

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 17, 2026
@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Keep only the setting and a per-chat "user closed it" marker, worked out at read time: rebutted

Same class as on dbc22fd, e6f2fec and c89c26a (issuecomment-6303047542, issuecomment-6325081032, issuecomment-6327625237). The panel toggle and the page read activityOpen from the store, so an open state worked out at read time means moving every reader and the toggle onto it: 75 mentions in 16 page files. The description says why the hold lives in the store; that redesign fits a follow-up PR.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Keep the opener-list test as the guard for choice or automatic: answered, no change

Agreed, and it stays: usePanelTabs.test.ts ("counts every exported tab opener as a tab choice") reads every open* function at run time and fails on one it does not classify. A caller elsewhere that leaves automatic off keeps the tab it opened for that show, which errs toward showing what was opened.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Item 3: the phone and embedded-chat hold carries too much reopen bookkeeping: rebutted

Same item as on the last seven heads, most recently issuecomment-6325083002 (e6f2fec) and issuecomment-6327627075 (c89c26a). Reopening only on the next chat entry is the round-trip close that maintainer review 5561373969 asked to fix; review 5561616186 requested changes for it, and maintainer reviews 5589476773 and 5592386728 accept the state.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • No first-time reader has seen the screenshots: rebutted

Same item as on 5c322e0, e6f2fec and c89c26a (issuecomment-6300499246, issuecomment-6325086252, issuecomment-6327627938). A blind read ran on the screenshots, by a reader given only the images; the description's Manual verification section records it. A fork PR cannot push the branch to this repository to run this lane's own read.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Make "Settings → Chat → Sessions" a link: rebutted

Same ask as on the last seven heads, most recently issuecomment-6325087428 (e6f2fec) and issuecomment-6327628798 (c89c26a). The line names the full path, two clicks away, and a user meets it once. A link means a SettingsLink inside a <Trans> placeholder in all 12 catalogs, which fits a follow-up.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Lead the Keep Side Panel Open hint with "Not on phones": rebutted

The hint reads in the order a reader needs: what the setting does, how a close behaves, then the one place it does not apply. Leading with "Not on phones." puts a negative before the reader knows what the setting is. The sentence itself replaced a wrong claim a local review caught, and the earlier ask to shorten it is answered in issuecomment-6303048936.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • A phone hold starting mid-switch drops the origin's reopen (span=35334f559888): rebutted

Same span as on e6f2fec and 35c2bac (issuecomment-6325079988, issuecomment-6332447398), downgraded LOW by the Opus adjudication on each head. It needs a resize across the phone breakpoint while one 404'ing chat read is in flight; the restore comment in slotSwitch.ts names it as not covered.
It never opens a panel and loses nothing: one click opens it, and the next chat switch opens it again. Covering it adds one more hold write into slotSwitchOrigin, reopen state the First Principles lane already calls oversized.

@jingchaodev

jingchaodev commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author
  • Keep Side Panel Open adds three store fields across five reducers: rebutted

Same item as on e6f2fec, c89c26a and 35c2bac (issuecomment-6325081032, issuecomment-6327625237, issuecomment-6332448149). The state lives in the store because the panel toggle and the page read activityOpen there: 75 mentions in 16 page files.
chatSlice.sidePanelAlwaysOpen.test.ts has 33 tests over chat entry, a rejected switch, the toggle and the hold, so a later enterActiveSlot or switchSlot change that drops a part fails there. The uncovered race is named in the code comment and in issuecomment-6302171104.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • The opener-list test is the only guard on the choice flag: rebutted

Same note as on c89c26a and 35c2bac (issuecomment-6327626099, issuecomment-6332448878). That test is the intended guard, and it stays: usePanelTabs.test.ts ("counts every exported tab opener as a tab choice") reads every open* function at run time and fails on one it does not classify. An openView caller that leaves automatic off counts as a choice, which errs toward showing what was opened.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Item 7: reopening the panel after a phone or embedded-chat hold is oversized: rebutted

Same item as item 3 on earlier heads, most recently issuecomment-6327627075 (c89c26a) and issuecomment-6332449595 (35c2bac). Reopening only on the next chat entry is the round-trip close that maintainer review 5561373969 asked to fix; review 5561616186 requested changes for it, and maintainer reviews 5589476773 and 5592386728 accept the state.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • No first-time reader has seen the screenshots: rebutted

Same item as on c89c26a and 35c2bac (issuecomment-6327627938, issuecomment-6332450313). A blind read ran on the screenshots, by a reader given only the images; the description's Manual verification section records it. A fork PR cannot push the branch to this repository to run this lane's own read.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Make "Settings → Chat → Sessions" a link: rebutted

Same ask as on earlier heads, most recently issuecomment-6327628798 (c89c26a) and issuecomment-6332451056 (35c2bac). The line names the full path, two clicks away, and a user meets it once. A link means a SettingsLink inside a <Trans> placeholder in all 12 catalogs, which fits a follow-up.

@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 at a951ead. Since 35c2bac this head is a rebase onto current main plus one fix in the PR itself.

What changed: once a show lands on pinned Summary, takePlainPanelShow marks it as landed, and an automatic discovery open (Git without its auto open setting, or Changes or Issues for a new link) now adds or updates its tab without taking the focus from Summary. A tab choice or the end of the show releases it, and with Pin Summary off, before a landing, or for an explicit open, the opened tab takes the focus as before. I read the new openView path and ran sidePanelPinSummary.test.tsx, usePanelTabs.test.ts and chatSlice.sidePanelAlwaysOpen.test.ts on this head: 132 tests pass. This part holds and I have no finding on it.

One should fix, raised by the Opus lane on this head and reproduced locally (inline below): when the first dashboard config read fails, the page reports the setting as off, so a later successful read counts as a fresh turn on and opens a panel the user closed in between. This code is not in the incremental change, but it is new in this PR (main has no Keep Side Panel Open), so it needs a fix or a reasoned answer on this head.

The earlier request for changes from another reviewer asked for the companion return fix, which landed on 60e4af0 and is unchanged here. That reviewer should check this head and clear or restate it.

Not approving yet: the Opus review check fails on this head, Backend Tests, Frontend Tests and E2E are still running, readiness says action required, and the other reviewer's request for changes is still open.

@jingchaodev

Copy link
Copy Markdown
Contributor Author

Fix pushed for the Opus 5.5 blocker on a951ead (span fd4b61fc6f7a), rebased onto main 88d73a8. CI on a951ead otherwise finished green (87 passed, 0 other failures). The new runs need maintainer approval.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • A failed first config read makes a later answer look like a turn-on (span=fd4b61fc6f7a): fixed in 9c2b14cbf59d155b80b54ba06b0dab71e8ddde86

The Keep Side Panel Open effect gated on main's autoOpenGitPanelKnown, which counts a failed read as known for the Git tab's marker, so the page reported off and a later answer opened the panel. It now gates on its own sidePanelAlwaysOpenKnown = appPanelCfg !== undefined (pageEnvironment.ts): a pending or failed read reports nothing, the store's copy stays null, and a toggle made first still keeps the answer from opening the panel.
Main's Git flag and the reducer are unchanged. Two ChatPage.gitPanelGate.test.tsx tests cover a failed first read with and without a toggle; making the flag count a failed read again fails both.

@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 at 9c2b14c. Since a951ead this head is a rebase onto current main plus the fix for the earlier finding.

What changed: Keep Side Panel Open now reports to the store only when the dashboard config read has returned data (sidePanelAlwaysOpenKnown = appPanelCfg !== undefined). A pending or failed read reports nothing, so the store's copy of the setting stays null, a toggle made in the meantime still marks it, and a later successful read no longer counts as a fresh turn on. The Git tab keeps its own autoOpenGitPanelKnown, which still treats a failed read as known, as on main. A failed refetch keeps the data it had, so it still counts as known, which is correct.

Verified on this head: the two new tests in ChatPage.gitPanelGate.test.tsx (failed first read with a toggle stays closed; failed first read without a toggle opens on the refetch) pass, and both fail when I put the old gate back. ChatPage.gitPanelGate.test.tsx, chatSlice.sidePanelAlwaysOpen.test.ts, sidePanelPinSummary.test.tsx and usePanelTabs.test.ts pass together (155 tests), and the website type check is clean. My earlier inline finding is resolved and I have no new one.

Not approving yet: the AI review lanes have not rerun on this head (the Opus BLOCK shown is still for a951ead and is the issue fixed here), CI is still running, readiness says action required, and the other reviewer's request for changes is still open. That reviewer's ask (the companion return fix) landed on 60e4af0 and is unchanged, so they should check this head and clear or restate it.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • A phone hold starting mid-switch drops the origin's reopen (span=35334f559888): rebutted

Same span as on e6f2fec, 35c2bac and a951ead (issuecomment-6325079988, issuecomment-6332447398, issuecomment-6332967004), downgraded LOW by the Opus adjudication on each head. It needs a resize across the phone breakpoint while one 404'ing chat read is in flight; the restore comment in slotSwitch.ts names it as not covered.
It never opens a panel and loses nothing: one click opens it, and the next chat switch opens it again. Covering it adds one more hold write into slotSwitchOrigin, reopen state the First Principles lane already calls oversized.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Nine review screenshots committed under temp-screenshots/: rebutted

Same note as on e6f2fec (issuecomment-6325088518). This is a fork PR: gh --attach needs push access to the base repository, so committed bytes are how the evidence reaches the review lanes. The description shows all nine through raw URLs pinned to the head commit, and nothing in the product reads them.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Keep Side Panel Open keeps its hold and reopen state in the store: rebutted

Same item as on c89c26a, 35c2bac and a951ead (issuecomment-6327625237, issuecomment-6332448149, issuecomment-6332967858). As the note says, a hold decided when the panel draws needs the toggle to save nothing while the hold is on; the toggle and the page read activityOpen from the store (75 mentions in 16 page files), which is why the hold lives there.
chatSlice.sidePanelAlwaysOpen.test.ts has 33 tests over chat entry, a rejected switch, the toggle and the hold. The uncovered race is named in the code comment and in issuecomment-6302171104.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Every future opener must pass choice or automatic: rebutted

Same note as on 35c2bac and a951ead (issuecomment-6332448878, issuecomment-6332968827). The opener-list test is the intended guard, and it stays: usePanelTabs.test.ts ("counts every exported tab opener as a tab choice") reads every open* function at run time and fails on one it does not classify. An openView caller that leaves automatic off counts as a choice, which errs toward showing what was opened.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Item 5: reopening the panel after a phone or embedded-chat hold is oversized: rebutted

Same item as item 7 on a951ead and item 3 before (issuecomment-6332449595, issuecomment-6332969686). Reopening only on the next chat entry is the round-trip close that maintainer review 5561373969 asked to fix; review 5561616186 requested changes for it, and maintainer reviews 5589476773 and 5592386728 accept the state.
sidePanelAlwaysOpenSetting is not only reopen state: it is how the store tells the setting turning on, which opens the chat on screen, from a hold lifting, and it carries the load gate.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • No blind reader has seen the screenshots: rebutted

Same item as on 35c2bac and a951ead (issuecomment-6332450313, issuecomment-6332970619). A blind read ran on the screenshots, by a reader given only the images; the description's Manual verification section records it. A fork PR cannot push the branch to this repository to run this lane's own read.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Make "Settings → Chat → Sessions" a link: rebutted

Same ask as on earlier heads, most recently issuecomment-6332451056 (35c2bac) and issuecomment-6332971684 (a951ead). The line names the full path, two clicks away, and a user meets it once. A link means a SettingsLink inside a <Trans> placeholder in all 12 catalogs, which fits a follow-up.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Move the phone exception into the row's visible description: rebutted

Same class as on 6fc4c2c and 35c2bac (issuecomment-6277063029, issuecomment-6332451774). Like Auto-Open Git in Side Panel in the same card, the row keeps how it behaves in the ⓘ hint and shows in view only what blocks it, as Pin Summary does for Session summaries.
On a phone the setting does not apply, so the panel keeps its usual behavior there; nothing a phone user sees depends on the rule.

Two opt-in settings under Settings > Chat > Side panel, both off by
default.

Keep Side Panel Open (dashboard.side_panel_always_open) opens the
chat's right side panel whenever the chat page enters a different
chat: a new chat, a switched-to chat and a resumed one. Re-entering
the chat already shown, such as a return to the chat page, keeps a
closed panel closed. Turning the setting on opens the chat on screen,
including when it was turned on in Settings while the chat page was
unmounted: the chat store keeps the setting the full chat page last
reported, and an embedded chat reports none. It saves nothing as the
chat's own open/closed choice, so turning it off puts every chat back
on its saved choice. The full chat page and a popped-out chat window
turn it on; an embedded companion chat and a phone turn it off.
Lifting that phone or embed hold reopens the panel the setting opened,
and opens it for a chat entered during the hold, such as the return
from an artifact companion that switched to its own chat. A panel
toggle, or the setting itself turning off, during the hold keeps it
closed. The chat page reports the setting only once the dashboard
config read has returned it: a pending or failed read reports nothing,
and a toggle before that first report keeps it from opening the panel.

Pin Summary in Side Panel (dashboard.side_panel_pin_summary) pins the
session Summary first in the strip, where it cannot be closed and
leaves the + menu, and lands a plain show of the panel (the toggle, a
chat switch, a reload) on it. The strip store counts tab requests per
chat, a request for the tab already shown included; a tab created for
discovery (Git without its auto-open setting, Changes or Issues for a
new link) is not a request, and after the landing it does not take the
focus from Summary. The chat page ends a show when the panel
closes or its chat changes, a change made on another page included,
so a remount on the same chat, such as the find pane closing, does
not move the tab. It needs session summaries on: while
they are off, its settings row says so in view and names where that
setting lives, and saving that setting refreshes each chat's cached
summary state. Until a chat's
summary read answers, the strip keeps the pinned block it has, and
the landing waits for a read that says on. It is never pinned on a
host that withholds Summary. With Summary pinned, an inactive pinned
tab drops to its icon on a strip narrower than 520px, so all four
pinned tabs stay on screen at the default panel width.

Closes kirodotdev#20944
@jingchaodev

Copy link
Copy Markdown
Contributor Author

Rebased: the PR turned conflicting after main moved (88d73a8 -> 2e648a7, 64 commits). CI and readiness had passed on 9c2b14c; the new runs need maintainer approval.

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

Re-checked at cc01d40.

The only code change since the last review is the side panel test, which now builds the create origin with captureForkOrigin, matching the new move count fields that main added to createSlot. I confirmed the previous version of that test fails on this head and the new one passes, along with the rest of the chat slice suite (34 files, 1030 tests). The generated settings and UI index changes are regeneration over the new base.

Design, UX and First Principles all pass on this head. Nothing new to raise.

Still open before approval: the Opus and GPT reviews and the lint jobs are running, readiness is still checking, and the earlier change request from another maintainer is unresolved and needs their re-review.

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

Approving cc01d40. This also clears our earlier change requests (r110, r113).

Both defects from those rounds are fixed on this head. A phone or embed hold that closes a panel the setting opened now records it and reopens it when the hold lifts (activity.ts#L110-L132). A chat entered during the hold, which covers the companion-return path, opens as well (runState.ts#L245-L249), with tests for both companion paths in ChatPage.gitPanelGate.test.tsx. The failed-first-read case gates on data only (pageEnvironment.ts#L207-L220).

Every lane on this head passes. The one GPT blocker was downgraded LOW: a phone resize during a 404'ing switch can leave the panel closed, one click to reopen. It is rebutted with that reasoning and named in the code comment. Each First Principles, Design and Opus note has a matching disposition. Both settings default to off, and the backend keys follow the existing dashboard-config pattern. CI is green: 100 checks pass or are skipped, plus PR Readiness.

Reviewed head: cc01d40

— crew-pr-reviewer (r121)

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.

Settings to keep the side panel open and pin Summary in it

3 participants