Repository navigation
Add preference to show pinned worktrees in original lists - #6216
Conversation
Co-authored-by: Orca <[email protected]>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: a5915f73-3eb9-467c-8787-328b709e0029
📒 Files selected for processing (23)
src/renderer/src/components/settings/AppearancePane.tsxsrc/renderer/src/components/settings/appearance-sidebar-search.tssrc/renderer/src/components/settings/terminal-search.test.tssrc/renderer/src/components/sidebar/WorktreeList.lineage-child-card.test.tssrc/renderer/src/components/sidebar/WorktreeList.tsxsrc/renderer/src/components/sidebar/host-section-rows.test.tssrc/renderer/src/components/sidebar/host-section-rows.tssrc/renderer/src/components/sidebar/sleep-worktree-flow.test.tssrc/renderer/src/components/sidebar/sleep-worktree-flow.tssrc/renderer/src/components/sidebar/worktree-drag-units.test.tssrc/renderer/src/components/sidebar/worktree-drag-units.tssrc/renderer/src/components/sidebar/worktree-list-groups.test.tssrc/renderer/src/components/sidebar/worktree-list-groups.tssrc/renderer/src/components/sidebar/worktree-list-imported-rows.test.tssrc/renderer/src/components/sidebar/worktree-section-activity.test.tssrc/renderer/src/components/sidebar/worktree-section-activity.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/constants.tssrc/shared/types.ts
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Resolve conflicts from ~1500 commits of main drift: - AppearancePane: take main's refactored section structure; relocate the 'Also show pinned worktrees in their original lists' toggle into AppearanceWindowSidebarSection where main moved the sibling sidebar toggles. - SettingsFormControls: keep main's description-conditional row padding plus the PR's optional className passthrough. - worktree-list-groups.ts: restore main's visiblePinnedRepoIds declaration dropped by the auto-merge (still used by main's external-inbox repo loop). - worktree-list-groups.test.ts: interleaved test blocks reassembled; realign one buildRows call for main's new newExternalWorktreesInboxByRepo parameter. - locale catalogs: keep main's keys, add the pinned-setting strings (all 5). Verified: typecheck:web, localization catalog+coverage, 174 sidebar tests, 57 settings tests, oxlint on touched files — all green.
) * Add setting for pinned worktree group display Co-authored-by: Orca <[email protected]> * Fix pinned worktree host metadata Co-authored-by: Orca <[email protected]> * Polish pinned worktree setting copy Co-authored-by: Orca <[email protected]> * Clarify pinned worktree setting copy Co-authored-by: Orca <[email protected]> * Use original lists in pinned setting copy Co-authored-by: Orca <[email protected]> * Fix pinned sidebar order and render churn * Fix pinned host and inbox placement * Fix worktree host ownership consistency --------- Co-authored-by: Orca <[email protected]>
Summary
Adds a default-off Appearance -> Sidebar setting, Also show pinned worktrees in groups, for users who want pinned worktrees to remain visible in their natural All/Project/Status/PR groups. With the default setting off, pinned worktrees render only in the dedicated Pinned section. With the setting on, pinned worktrees remain in Pinned and also render in their natural groups.
The sidebar logic now threads an explicit pinned-display policy through row construction, active/reveal/navigation behavior, sleep anchoring, host section metadata, activity summaries, drag metadata, and imported-worktree fallback placement so both modes stay internally consistent.
Design Review
.tmp/pinned-worktrees-setting-design.mdand kept out of the product diff.Implementation Notes
showPinnedWorktreesInGroupsto global settings with defaultfalse.single-locationvsduplicate-in-groupspolicy handling for sidebar rows.Worktree.hostIdfor runtime/project-host worktrees and documented the row-key/pinned-row preference contracts.Security Audit
AI Review Report
Completeness Verification
Code Review Loop
Brennan Test Changes
Verdict: land.
Electron validation launched this exact worktree/branch, used a disposable
demo-projecttarget, and exercised the real Settings -> Appearance -> Sidebar switch. Evidence:sectionKey: pinnedandsectionKey: all.settings.showPinnedWorktreesInGroups: truewhen toggled.Screenshots:
/tmp/orca-batfish-validation-20260623-163130/sidebar-setting-off.png/tmp/orca-batfish-validation-20260623-163130/settings-appearance-sidebar-switch-off.png/tmp/orca-batfish-validation-20260623-163130/settings-appearance-sidebar-switch-on.png/tmp/orca-batfish-validation-20260623-163130/sidebar-setting-on.pngAccepted gaps:
Checks
pnpm run lintpnpm run typecheckpnpm run typecheck:webpnpm test src/renderer/src/components/sidebar/worktree-list-groups.test.ts src/renderer/src/components/sidebar/worktree-section-activity.test.ts src/renderer/src/components/sidebar/host-section-rows.test.ts src/renderer/src/components/sidebar/sleep-worktree-flow.test.ts src/renderer/src/components/sidebar/WorktreeList.lineage-child-card.test.ts src/renderer/src/components/sidebar/worktree-list-imported-rows.test.ts src/renderer/src/components/sidebar/worktree-drag-units.test.ts src/renderer/src/components/settings/terminal-search.test.tspnpm test src/renderer/src/components/sidebar/worktree-list-groups.test.ts src/renderer/src/components/sidebar/sleep-worktree-flow.test.ts src/renderer/src/components/sidebar/WorktreeList.lineage-child-card.test.tspnpm test src/renderer/src/components/settings/terminal-search.test.ts, touched-file oxlint,pnpm run verify:localization-catalog,pnpm run verify:localization-coverage,pnpm run typecheck:webgit diff --checkPost-PR Stabilization
Complete.
verifyandtrack-community-prpassed.64a1a6487.Notes