🤖 feat: add flat-card sidebar display style - #3747
Conversation
Alternative left sidebar layout selectable in Settings > General and the command palette. Flat mode drops project sections and renders taller workspace cards with the GitHub owner avatar (resolved from the origin remote by a bulk oRPC call with TTL caching), repo name, chat title, and the unchanged status label and actions. The existing age-grouping toggle still applies in flat mode.
… edges Polish pass on the flat sidebar branch: reuse one recency comparator for project sections and the flat list, let flattenWorkspaceTree sort roots, simplify the avatar fallback to component-local state, respect draft visibility in the flat empty state, show current bucket counts on expanded age tiers, and prune repo-info cache entries for removed projects.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37a18827e7
ℹ️ 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: flat cards for sub-agent children created under a sub-project labeled the parent project and fetched the wrong avatar. Reuse resolveEffectiveSectionId so subProjectPath is honored only when configured and inherited through the parent chain, matching the section renderer.
|
@codex review Addressed in 75f96d5: the flat-list builder now resolves the effective sub-project via |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75f96d5860
ℹ️ 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: flat cards were draggable but never received pinnedReorderGroup/onPinnedReorderDrop, so pinned chats lost drag-to-reorder in flat mode. Derive the same group keys as the section renderer (project+section, scratch and multi-project sentinels) and reuse handlePinnedReorderDrop so both layouts share reorder semantics.
|
Codex Review: Didn't find any major issues. Delightful! 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 alternative left sidebar display style: a flat list of taller workspace cards showing the GitHub repo logo (owner avatar), repo name, chat title, and the unchanged status label and actions. The default project-sections style is untouched; the new style is opt-in via Settings > General or the command palette.
Background
Grouping chats by project usually makes sense, but a flat cross-project view keeps the most recent chats in one list. The new style still respects the existing sidebar age-grouping ("Older than") toggle.
Implementation
sidebarDisplayStyle(projects|flat, defaultprojects) is local persisted state likesidebarAgeGrouping, surfaced in Settings > General and as command palette actions.projects.githubRepoInfo): the backend runsgit remote get-url originper configured project (spawn args, 2s timeout), parses GitHub HTTPS/SSH/SCP remotes with a pure tested helper, and returnsRecord<projectPath, { owner, repo, avatarUrl } | null>with a 5 minute in-memory TTL cache and request coalescing. Failures yieldnullper project.https://github.com/{owner}.png?size=64, public even for private repos, no REST rate limits); image bytes rely on the Chromium HTTP cache, with an SVG folder fallback on error or missing identity.ProjectSidebarbranches at the outer collection boundary into a flat renderer that reuses the existing visible-tree, task-group, age-partition, and draft logic;AgentListItemgains a smallflat-cardpresentation variant so selection, keyboard, rename, pin, status, and menu behavior stay shared.compareWorkspacesByRecency).Validation
dev-server-sandboxinstance via agent-browser: default mode unchanged, Settings and palette switching, reload persistence, flat rendering (avatars, fallbacks, status labels, actions menu), card selection/navigation, mobile width (375px) truncation, and project-mode regression pass.Risks
Low for the default path: project-sections rendering is untouched apart from a large JSX re-indent (review with whitespace hidden) and the extracted shared comparator, which preserves ordering semantics. Flat mode is new and opt-in; the main functional risk is ordering/grouping drift in the flat list, bounded by unit tests on the flat-list builder and comparator.
Generated with
mux• Model:anthropic:claude-fable-5• Thinking:xhigh• Cost:$11.75