chore(ui): clean up chrome icon registry and add worktree#359
Conversation
Drop align-right, archive, arrow-down-to-line, chevron-double-right,
chevron-left, collapse, discord, edit-small-2, expand, eye, file-tree,
file-tree-active, fork, github, layout-bottom{,-full,-partial},
layout-left{,-full,-partial}, layout-right{,-full,-partial}, share,
shield, speech-bubble. None of these keys are referenced anywhere in
the app; they were inherited from upstream OpenCode and partially
redrawn during the brand v2 pass (2abc369) but never wired up.
Sync icon.stories.tsx names array to match. icon-registry-rename guard
unaffected (only checks agent rename from #128).
Refs #356.
Replace the v2 file+pencil drawing for new-session / new-session-active with chat-bubble+plus from the v3 imagegen sheet (imagegen-chrome-icons-newsession.png column 1). The chat-bubble form matches Codex / ChatGPT "new chat" convention, and the active variant keeps the bubble identical with a small filled dot in the corner — same "selected" pattern we use for terminal-active / sidebar-active. Tracing pipeline: potrace via icon-trace.mjs with THICK=2 to dilate the strokes so the rendered weight matches the rest of the v2 brand family (brain, agent, prompt). potrace output uses fill-rule="evenodd" so hollow regions render correctly across SVG renderers. Refs #356.
Add a `worktree` key to the chrome icon registry, traced from the v3 imagegen worktree sheet (imagegen-chrome-icons-worktree.png r1c1) with THICK=2 dilate to match the v2 brand stroke weight. The shape combines folder + branch so it reads as "a checked-out working directory on a branch", visually distinct from `branch` (just the fork) and `folder` (no version-control hint). No worktree-active variant is added in this commit; #278 surfaces this inline rather than as a sidebar nav tab. If a nav placement appears later, a paired active variant can be added then. Refs #356, #278.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
🧰 Additional context used🧠 Learnings (6)📓 Common learnings📚 Learning: 2026-04-22T09:32:58.310ZApplied to files:
📚 Learning: 2026-04-23T15:10:26.994ZApplied to files:
📚 Learning: 2026-04-29T04:23:53.138ZApplied to files:
📚 Learning: 2026-04-29T04:31:25.092ZApplied to files:
📚 Learning: 2026-04-23T08:51:04.230ZApplied to files:
🔇 Additional comments (3)
📝 WalkthroughWalkthroughThis PR updates the icon registry by removing approximately 26 unused icon entries from the codebase, replaces the SVG markup for Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 8/10 reviews remaining, refill in 10 minutes and 51 seconds. Comment |
There was a problem hiding this comment.
Code Review
This pull request streamlines the icon library by removing several unused icons and adding a new worktree icon. The review feedback highlights that the SVG paths for the updated new-session icons and the new worktree icon are inconsistent with the project's standard 20x20 grid and stroke width requirements, recommending a redesign of these paths for better consistency across the icon family.
Summary
packages/ui/src/components/icon.tsx(no callers anywhere) and syncicon.stories.tsxnamesarray.new-session/new-session-activeicon pair from the v3 imagegen sheet (chat-bubble + plus, with dot for active) using the THICK=2 trace pipeline so the stroke weight matches the v2 brand family.worktreechrome icon (folder + branch) traced from the v3 worktree sheet so [Feature] Agent session lacks worktree isolation — worktree is a project concept, not a session context #278 can wire it up directly.Why
The chrome icon registry accumulated 26 keys that were inherited from upstream OpenCode but never wired up; they show up in the storybook gallery and as autocomplete noise when designers and agents pick icons, increasing the chance of picking a stale icon. The
new-sessionv2 drawing was a file + pencil shape that read poorly at sidebar size; the chat-bubble + plus form matches Codex / ChatGPT new-chat convention.worktreeis a missing key for #278.Related Issue
#356 (chrome icon cleanup, P2) and prep for #278 (worktree feature).
Human Review Status
Pending.
Review Focus
packages/app/srcandpackages/ui/src; onlyicon.stories.tsxreferenced them.)new-session/new-session-activepaths usefill-rule="evenodd"to ensure hollow-region rendering across all SVG renderers; v2 paths relied on potrace winding alone. If a renderer ever shows the new icons as solid blobs, the fill-rule attribute is the first thing to check.worktreekey sits next tobranchinicon.tsx; visually it combines folder + branch so it's distinct from bothbranchandfolder.Risk Notes
None. Only
packages/uichrome icon registry changes. No data, IPC, packaging, signing, or platform behavior is affected. macOS / Windows runtime impact identical.How To Verify
```text
icon-registry-rename guard test: 3 passed (packages/ui)
typecheck (turbo run typecheck): 8 packages clean
grep for removed keys in packages/app/src + packages/ui/src: only icon.stories.tsx hits, fixed
visual: rendered new-session, new-session-active, worktree at 16/32/96 px in /tmp/*.html, confirmed by maintainer
```
Screenshots or Recordings
Visual comparison HTML files were used during review; no production screenshots since changes are limited to the icon registry and dev surfaces will pick them up automatically.
Summary by CodeRabbit
Release Notes
New Features
worktreeicon for version control operations.Updates