Repository navigation
feat(dashboard): settings to keep the side panel open and pin Summary - #21007
Conversation
c38f8ed to
8f014e9
Compare
|
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. |
8f014e9 to
81c3e90
Compare
|
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. |
81c3e90 to
67d7e5c
Compare
|
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. |
|
This PR conflicts with main again. Please rebase onto current main. Several open PRs touch Checked: head 67d7e5c is open and GitHub reports it as conflicting with main. |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of 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
[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 |
UX Review (Opus 5.5, fork) — ✅ PASSUX-level review of 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 |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of 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
What this change shipsInventory (10 items) — 8 justifiedIntent: a user wants the side panel open in every chat, with Summary one glance away. ADDITION.
(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 |
GPT 6.1 Review (fork) — ✅ no blocking findings (all downgraded on adjudication)Reviewed 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 detailsBLOCKING -- website/src/store/chat/slotSwitch.ts:803 -- Preserve the origin’s reopen when a phone hold starts mid-switch
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 — rung LOW. The failure needs every one of these at once:
When it happens, A's panel is visibly closed. One toggle reopens it (patch 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. |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. Notes:
[OPUS-REVIEWED] cc01d40 |
67d7e5c to
6fc4c2c
Compare
|
|
|
|
|
|
|
|
|
|
|
|
bolichen97
left a comment
There was a problem hiding this comment.
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.
|
bolichen97
left a comment
There was a problem hiding this comment.
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.
|
|
|
|
|
|
|
|
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
|
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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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)
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
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:
dashboard.side_panel_always_open)dashboard.side_panel_pin_summary)Keep Side Panel Open saves nothing as a chat's own choice. The slot-entry reducers in
store/chat/activity.tsandstore/chat/lifecycle.tsread asidePanelAlwaysOpenflag fromstore/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 savedmc-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.tsxcalls the pinned-block code inpages/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.pyadds both booleans toDashboardConfig,config/loader_builders.pyreads them fromconfig.json, anddashboard/file_api/dashboard_config.pyserves them in the GET and PUT withinvalid_<key>error codes. The strings are in all 12 languages underwebsite/src/i18n.config-baseline.json,settings-registry.generated.json,ui-index.generated.jsonandcommandPalette/settingsRegistry.gen.tsare regenerated. The feature map has a row for each setting, andsession-summary.mddescribes 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.
syncPinnedgains 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:
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=2besidetest_auto_open_git_panel_config.pyandtest_mcp_app_panel_config.py, and all 8 ids green in a shuffled order (seed 8906).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 undertemp-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.
After picking Changes and switching chats, the new chat's panel is open on Summary again:
The + menu while Summary is pinned: Summary is a tab, so it is not in the menu.
Settings → Chat → Side panel with both toggles on, and the Pin Summary hint open:
With Session summaries off, the Pin Summary row names the setting it needs:
More frames: both toggles off (the default), both on, the Keep Side Panel Open hint, and the chat in dark theme
Related Issues
Closes #20944
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.