Skip to content

fix(sidebar): show the project name on ungrouped compact cards - #28890

Merged
brennanb2025 merged 5 commits into
mainfrom
brennanb2025/sta-10383-ungrouped-project-identity
Oct 19, 2026
Merged

brennanb2025 merged 5 commits into
mainfrom
brennanb2025/sta-10383-ungrouped-project-identity

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​25 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​24
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​13 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​7

ELI5

With sidebar grouping turned off, Compact cards and the experimental new card style showed only a small project icon. Unless you had set a different icon on every project, two workspaces both named main looked identical. The project name now sits next to that icon, in small grey lowercase text.

What Changed

Before: Compact layout and Settings → Experimental → New card style showed the workspace name plus a project icon. The project name was only in a tooltip, and the default icon is the same folder for every project without a custom icon. Pinned cards showed the same icon-only chip in every layout. Detailed layout (the default) already printed the project name on the line under the workspace name.

After:

  • On Compact and New card style, when the sidebar is grouped by None, Status or Pull request, the project chip on each card shows the icon plus the project name.
  • Pinned cards show the project name in their chip in every layout (Detailed, Compact, New). The Pinned section mixes projects and has no project header, so this is the only place the project is named there.
  • The name is muted, normal weight and lowercase, like the project name on Detailed cards. A long name truncates, and the tooltip still shows the full name.
  • Group by Project is unchanged: the group header names the project, so cards don't repeat it. Folder workspaces are unchanged.
  • No new setting.

Mechanism: the shared title-row project chip (RepoIdentityChip in worktree-card-header.tsx) now always draws the name next to the icon. Pinned and inline cards both use that chip, so they stay alike. When the chip appears is unchanged. Two comments that described the chip as icon-only were reworded.

Why

People reported that with grouping off, only the workspace or branch name is shown, and that the icon only helps once you have set one up on every project. Pull request #3982 (May 2026) took the visible project name off dense cards, and #5673 (June 2026) replaced the color dot that was left with a per-project icon, which is the same folder unless customised.

Showing the name in the chip those cards already reserve for the project is the smallest fix that works in every mixed-project list. A separate "Project" card property was considered and not used: it would add a setting for something the default Detailed layout already shows automatically. The common pattern also shows a muted project label automatically, on the same line, in lists that mix projects. One intended difference: our label is capped in width so the workspace name stays readable in a narrow sidebar.

Linked Issue

Linear STA-10383. Related reports: tracked in #24304, #13828, #13937.

Visual Proof

Compact, Group by None, before:

Compact cards before, icon only

Compact, Group by None, after:

Compact cards after, project name in the chip

New card style, Group by None, before:

New card style before, icon only

New card style, Group by None, after:

New card style after, project name in the chip

Main vs branch screenshots from the final head are in the review status comment.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

WorktreeCard.pinned-repo-icon.test.tsx checks three cases: a pinned card shows the project name, an ungrouped Compact card shows it, and grouping by project hides it. WorktreeCard.quick-actions, WorktreeCard.host-badge-toggle and card-properties tests pass after the merge with main. Live QA results are in the status comment.

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Author: @BrennanKB5

Phone parity (the phone's Compact row still shows the icon only) is a separate follow-up and not part of this PR.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Compact and new-card layouts kept the project in an icon chip, with the
name only in a tooltip. The chip now shows the project name when the
sidebar is not grouped by project.
@brennanb2025
brennanb2025 marked this pull request as ready for review October 18, 2026 21:57
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0d8a4575-bc1a-4e5b-a488-413826208b37
📥 Commits

Reviewing files that changed from the base of the PR and between 2b02fe1 and f6da35a.

📒 Files selected for processing: 1
  • src/renderer/src/components/sidebar/worktree-card-header.tsx
🚧 Files skipped from review as they are similar to previous changes: 1
  • src/renderer/src/components/sidebar/worktree-card-header.tsx

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

📝 Walkthrough

The repository identity chip now displays the repository icon beside a truncated, lowercase repository name. Its project label remains available through the aria-label and tooltip. Tests check repository-name markup and project labels for pinned and compact cards, including cards rendered with hideRepoBadge. Comments describe the updated repository presentation.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to f6da3

Some Project-grouped workspace rows can show a project name where that grouping was meant to remain unchanged. The change is mergeable with this bounded display issue acknowledged or fixed.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: showing project names on ungrouped compact sidebar cards.
Description check Passed The description is detailed and covers the required user impact, implementation, rationale, issue references, visual proof, testing, scope, and checklist items. The AI Disclosure section is empty, and…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is detailed and covers the required user impact, implementation, rationale, issue references, visual proof, testing, scope, and checklist items. The AI Disclosure section is empty, and the full lint, typecheck, test, and build commands remain unchecked, but these omissions do not prevent the description from being mostly complete.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • 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

Comment @coderabbitai help to get the list of available commands.

@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
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d4768bc1-dda5-473a-808f-b58eba81c5f0
📥 Commits

Reviewing files that changed from the base of the PR and between 4298ba9 and 2b02fe1.

📒 Files selected for processing: 4
  • src/renderer/src/components/sidebar/WorktreeCard.pinned-repo-icon.test.tsx
  • src/renderer/src/components/sidebar/worktree-card-header.tsx
  • src/renderer/src/components/sidebar/worktree-card-presentation.tsx
  • src/shared/worktree/card-properties.ts

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

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review loop status: ready for Brennan's review

Problem. With sidebar grouping off, Compact cards and Settings → Experimental → New card style identified the project only by a small icon. The default icon is the same folder for every project unless someone sets one per project, so two workspaces both named main in different projects looked identical. The name was only in a tooltip. This dates from #3982, which took the name off dense cards, and #5673, which replaced the color dot that was left with that icon.

What changes for users. The project chip on each card now shows the icon plus the project name, in small muted lowercase text matching the project name on Detailed cards:

  • Compact and New card style, when grouped by None, Status or Pull request.
  • Pinned cards in every layout (Detailed, Compact, New), because the Pinned section mixes projects and has no project header.
  • Group by Project, unpinned Detailed cards and folder workspaces are unchanged. No new setting.

Brennan ruled on showing the name by default (the name shows for everyone, no setting), including pinned cards and the muted lowercase style.

Fixed during review

  • Pinning a card used to remove its project name. The chip now always shows the name, so pinned and unpinned chips match.
  • The label was bold full-colour text that outweighed the workspace name, and its casing differed from Detailed cards. It is now muted, normal weight and lowercase.
  • An emoji project icon (for example 🦊) painted over the chip's border. The icon box now uses a font size that keeps emoji inside it. Built-in and image icons are unchanged.
  • Two code comments that called the chip icon-only were reworded.

Deferred (not in this PR)

  • Phone parity: the phone's Compact row still shows the icon only, and on the phone, pinned rows under Group by Project show no project at all (existing). Follow-up candidate.
  • Existing on main: hovering the chip opens its tooltip and the workspace hover card together, and they overlap.
  • Light-theme contrast of the muted 10px text is about 4.1:1. It is the same token already used for other 10px sidebar text.

Verified

  • Review: three rounds (adversarial review plus an architecture challenger, then two narrow re-checks). No open P0 or P1 findings. The one P2 left open is the chip's fixed width in a narrow sidebar, which is the ruled behavior and is listed below for review.
  • Readiness check: no P0 or P1.
  • CI: green on f6da35abf01 (PR checks passed).
  • Unit tests: WorktreeCard.pinned-repo-icon, WorktreeCard.quick-actions, WorktreeCard.host-badge-toggle and card-properties pass.
  • Live QA on macOS (M4Air), a hidden dev build, main vs branch with the same state: four projects each with a workspace named main (one with an emoji icon, one with an image icon, one with a long name). Checked Group by None, Status and Project, Detailed, Compact and New card style, the Pinned section in each layout, and a 220px sidebar. Detailed and Group by Project unpinned cards were pixel-identical to main. The emoji fix was re-checked on f6da35abf01.

Not verified: Windows and Linux live UI (the change is renderer-only, with no platform-specific code), SSH-hosted projects live (the chip uses the display name the host already publishes), and a long workspace name next to a long project name at 220px.

For Brennan's review

Compact, Group by None (four projects, each with a workspace named main)

Main:
Main: Compact cards show only an icon before each main

Branch:
Branch: each chip shows the icon and the project name

New card style, Group by None

Main:
Main: new card style, icon only

Branch:
Branch: new card style, icon and project name

Pinned section, Detailed layout, Group by None

Main:
Main: pinned cards show no project name

Branch:
Branch: pinned cards show the project name in the chip

Pinned section, Compact layout, Group by None (branch):
Branch: pinned compact cards with project names

Emoji and image icons, 6x zoom

Emoji on main:
Main: emoji fills the icon-only chip

Emoji before the fix in this PR, painting over the border:
Before the emoji fix: fox paints over the chip border

Emoji on the final head, inside the chip:
Final head: fox sits inside the chip

Image icon on the final head:
Final head: image icon inside the chip

Sidebar at its 220px minimum width, Compact (branch, taken before the emoji fix; layout is unchanged by it):
Branch at 220px sidebar width

Places where a human judgment matters:

  1. worktree-card-header.tsx chip: the name has a fixed maximum width (96px) and never shrinks, so in a narrow sidebar the workspace name truncates first. Chip widths also differ per project, so workspace names in Compact no longer line up in one column.
  2. Detailed layout, Group by None: pinned cards show the project as a muted chip on the title row, while unpinned cards keep the existing bold pill on the second line. This follows the ruling, but the two styles sit side by side.
  3. Emoji icon size: to keep an emoji project icon inside the chip, it now draws at about 10px, against about 14px on main, and slightly smaller than a 12px image icon. Pinned cards also show the name under Group by Project, because the Pinned section has no project header.

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.

1 participant