Repository navigation
feat(dashboard): a default sidebar folder for new chats - #21999
Conversation
|
note (non-blocking): local pre-push review on this head, and two findings left as they are Two reviewers ran on the diff before the push, briefed from this repo's codex-review and claude-review contracts. The GPT reviewer ran on gpt-5.6-sol, because gpt-6.1-sol is not served on the local backend, so it is a weaker check than the CI lane. Opus ran on claude-opus-5.5. Five findings were fixed in this head: the Settings save-failure notice now offers the agent hand-off, a failed save from the folder menu now shows in the sidebar's folder-action notice, the row marker is hidden on a folder an app owns, and crew, agent-template and artifact chats pass Two findings were not changed:
|
|
This branch conflicts with main, so the CI and review lanes have not run on fd63b5b. A local merge onto current main conflicts only in the generated UI index, I read the diff at fd63b5b. The design is sound: the server applies the default under the folder-store lock, an explicit folder always wins, and a deleted folder or a missing project leaves the chat unfiled. Two small items for the same push:
|
fd63b5b to
2fbf7a7
Compare
|
@bolichen97 thanks for the read. All three items are in head 2fbf7a7, rebased onto current main.
On this head locally: the 29 backend tests in |
bolichen97
left a comment
There was a problem hiding this comment.
Thanks for the rebase. Re-checked the change since fd63b5b on head 2fbf7a7:
- The conflict is gone: GitHub reports the branch as mergeable, and
ui-index.generated.jsonnow carries a regenerated digest on top of current main. - The unrelated
fr.jsonedits (the lesson saved and updated strings) are no longer in the diff. The locale changes are only the new default folder keys. - The Chat Folders section of
docs/system-specs/modules/learn-cron-dashboard.mdnow describes the server sidedefault_session_folderpath and the nearestdefault_agentwalk, so the spec matches the code.
No new findings on the incremental change. CI and the readiness check are still running on this head, so I am holding approval until readiness passes and the required checks are green.
UX Review (Opus 5.5, fork) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS Two folders with the same path are told apart only by "(2)", which says nothing about which one is which. No first-time reader has seen any of these controls. Watch
Suggestions
[UX-REVIEWED] 648ce85 Description read[DESCRIPTION-READ] 2acd4f75cedc586e72cbb5b3cf2b5aa9e7900d2feb8f8dbf36c53c52291c6bdd That sha256 names everything this verdict read: the PR description, plus the 9 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The server's new Not justified as shipped
What this change shipsInventory (9 items) — 8 justifiedIntent: let a person pick one sidebar folder that new chats go into when no folder is chosen. This is an ADDITION, opt-in and off by default.
[FIRST-PRINCIPLES-REVIEWED] 648ce85 Description read[DESCRIPTION-READ] 3fafbf76aa7250fdc12be47562925fd8af23e5fb703006c18a56c4ef75fd9560 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Before merge, check that [DESIGN-REVIEWED] 648ce85 Description read[DESCRIPTION-READ] 5a59ed84fc2303d6351610d06a80483bad2222ef775760196b34564eea35aaa6 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 |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
|
fixed: default applied only at the plain-New entry points
|
|
fixed: opt-out polarity
|
|
fixed: defaultFolder is opt-in on createSlot
|
|
fixed: hand-patched opt-outs removed
|
|
fixed: the ?new=1 app launch
|
|
fixed: second folder-ID shape removed
|
|
@bolichen97 thanks for the re-review. The red jobs on 912643 are Backend Tests (3.12, 1) in Replies to the UX Review CONCERNS on 912643, all advisory: thought (non-blocking): target=ux head=912643137d02 the project and agent change sits in the info tip. nitpick (non-blocking): target=ux head=912643137d02 the picker screenshot predates the numbering. thought (non-blocking): target=ux head=912643137d02 nothing says why a new chat landed in a folder. |
|
note (non-blocking): Rebased on main, no behaviour change. The only conflict was the generated src/kiro_crew/docs/ui-index.generated.json, which I took from main and regenerated with gen:settings and gen:ui. This push also reruns the three failed jobs on 912643 (test_wheel_engine.py, test_facade_mirror_guards.py, CrewDynamicDashboard.remint.test.tsx), none of which this PR touches. |
9126431 to
267c7b4
Compare
|
Replies to the 267c7b4 round. The fix below is in 648ce85. issue (non-blocking): target=opus head=267c7b4c8806 the Settings picker ignores note (non-blocking): target=design head=267c7b4c8806 the Problem section listed the phone's New session button. thought (non-blocking): target=first-principles head=267c7b4c8806 thought (non-blocking): target=ux head=267c7b4c8806 the project and agent effect is only in the info tip. |
267c7b4 to
648ce85
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Re-reviewed the change since the last rebase, at head 648ce85.
The only new code is the default folder picker in Settings: it now reads the sidebar sort mode through useFolderSortMode() and passes it to orderFoldersWithPaths, with the mode added to the effect dependencies. That matches how the job form and the folder move menu already order folders. The new test (stored order Zeta then Alpha, sort by name expects Alpha first) covers it, and the default custom mode keeps the existing tests on stored order.
No new findings; this still looks good to ship. Holding approval until the remaining gates settle on this head: the readiness check is still running and Backend Tests shards 6, 7 and 8 are in progress.
bolichen97
left a comment
There was a problem hiding this comment.
Approving head 648ce85. Gates checked on this head: readiness label is passed, the required PR Readiness check is green, no failing checks, the Opus and GPT review lanes passed, no merge conflict, base is main, the linked issue is tier T2, and no open change requests. The earlier review findings are addressed on this head.
Problem / Motivation
Goal: Let a person choose one sidebar folder that new chats are filed into when they start a chat without picking a folder.
Every chat started from New, the new-chat shortcut or the command palette lands unfiled. Someone who files most work into one folder has to move each new chat by hand, or open that folder's menu and pick New chat in folder every time. Default Project chooses a new chat's filesystem project; nothing chooses its sidebar folder.
Why it matters
People who keep a working folder lose a drag or a menu trip on every new chat, and chats they forget to move pile up unfiled. An opt-in default removes that step and changes nothing for anyone who does not set it.
Not a goal
session_create), forks or worktree chats put their sessions.What changed (motivation → approach → change)
New chats need a predictable home, and the person must be able to see and undo the choice. I compared a Settings picker, a folder-menu action, remembering the last folder used, and inheriting the open chat's folder. Remembering and inheriting make placement depend on history or on whatever is on screen, so I rejected both. The setting is one persisted folder ID, set in Settings ▸ Chat ▸ Sessions ▸ Default Sidebar Folder for New Chats. An ID survives a rename or a move. An earlier head also offered it from the folder menu with a row marker; review showed that second entry point added a marker readable only on hover and shifted the folder-name alignment, for no reported need, so it is removed.
The default is opt-in. Only the New entry points pass
createSlot({ defaultFolder: true }): the sidebar New and its incognito and temporary items, the flyout New, the new-chat shortcut, the palette's New actions, the Sessions page's New, the empty page's Start a new chat, and the person's own first message from the empty composer. Every other create path sends nothing and stays unfiled. That includes an app's chat launch and the auto-send launches from Projects, Dev Fleet and Prompts (?autoSend=1&newSession=1), which reach the composer's create branch with the prompt asoptionText. A folder or project on the same call still wins.The server applies it, so a deleted folder is judged under the folder-store lock.
POST /api/chat/slotshonoursdefault_folder: trueonly for a fresh unnamed owner-dashboard create with no app, artifact or ephemeral flag. It files the chat into the folder when the folder exists and the person owns it, with that folder's project and nearestdefault_agent, the same as New chat in folder; an explicit agent still wins. A missing folder, or one whose project directory is gone, leaves the chat unfiled. Clean up empty folders keeps the default folder and its parents, since deleting an empty default would leave every later New chat unfiled. It reads the setting fail-closed, like the channel folder names: a degraded config deletes nothing.PUT /api/dashboard/configaccepts only one of the person's folders or empty, and an unchanged value is not re-checked. Settings lists folders by path in the sidebar's folder sort order (numbering two that share a path), keeps a deleted default as its own option with a line saying new chats are unfiled, and reports a failed folder list or save throughErrorNotice. The empty page now reports a failed create too.src/kiro_crew/config/sections_dashboard.py,src/kiro_crew/config/loader_builders.py,src/kiro_crew/config/loader.py(the facade's forwarded-name manifest),config-baseline.jsonsrc/kiro_crew/dashboard/default_session_folder.py,src/kiro_crew/dashboard/chat_api/slot_create.py,src/kiro_crew/dashboard/chat_handlers.py,src/kiro_crew/dashboard/file_api/dashboard_config.py,src/kiro_crew/dashboard/handlers/files.pydocs/system-specs/modules/learn-cron-dashboard.md(the Chat Folders agent-walk paragraph),docs/feature-map/README.md,src/kiro_crew/docs/configuration.md,src/kiro_crew/docs/settings-registry.generated.json,src/kiro_crew/docs/ui-index.generated.json,website/src/components/commandPalette/settingsRegistry.gen.ts,website/scripts/settingsExtract.tswebsite/src/api/client/chat.ts,website/src/store/chat/lifecycle.tswebsite/src/pages/chat-sidebar/create.ts,website/src/pages/chat/page/paneLayout.tsx,website/src/shell/shortcuts/shellKeyboard.ts,website/src/components/commandPalette/paletteActions.ts,website/src/components/commandPalette/providers/actionsProvider.ts,website/src/components/commandPalette/providers/recentsProvider.ts,website/src/pages/SessionsPage.tsx,website/src/pages/chat/page/ChatEmptyState.tsx(also reports a failed create),website/src/pages/chat/page/composerSend.tssrc/kiro_crew/dashboard/chat_folder_cleanup.py(default_session_folder_ids),test/test_chat_folder_cleanup.pywebsite/src/pages/settings/DefaultSessionFolderSetting.tsx,website/src/pages/settings/ChatPanel.tsx,website/src/pages/chat/ChatSettings.tsxwebsite/src/i18n/locales/*.jsonBackwards compatibility
Compatible: the setting defaults to empty, which is today's unfiled behaviour, and the new create-body key is only read when it is
true.Removes nothing: the change adds a config key, a request key and two UI entry points, and every existing create path keeps its current placement.
Tests
test/test_default_session_folder.py: resolution, including an app-owned folder and a cyclic parent chain; config coercion; the create route files a plain create, lets an explicit folder win, leaves named, ephemeral, artifact, non-owner and unasked creates alone, falls back to unfiled for a deleted folder or a missing project, and applies the folder's project and agent; PUT sets, clears, refuses a missing, app-owned or non-string value, and lets an unchanged deleted default through.website/src/store/chatSlice.defaultFolder.test.ts: whichcreateSlotcalls ask for the default.website/src/test/ChatEmptyState.createError.test.tsx: the empty page's Start a new chat asks for the default and shows a failed create.website/src/test/DefaultSessionFolderSetting.test.tsx: the Settings list, numbered duplicate paths, save and clear, the folder-list failure and Retry, and the deleted-folder option.Manual verification
Ran in a throwaway pod. Twelve API checks passed: unset stays unfiled; set; a plain create is filed; an explicit
folder_idwins; a create that does not ask stays unfiled; renaming and moving the folder keeps the default; change; an unknown ID is refused with 400; a deleted default still creates the chat, unfiled; an unchanged deleted value does not block another settings save; clear restores unfiled. In the browser, pressing New filed the chat into the default folder while a create without the opt-in stayed unfiled, and Settings showed the picker, the deleted-folder line and the folder-list failure at 1440 px and 390 px.Screenshots / video
From a throwaway pod on this head's code. Settings row, with the on-disk New Session Folders setting above it for contrast:
The picker opened. This capture predates the numbering of shared paths, so the second "Work" and "Work › Inbox" now read "Work (2)" and "Work › Inbox (2)";
DefaultSessionFolderSetting.test.tsxpins['None (unfiled)', 'Work', 'Work (2)']:A deleted default, and the folder list failing to load with the agent hand-off and Retry (forced in the pod with HTTP 500):
A failed save in Settings, forced with HTTP 500 on the PUT; the picker keeps the stored value:
The empty chat page after the last chat is closed, with Start a new chat failing (forced with HTTP 503 on the create):
Related Issues
Closes #21934
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)