feat(desktop): add path and branch info to workspace header
Merged
KI
1y ago+1039+1039+0123456789012345678901234567890123456789-570-570-012345678901234567890123456789
Summary
- Display worktree path with folder icon in workspace header
- Add searchable branch dropdown with pagination (10 branches per page)
- Show relative time since last commit for each branch (e.g., 2h, 3d)
- Mark checked-out branches as disabled with "(in use)" label
- Sort branches: current first, then checked-out, then by recent commit
- Add
switchBranchtRPC mutation to change branches within worktree - Extract
formatRelativeTimeutility with tests
Test plan
- Verify path displays correctly with folder icon
- Verify branch dropdown shows current branch
- Test search functionality filters branches correctly
- Test "Show more" pagination loads additional branches
- Verify checked-out branches are disabled and show "(in use)"
- Test branch switching works and updates UI
- Run
bun test formatRelativeTimeto verify utility tests pass
🤖 Generated with Claude Code
Summary by CodeRabbit
-
New Features
- Branch switching workflow added (switch branches per worktree) and interactive branch picker with search, pagination, checked-out indicators, and last-commit times.
- Workspace header refreshed: masked path display, clickable "open in app" action, and branch selector moved above the workspace.
-
Tests
- Deterministic test suite added for relative-time formatting.
-
Chores
- Workspace VSCode settings/recommendations cleaned up and .gitignore compacted.
✏️ Tip: You can customize this high-level summary in your review settings.