Skip to content

Show repo icons on compact worktree cards - #5673

Merged
brennanb2025 merged 4 commits into
mainfrom
brennanb2025/fix-square-badge
Jun 18, 2026
Merged

brennanb2025 merged 4 commits into
mainfrom
brennanb2025/fix-square-badge

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Unified the compact inline repo cue with pinned worktree cards by rendering RepoIdentityChip + RepoIconGlyph in the compact title row.
  • Preserved the existing visibility gates for pinned cards, compact inline mixed-repo cues, folder workspaces, hideRepoBadge, and detailed metadata row repo badges.
  • Left sorting, grouping, activation, drag/drop, SSH state, metadata fetching, provider behavior, and agent-facing text untouched.

Design Review

  • Scratch design doc: design-docs/unify-compact-repo-icon-chip.md (ignored, not included in the PR diff).
  • auto-design-review-fix completed 3 iterations and returned clean.
  • Review tightened hover/focus/accessibility parity, component role boundaries, data-flow cases, hideRepoBadge behavior, and image-backed icon behavior.

Implementation

  • Changed only src/renderer/src/components/sidebar/WorktreeCard.tsx.
  • Replaced the compact inline RepoBadgeMark render branch with the same RepoIconGlyph props used by pinned cards.
  • No deviations from the reviewed design.

Completeness Verification

  • Read-only verification confirmed every design requirement and edge case is covered.
  • Verified detailed metadata row still uses RepoBadgeMark, SSH indicator remains separate, hideRepoBadge and pinned de-dupe are preserved, and empty icons still fall back through RepoIconGlyph.

Code Review

  • Round 1 ran two independent review-code reviewers in parallel.
  • Reviewer A: No issues found.
  • Reviewer B: No issues found. It also ran a focused pinned-repo-icon test pass; 2 tests passed.
  • No unresolved actionable findings remain.

Brennan Test Changes

Verdict: land.

  • Launched Electron from this exact worktree and verified identity returned branch brennanb2025/fix-square-badge with dev root /Users/thebr/orca/workspaces/orca/tang.
  • Used demo-project; added and removed a temporary disposable repo only to exercise mixed-repo status grouping.
  • Observed compact cards with experimental new card style, status grouping, and mixed repos.
  • Verified real DOM rows rendered 16x16 Project ... chips with the RepoIdentityChip shell and repo icon glyphs.
  • Clicked a rendered demo-project row and confirmed normal selection behavior.
  • Screenshot captured locally at .playwright-cli/worktree-card-inline-repo-chip.png and not committed.
  • brennan-test-ssh was not required because this is renderer-only UI and does not touch SSH, runtime RPC, remote PTY, relay, provider/auth, or git transport behavior.
  • Cleanup restored settings/state as far as the live app allowed, removed the temp repo and directory, closed Playwright, stopped the Electron process started for validation, and confirmed the dev ports were no longer listening.

Checks

  • pnpm exec oxlint src/renderer/src/components/sidebar/WorktreeCard.tsx passed.
  • pnpm run typecheck:web passed.
  • git diff --check -- src/renderer/src/components/sidebar/WorktreeCard.tsx passed.
  • Pre-commit hooks passed: oxlint, react-doctor lint, and oxfmt on the touched file.
  • pnpm run typecheck passed.
  • pnpm run lint passed, with one unrelated existing warning in src/renderer/src/components/right-sidebar/SourceControl.tsx:1345.
  • git diff --check passed.
  • Focused tests passed: WorktreeCard.pinned-repo-icon.test.tsx and WorktreeCard.compact-hover.test.tsx, 16 tests total.

Assumptions / Risks

  • The detailed metadata repo badge intentionally remains a square color mark plus label because it has a different role from the title-row repo identity chip.
  • Existing image-backed repo icon behavior is reused; no new icon fetch or metadata lookup policy is introduced.
  • Electron cleanup produced transient unrelated "unknown repository" PR-refresh errors after removing the temporary repo; target UI validation had 0 console errors.

Made with Orca 🐋


Open in Stage

@ghost

ghost commented Jun 18, 2026 •

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 3 individual chapters for you:

Title
1 Extract resource usage merge types
2 Extract support search entries to separate file
3 Unify repo icons on compact worktree cards
Open in Stage

Chapters generated by Stage for commit e519883 on Jun 18, 2026 4:48am UTC.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1aec291c-c6b6-4865-ae25-0890b073a07e

📥 Commits

Reviewing files that changed from the base of the PR and between 80b95e8 and e519883.

📒 Files selected for processing (1)
  • src/renderer/src/components/status-bar/resource-usage-merge-types.ts
✅ Files skipped from review due to trivial changes (1)
  • src/renderer/src/components/status-bar/resource-usage-merge-types.ts

📝 Walkthrough

Walkthrough

In WorktreeCard, the inline repository badge rendered inside the RepoIdentityChip when showInlineRepoBadge is true has been changed. The RepoBadgeMark component is replaced with RepoIconGlyph, which receives its color prop from resolveRepoHeaderColor(repo.badgeColor) and retains the same sizing classes as before. Additionally, the PR extracts six type definitions (Metric, DaemonSession, UnifiedSessionRow, UnifiedWorktreeRow, UnifiedProjectGroup, and MergeContext) from mergeSnapshotAndSessions.ts into a new dedicated resource-usage-merge-types.ts module. All consumers—including ResourceUsageStatusSegment.tsx and the test file—are updated to import types from the new module while retaining function imports from their original location. Separately, the support search catalog entry is moved from general-search.ts to a new general-support-search.ts module, with general-search.ts re-exporting the function.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is comprehensive but missing the required Screenshots, Testing checklist, AI Review Report, and Security Audit sections from the template. Add the missing template sections: Screenshots (with visual changes or 'No visual change' noted), Testing checklist with pnpm commands, AI Review Report with cross-platform compatibility verification, and Security Audit summary.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding repository icons to compact worktree cards, which is the primary modification in WorktreeCard.tsx.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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 and usage tips.

@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: Pro

Run ID: 0546f653-e8a1-4ffb-8c4f-f9b3fcc32d3a

📥 Commits

Reviewing files that changed from the base of the PR and between 46cc235 and 17c10da.

📒 Files selected for processing (4)
  • src/renderer/src/components/status-bar/ResourceUsageStatusSegment.tsx
  • src/renderer/src/components/status-bar/mergeSnapshotAndSessions.test.ts
  • src/renderer/src/components/status-bar/mergeSnapshotAndSessions.ts
  • src/renderer/src/components/status-bar/resource-usage-merge-types.ts

@brennanb2025
brennanb2025 merged commit 4a3ec02 into main Jun 18, 2026
1 check passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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