🤖 feat: optional flat chat list for the sidebar with project badges - #3994
🤖 feat: optional flat chat list for the sidebar with project badges#3994ibetitsmike wants to merge 17 commits into
Conversation
reorderPinned scoped the re-deal to the first id's project bucket, so a flat-mode drag spanning projects hit the <2 pinned early-return (or only rewrote one bucket) and the optimistic client order reverted on reload. Scope the reorder to the union of buckets referenced by the input ids: grouped drags keep single-bucket behavior, flat drags re-deal the whole unified block's timestamp pool.
- render the project badge on draft rows (prop was threaded but unused) - gate flat-list derivation behind the flag so grouped mode skips the global sort/flatten work - simplify buildSortedWorkspacesFlat to take rows directly (the two-pass config merge reproduced Array.from(map.values()) before a global sort) - dedupe project badge resolution; inline single-use GroupedSidebarSection - drop leftover divide-y padding on the API Debug Logs row - document flat mode in locatePinnedBlock's JSDoc
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6cee23bc30
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- setPinned scans all project buckets for the global pinnedAt max so new pins append at the bottom of the flat unified pinned block - flat collection respects the multi-project experiment gate - project badge props are stable primitives; badge text uses text-secondary for contrast, keeping the project color as a tinted background/border - workspace and draft aria-labels include the project badge name - Storybook shared reset clears SIDEBAR_FLAT_MODE_KEY - flat draft deletion selects an adjacent draft; draft promotion renders the promoted workspace once in the draft's position - extracted one shared coalesced list pipeline so flat mode gets task-group coalescing (best-of + workflow runs) identical to grouped mode
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2866aec8b1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- reorderPinned substitutes requested ids into their existing slots so a partial input (grouped multi-project section spanning buckets) never displaces omitted pins in the flat global order (red-green tested) - flat mode renders compact project management headers below the chat list: per-project new chat, options menu, rename, and color stay reachable via mouse/touch without leaving flat mode - FlatChatList story pins a phone viewport variant plus a play contract that the flat list and headers are actually on screen
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ccb84d8369
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…eriment The flat block in locatePinnedBlock included pins the sidebar hides while the multi-project experiment is off, so keyboard/palette moves could swap with an invisible row and appear to do nothing. The block now mirrors the sidebar's render gate (red-green tested); omitted hidden pins keep their slots server-side via the round-2 slot-preservation fix.
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2155a9c31
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Flat mode renders each project's sub-projects as compact SectionHeader rows under its management header: scoped new chat, rename, color, and delete stay reachable via mouse/touch. SectionHeader's expand toggle is now optional and renders a static folder icon when omitted, since nothing nests under the flat rows (red-green tested).
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0dc30381f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Chats and drafts scoped to a valid sub-project now badge with the sub-project's display name and color (stale references fall back to the parent project), since flat mode drops the section headers that used to convey that scope. Red-green tested.
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9977e7243b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 188deb9821
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66415fa996
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…lobal pin timestamps
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d1b9ec925c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d603e969b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…tory reset, carry drag section identity
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c220bde067
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ba6d29e65
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce39dd80e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f104268ab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Adds an optional flat sidebar mode: a new "Flat chat list" setting replaces the project-folder grouping with one globally sorted list of chats, keeping pinned chats in a single unified block at the top and tagging each root chat card with a project-name badge tinted by the project's folder color. The General settings page is also reorganized from three monolithic headers into logical groups (Appearance, Sidebar, Transcript, Terminal, Archiving, Editor & debugging, Projects).
Background
Users working across many projects lose vertical space and orientation to per-project folders when they mostly care about "all my recent chats". The flat mode drops the folders while badges preserve project attribution; grouped mode stays the default and is unchanged.
Implementation
sidebarFlatModepersists viausePersistedState(key insrc/common/constants/storage.ts, default off) with a command palette toggle for parity with the sibling sidebar options.buildSortedWorkspacesFlat(workspaceFiltering.ts) reuses the existing comparators: pinned roots first in globalpinnedAtorder, then recency with deterministic tie-breakers, then the tree flatten that keeps sub-agents under their parents. Age grouping and hide-sub-agents both compose with flat mode.workspaceService.reorderPinnednow scopes its timestamp re-deal to the union of project buckets referenced by the input ids (grouped drags keep exact single-bucket behavior), fixing cross-project reorders reverting on reload.resolveSectionColorof the project's configured color); scratch chats get no badge, multi-project chats a neutral one, sub-agent rows none.Validation
reorderPinnedcross-bucket test fails without the service change.Risks
reorderPinnedis the only backend touch; scope generalization is covered by new unit tests plus the pre-existing single-bucket suite (defensive contract unchanged).Generated with
xum• Model:anthropic:claude-fable-5• Thinking:xhigh