Skip to content

feat(dashboard): a default sidebar folder for new chats - #21999

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
Pearcekieser:feat/default-session-folder
Oct 20, 2026
Merged

bolichen97 merged 1 commit into
kirodotdev:mainfrom
Pearcekieser:feat/default-session-folder

Conversation

@Pearcekieser

@Pearcekieser Pearcekieser commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Per-project, per-agent or per-channel defaults.
  • Moving existing sessions into the folder.
  • Changing where apps, crons, channels, agents (session_create), forks or worktree chats put their sessions.
  • Changing what Default Project or New Session Folders do.

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 as optionText. 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/slots honours default_folder: true only 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 nearest default_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/config accepts 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 through ErrorNotice. The empty page now reports a failed create too.

Area Files
Config key and loader coercion 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.json
Resolution, create route, settings route src/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.py
Docs and generated indexes docs/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.ts
Create request website/src/api/client/chat.ts, website/src/store/chat/lifecycle.ts
New entry points that opt in website/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.ts
Cleanup keeps the default src/kiro_crew/dashboard/chat_folder_cleanup.py (default_session_folder_ids), test/test_chat_folder_cleanup.py
Settings row website/src/pages/settings/DefaultSessionFolderSetting.tsx, website/src/pages/settings/ChatPanel.tsx, website/src/pages/chat/ChatSettings.tsx
Strings in all 12 languages plus the pseudolocale website/src/i18n/locales/*.json

Backwards 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: which createSlot calls 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_id wins; 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:

two settings

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.tsx pins ['None (unfiled)', 'Work', 'Work (2)']:

picker open

A deleted default, and the folder list failing to load with the agent hand-off and Retry (forced in the pod with HTTP 500):

deleted folder

folders load failed

A failed save in Settings, forced with HTTP 500 on the PUT; the picker keeps the stored value:

save failed settings

The empty chat page after the last chat is closed, with Start a new chat failing (forced with HTTP 503 on the create):

empty create failed

Related Issues

Closes #21934

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

@Pearcekieser
Pearcekieser requested review from a team and KiroCrewCaptain as code owners October 19, 2026 00:31
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Oct 19, 2026
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

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 defaultFolder: false.

Two findings were not changed:

  1. Folder deleted between resolution and filing (GPT, Medium). slot_create.py reads the default folder's default_agent under the folder-store lock, then _unhide_folder re-checks the folder under the lock before filing. If the folder is deleted in that gap, the chat lands unfiled but keeps the folder's agent. The window is the few awaits between the two locked reads. The agent it keeps is the one the person pinned to the folder they chose as their default, so the chat runs with an agent they selected for new chats. No data is lost and the session is ordinary.

  2. An app-owned folder named as the default reads "Deleted folder" in Settings (Opus, Low). PUT /api/dashboard/config refuses an app's or member's folder (invalid_default_session_folder), and the create route ignores one too, so this state is reachable only by editing config.json by hand. The label is accurate about the effect: new chats go unfiled, and the row says so.

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

Copy link
Copy Markdown
Contributor

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, ui-index.generated.json. Please rebase and regenerate that file, then the lanes can run.

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:

  1. website/src/i18n/locales/fr.json changes two existing lesson strings that this feature does not touch. The narrow no-break space before the colon is removed from "saved" and "updated". French typography needs that space. Please restore the two lines from main.
  2. docs/system-specs/modules/learn-cron-dashboard.md (Chat Folders) still says the folder agent walk is frontend-only and that an agent-less create falls through to the global default. nearest_default_agent adds a server-side walk for the default-folder path. Please update that paragraph in this commit so the spec matches the code.

@Pearcekieser
Pearcekieser force-pushed the feat/default-session-folder branch from fd63b5b to 2fbf7a7 Compare October 20, 2026 10:46
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

@bolichen97 thanks for the read. All three items are in head 2fbf7a7, rebased onto current main.

  1. Rebased and regenerated ui-index.generated.json. Main moved several times while this waited for a CI slot, and the 11 translated catalogs also conflicted along the way. Each one is now main's file with only this feature's keys added, so no other line in any catalog differs from main.
  2. The two French lesson strings. My merge script had parsed and re-serialised the JSON, which wrote main's \u202f escape as the raw character, so the lines showed as changed. With the catalogs rebuilt from main's bytes, "saved" and "updated" match main exactly, escape included.
  3. docs/system-specs/modules/learn-cron-dashboard.md, Chat Folders: the paragraph still says the folder-agent walk is frontend-only for a create that names its own folder_id, and now adds that the default-folder path runs default_session_folder.nearest_default_agent on the server under the folder-store lock, with the same inherit rule and an agent the caller named still winning.

On this head locally: the 29 backend tests in test/test_default_session_folder.py, tsc -p tsconfig.app.json, gen:ui --check, i18n:check, and 137 frontend tests including the i18n style suites pass.

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

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

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.json now carries a regenerated digest on top of current main.
  • The unrelated fr.json edits (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.md now describes the server side default_session_folder path and the nearest default_agent walk, 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.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — 🟡 CONCERNS

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

UX-Verdict: CONCERNS

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

  • Same-name folders are still a guess. For two folders that share a path, the code builds the label `${o.path} (${n})`, with the number taken from sort order. So a user sees "Work" and "Work (2)" but cannot tell which is the one they file into. Attachment-02 already shows two identical "Work" and "Work › Inbox" rows, and the description says that capture was taken before the numbering was added. This only affects people with duplicate names, but when it does, a wrong guess sends every new chat to the wrong folder until they notice. Smallest fix: add something the user can recognise, such as the parent path or the chat count, or attach a current capture so a reader can judge "(2)".
  • A failed save gives no way to retry. The message "The default folder could not be saved. Try again." (attachment-05) asks the user to act, but nothing is offered to act on. The folder-load error just above it does have a Retry button (attachment-04). To try again, the user has to work out that they should reopen the list and pick the same folder again. Smallest fix: add the same Retry button, wired to re-send the last choice, or reword the message to "Pick the folder again to retry."

Suggestions

  • default_session_folder_hint ("The chat uses the folder's linked project and agent…") is hidden behind the ⓘ icon, and none of the screenshots show it. A chat silently switching to that folder's project and agent is something users need to know before they choose a folder. Move it into the always-visible description, and drop the "it is not a folder on disk" sentence to make room.

[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 .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 removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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

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

First-Principles-Verdict: PASS

The server's new nearest_default_agent walk is a Python copy of the client's resolveFolderAgent. Check that the two agree, because they can drift apart.

Not justified as shipped

  • Item 8 — rides along: "The empty page now reports a failed create too." This is not needed for the Goal, but it is declared and carries no risk.

What this change ships

Inventory (9 items) — 8 justified

Intent: 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.

  1. Settings ▸ Chat ▸ Sessions has a new picker for the default sidebar folder — justified
  2. When a default is set, New, the new-chat shortcut, the palette, the Sessions page's New, the empty page and a first message from the empty composer file the chat into it — justified
  3. A chat filed by default takes that folder's project and nearest agent — justified
  4. If the default folder is gone or its project is missing, the chat is left unfiled instead of refused — justified
  5. Clean up empty folders keeps the default folder and its parents — justified
  6. Saving refuses a folder ID that is missing or belongs to an app — justified
  7. Settings shows a deleted default as its own option with a line explaining it, plus a folder-list failure with Retry — justified
  8. The empty page's Start a new chat now shows an error when the create fails — rides along
  9. New config key dashboard.default_session_folder and new create-request key default_folder — justified

[FIRST-PRINCIPLES-REVIEWED] 648ce85

Description read

[DESCRIPTION-READ] 3fafbf76aa7250fdc12be47562925fd8af23e5fb703006c18a56c4ef75fd9560

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

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

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

Design-Verdict: PASS

Before merge, check that launched in composerSend.ts is false only for a person's own first message, so the Projects, Dev Fleet and Prompts auto-send launches stay unfiled.

[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 .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 20, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 648ce85

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

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

Review details

No findings.
[GPT-REVIEWED] 648ce85

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

Pearcekieser commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

fixed: default applied only at the plain-New entry points

In 2ead006 only the sidebar New (and its incognito and temporary items), the flyout New, the new-chat shortcut, the palette's two New actions, the recents New, the Sessions page's New and the empty-state / composer first message pass defaultFolder: true; every other caller passes nothing.
The phone's New session here is left out on purpose: it files into the open chat's folder, so from an unfiled chat it stays unfiled.

@Pearcekieser

Pearcekieser commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

fixed: opt-out polarity

createSlot now files into the default only when the caller passes defaultFolder: true (lifecycle.ts); a call with no options, a bare agent string or any other option set sends nothing, in 2ead006.
A create path nobody audited now stays unfiled instead of moving into another folder's project.

@Pearcekieser

Pearcekieser commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

fixed: defaultFolder is opt-in on createSlot

Done as suggested in 2ead006: the opt-outs became explicit opt-ins at the New entry points, so a missed caller fails safe (unfiled).

@Pearcekieser

Pearcekieser commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

fixed: hand-patched opt-outs removed

The crew page, agent-template and artifact-send opt-outs are reverted to main in 2ead006; with the default opt-in, a future purpose-built create is safe without touching it.

@Pearcekieser

Pearcekieser commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

fixed: the ?new=1 app launch

useChatPageSessionController.ts's createSlot({ mode, agent: appDraftAgentRef.current }) passes no opt-in, so under the opt-in rule in 2ead006 an app's chat launch stays unfiled with no edit to that file.

@Pearcekieser

Pearcekieser commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

fixed: second folder-ID shape removed

_FOLDER_ID_RE is deleted in 2ead006; the loader keeps a trimmed string and reads a non-string as unset, and create-time resolution against the folder store decides whether it names a folder.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

@bolichen97 thanks for the re-review. The red jobs on 912643 are Backend Tests (3.12, 1) in test_wheel_engine.py, Backend Tests (3.12, 2) in the test_facade_mirror_guards.py 120 s tree scan, and Frontend Tests (3) in CrewDynamicDashboard.remint.test.tsx. This PR touches none of those files. A fork cannot rerun a job ("Must have admin rights"), so could you rerun the failed jobs once run 39455501183 finishes? That keeps the review lanes on this head. If you would rather I push the same tree to rerun everything, say so and I will.

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.
The row's description says what the setting does: where new chats are filed. The tip covers the follow-on effect, which is the same one New chat in folder already has, and a folder without a linked project or default_agent changes nothing beyond placement. Moving it into the description would make the row three sentences in 12 languages. I would rather do that as a follow-up if you want it than churn the catalogs again here.

nitpick (non-blocking): target=ux head=912643137d02 the picker screenshot predates the numbering.
Same answer as on b8003db: the caption says so, and DefaultSessionFolderSetting.test.tsx asserts ['None (unfiled)', 'Work', 'Work (2)'] on the rendered options.

thought (non-blocking): target=ux head=912643137d02 nothing says why a new chat landed in a folder.
The chat appears under that folder in the sidebar, the same as a chat made with New chat in folder, so the placement shows where the person looks next. The cause is one Settings row away, and the setting is off unless the person set it.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Oct 20, 2026
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

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.

@Pearcekieser
Pearcekieser force-pushed the feat/default-session-folder branch from 9126431 to 267c7b4 Compare October 20, 2026 20:11
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention labels Oct 20, 2026
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Replies to the 267c7b4 round. The fix below is in 648ce85.

issue (non-blocking): target=opus head=267c7b4c8806 the Settings picker ignores dashboard.folder_sort.
Fixed. DefaultSessionFolderSetting.tsx now reads useFolderSortMode() and passes the mode to orderFoldersWithPaths, the same as JobForm and the move submenu, with the mode in the useMemo dependencies. Numbered duplicate paths follow the drawn order. New test "orders folders the way the sidebar's folder sort does" sets By name on folders stored Zeta-then-Alpha and expects Alpha first. It fails without the change.

note (non-blocking): target=design head=267c7b4c8806 the Problem section listed the phone's New session button.
Right: the phone's New session here keeps its own placement, as configuration.md says. I removed it from the Problem sentence in the PR body. The code was already correct.

thought (non-blocking): target=first-principles head=267c7b4c8806 nearest_default_agent is a third copy of the parent-chain walk.
_folder_declared_project walks for the project and returns at the first folder with project_dir. nearest_default_agent walks for the agent and returns at the first default_agent. Those two stop at different folders, so one walk cannot replace both without a field argument. New chat in folder takes its agent from the client's resolveFolderAgent, which predates this PR. Merging the three walks into one helper is a refactor across New chat in folder and project resolution, which I would rather do as its own PR than here.

thought (non-blocking): target=ux head=267c7b4c8806 the project and agent effect is only in the info tip.
Same answer as on 912643: I offered moving it into the row's description as a follow-up, so the 12 catalogs change once.

@Pearcekieser
Pearcekieser force-pushed the feat/default-session-folder branch from 267c7b4 to 648ce85 Compare October 20, 2026 21:23
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 20, 2026

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

@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 20, 2026

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

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.

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.

Setting: a default sidebar folder for new chats

2 participants