Skip to content

fix(sidebar): align folder and Git workspace card identities - #44072

Open
jtalborough wants to merge 1 commit into
stablyai:mainfrom
jtalborough:fix/sidebar-workspace-consistency
Open

jtalborough wants to merge 1 commit into
stablyai:mainfrom
jtalborough:fix/sidebar-workspace-consistency

Conversation

@jtalborough

@jtalborough jtalborough commented Nov 18, 2026 •

Copy link
Copy Markdown

ELI5

Folder workspaces and Git worktrees now put their names in the same place. Repository information moves into the details row, and quiet folder workspaces get a folder icon.

What Changed

  • In redesigned cards with the details row enabled, render the repo chip beside the host and branch/path instead of before the title. Preserve pinned-project visibility and existing compact/line layouts.
  • Use a folder glyph for quiet folder workspaces through the existing status slot, retaining sleeping, review, active-attention, VM, and unread precedence.
  • Add an identity variant to the shared truncated label for monospace branch/path metadata, plus mixed-workspace preview fixtures.

Why

Mixed folder/Git lists should have consistent title alignment and recognizable workspace types. Updating the existing card template and status slot keeps the same layout and state handling across top-level and child rows.

Linked Issue

Fixes #44071

Visual Proof

Same synthetic workspaces and 390px fixture width, before and after. No screenshots are committed to the PR.

Theme Before After
Dark Before, dark After, dark
Light Before, light After, light

Testing

  • Manually tested locally: owner-approved installed macOS layout and reproducible component previews, as detailed below.

  • Automated test additions omitted with rationale below; existing affected tests passed.

  • Every added test fails without this change: N/A, no new unit tests.

  • ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --base=upstream/main --maxWorkers=2: all 31 checks passed, including affected unit tests, typechecks, formatting, localization, and design-system checks.

  • ORCA_BACKGROUND_LAUNCH=1 pnpm build:electron-vite: passed.

  • ORCA_BACKGROUND_LAUNCH=1 pnpm fixtures:shot sidebar/WorkspaceSidebarConsistency --theme both: eight previews passed; inspected mixed cards, 280px narrow cards, hidden details, and a long host label.

  • The owner tried and approved the same layout change in an installed macOS 1.4.261 local build. This PR ports it to current upstream main and adapts the typography to the current primitive rules.

  • No new unit tests: this is a presentation change; the fixtures provide reproducible visual checks without assertions on copy or CSS classes.

  • Linux, Windows, and live SSH/mobile sessions were not exercised. Host labels were checked in fixtures; no host routing or platform behavior changes.

Risk

Level: Low. Moving the repo chip reduces space for the branch/path in the metadata row, especially with long host names; existing truncation handles that case. Existing activity/review/unread priority remains in place. No saved-state or protocol changes. A normal revert restores the previous presentation.

AI Disclosure

Prepared with OpenAI Codex using gpt-6-astra, including implementation, validation, and this description. The owner reviewed the installed appearance.

Review

Self-review checked folder and Git rows, nesting, pinned/hidden repo conditions, compact-line behavior, status priority, and light/dark previews at normal and narrow widths.

  • Cross-platform and SSH/remote: renderer-only presentation changes introduce no platform APIs, paths, shortcuts, or host-routing changes. Long host labels were checked in fixtures; Linux, Windows, and live SSH behavior remain untested.
  • Agent, integration, mobile, and backward compatibility: no agent commands, provider-specific behavior, saved-state schema, or client/server protocol changes. Live mobile sessions remain untested.
  • Performance and security: no new store subscriptions, filesystem access, network requests, or credential handling. The implementation reuses the existing card template, status slot, and shared label primitive.

Agent skill upstream boundary

  • Not applicable: no skill-installer source or assets are copied.

Notes

The local install's packaging/signing work is outside this PR; no release version or bundled app files are changed.

Checklist

  • Small and focused, with the user-facing before/after and mechanism explained
  • Risk and revert path stated
  • Before/after screenshots attached
  • Self-reviewed for correctness, security, performance, and UI quality
  • Cross-platform, remote, mobile, and compatibility impact considered; validation limits stated
  • Relevant local lint/typecheck/test gates and Electron build passed
  • Full pnpm lint, pnpm typecheck, pnpm test, and pnpm build coverage: scoped local checks and build:electron-vite passed; full upstream CI still requires maintainer action

@jtalborough
jtalborough marked this pull request as ready for review November 18, 2026 12:59
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

Workspace cards now display a folder label and folder icon in eligible status lanes. New-style cards can show repository chips in the metadata row under specified conditions. The change also adds an identity style variant for truncated sidebar labels and fixture variants for mixed repository and folder workspaces.

Severity of issue fixed: Medium

Merge Risk: Low · up to 7f164

This PR aligns folder and Git workspace cards in the sidebar and adds a folder glyph for quiet folder workspaces. The remaining concern is a minor edge case where a label could miss a tooltip after a style change, and current callers do not trigger it. The merge risk is low.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(sidebar): align folder and Git workspace card identities" matches the main change. The diff aligns folder and Git worktree card identities in the sidebar: the repo chip moves to the det…
Description check Passed The description follows the repository template and fills most sections. It has an ELI5, What Changed, Why, a linked issue (Fixes #44071), Visual Proof with before/after tables, Testing with checkboxe…
Linked Issues check Passed Linked issue #44071 has two coding requirements: (1) the same title position for rows at the same nesting depth when the details row is enabled, and (2) a folder icon for quiet folder workspaces that …
Out of Scope Changes check Passed Changes at head map to the linked issue #44071 scope:
- default-workspace-card.json: repo chip placement and folder/pinned rules for title alignment.
- WorktreeCardStatusSlot.tsx and worktree-card-sta…
Full details: Title check

Explanation

The title "fix(sidebar): align folder and Git workspace card identities" matches the main change. The diff aligns folder and Git worktree card identities in the sidebar: the repo chip moves to the details row, folder workspaces get a folder glyph in the status slot, and the shared truncated label gains an identity variant. The title is specific, short, and uses a conventional commit prefix.

Full details: Description check

Explanation

The description follows the repository template and fills most sections. It has an ELI5, What Changed, Why, a linked issue (Fixes #44071), Visual Proof with before/after tables, Testing with checkboxes and commands, Risk with a level and revert path, AI Disclosure, Review, the upstream boundary checkbox, Notes, and a Checklist. The Visual Proof section uses before/after images as the template requires. Gaps remain: the Testing checklist box for automated tests is checked while the text says no new tests were added, the Risk section gives a level but does not name the riskiest part in a template-specific way beyond the long-host truncation, and the Linked Issue lacks an explicit statement that the linked issue is actually the maintainer-approved one. These gaps are minor and do not make the description largely incomplete.

Full details: Linked Issues check

Explanation

Linked issue #44071 has two coding requirements: (1) the same title position for rows at the same nesting depth when the details row is enabled, and (2) a folder icon for quiet folder workspaces that keeps active, attention, and review indicators.

Requirement 1: Verified at head in default-workspace-card.json. The new variable detailRepo is true for new-style cards with a metadata row, a repository, and a non-folder workspace, when the row is pinned or the repo badge is not hidden. The IdentityBlock renders RepoChip in the metadata row when detailRepo is true. The title-row RepoChip is limited to inlineRepo, which is false when newStyle and metaRow are both true, and to pinnedRepo only when detailRepo is false. Folder workspaces never receive a repo chip before the title. Git and folder rows therefore start their titles in the same place.

Requirement 2: Verified at head in WorktreeCardStatusSlot.tsx. canShowIdentityStatus applies when isFolderWorkspace or hasBranchIdentity is set, the status is quiet (active, done, or inactive), and no review or checks status replaces it. The passive lane then renders Folder for folder workspaces and GitBranch otherwise. Sleeping is checked first, then review and checks, then the identity glyph. Non-quiet statuses (working, needs-you, failed) still use StatusIndicator. VM state returns before the identity glyph. Unread alert overlay is preserved.

Not established: rendered layout, the identity label styling in truncated-sidebar-label.tsx, and the fixture output were not read directly because the diff was unavailable. Visual results rely on the PR's fixture and manual validation claims. No automated unit test covers the new behavior, and the issue does not request one.

Full details: Out of Scope Changes check

Explanation

Changes at head map to the linked issue #44071 scope:

  • default-workspace-card.json: repo chip placement and folder/pinned rules for title alignment.
  • WorktreeCardStatusSlot.tsx and worktree-card-status-lane.tsx: isFolderWorkspace prop and folder glyph in the existing status slot.
  • card-identity-parts.tsx: sidebarLabel uses the new identity variant. This supports the monospace branch/path metadata in the details row.
  • truncated-sidebar-label.tsx: adds the identity variant. This is a shared primitive, but the change is additive and is used by the card identity label.
  • en.json: adds the workspace.kind.folder label used by the folder status text.
  • WorkspaceSidebarConsistency.fixture.tsx: preview fixtures for mixed folder and Git cards. These support visual verification of the listed change.

No change was found that is unrelated to the issue. The fixture and label variant were not read directly because the diff was unavailable. Their connection to the issue rests on the PR summary and the file names.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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

Actionable comments posted: 1

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5bad9a1b-52e4-49d3-98e1-110c2d5a4f2c
Commits

Reviewing files that changed from the base of the PR and between 16bec39 and 7f16454.

Files selected for processing: 7

  • src/renderer/src/components/sidebar/WorkspaceSidebarConsistency.fixture.tsx
  • src/renderer/src/components/sidebar/workspace-card/surface/WorktreeCardStatusSlot.tsx
  • src/renderer/src/components/sidebar/workspace-card/surface/worktree-card-status-lane.tsx
  • src/renderer/src/components/sidebar/workspace-card/template/card-identity-parts.tsx
  • src/renderer/src/components/sidebar/workspace-card/template/default-workspace-card.json
  • src/renderer/src/components/ui/truncated-sidebar-label.tsx
  • src/renderer/src/i18n/locales/en.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

<span
ref={handleRef}
data-slot="truncated-sidebar-label"
className={cn(sidebarLabelVariants({ variant }), className)}

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.

Minor · Functional Correctness · Quick win

Remeasure truncation when variant changes.

If a mounted label switches to identity, the new font can make the same text overflow without changing the span’s box size. The resize observer does not detect that change, and the layout effect only tracks text. The clipped label can then remain without a tooltip until another measurement occurs.

Add variant to the layout effect dependencies. This measures the new style without replacing the observer.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Folder and Git workspace cards use inconsistent title alignment

1 participant