Repository navigation
feat(sidebar): name the host when a delete batch collides on one id - #15423
Conversation
Two hosts can publish the same worktreeId, so a batch confirmation showed two rows with identical names and paths and nothing to tell them apart. Label each row with its execution host, but only when the batch actually contains a same-id collision — an unconditional chip is noise.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe delete-worktree dialog now builds a host ID-to-label map from sidebar host options and passes it to the target preview. The preview detects duplicate worktree IDs, resolves configured, generated, or unknown host labels, and displays them for colliding batch and single-worktree entries. It also adds accessible list and region metadata. Tests now use Testing Library rendering and cover host-label resolution, collisions, and non-colliding entries. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4abd06f8-8feb-4f6d-bb53-ecaed32b7d1f
📒 Files selected for processing (2)
src/renderer/src/components/sidebar/DeleteWorktreeTargetPreview.test.tsxsrc/renderer/src/components/sidebar/DeleteWorktreeTargetPreview.tsx
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3f68e907-ba2a-4f29-830b-6d3c71256e33
📒 Files selected for processing (4)
src/renderer/src/components/sidebar/DeleteWorktreeDialog.test.tsxsrc/renderer/src/components/sidebar/DeleteWorktreeDialog.tsxsrc/renderer/src/components/sidebar/DeleteWorktreeTargetPreview.test.tsxsrc/renderer/src/components/sidebar/DeleteWorktreeTargetPreview.tsx
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Visual QA — Delete Workspace host qualificationTested aafba98 ( 1. Same-id collision batch — each row shows its own hostTwo targets shared 2. Ordinary mixed-host batch — no host metadataDistinct ids 3. Authentic single-target collision — passesThe live single-row funnel ( Payload observed: Other
|
Review status: land after fixesReviewed and pushed the final scoped fixes at
Validation is clean: 19 focused tests passed with mutation RED confirmed, all requested local typecheck/code-quality/React Doctor/max-lines gates passed, and the final readiness review found zero P0/P1/P2 issues. Electron CDP proof for collision batch, no-collision batch, and authentic single-target behavior is attached in the visual QA comment. All 46 reported PR checks have completed successfully (with e2e intentionally skipped by the change detector), including Node 24/26 matrices and Windows packaging. The PR is mergeable; no merge was performed. |
…upstream merge Upstream stablyai#15277/stablyai#15423 added the same key in the fixture; our prior local fix left a duplicate property causing TS1117 at typecheck. Removing the duplicate restores green build. Co-Authored-By: internal-model
…tablyai#15423) * feat(sidebar): name the host when a delete batch collides on one id Two hosts can publish the same worktreeId, so a batch confirmation showed two rows with identical names and paths and nothing to tell them apart. Label each row with its execution host, but only when the batch actually contains a same-id collision — an unconditional chip is noise. * fix(sidebar): qualify colliding delete targets by saved host * fix(sidebar): preserve delete host collision scope
…tablyai#15423) * feat(sidebar): name the host when a delete batch collides on one id Two hosts can publish the same worktreeId, so a batch confirmation showed two rows with identical names and paths and nothing to tell them apart. Label each row with its execution host, but only when the batch actually contains a same-id collision — an unconditional chip is noise. * fix(sidebar): qualify colliding delete targets by saved host * fix(sidebar): preserve delete host collision scope
…tablyai#15423) * feat(sidebar): name the host when a delete batch collides on one id Two hosts can publish the same worktreeId, so a batch confirmation showed two rows with identical names and paths and nothing to tell them apart. Label each row with its execution host, but only when the batch actually contains a same-id collision — an unconditional chip is noise. * fix(sidebar): qualify colliding delete targets by saved host * fix(sidebar): preserve delete host collision scope



ELI5
If you batch-delete and two of the rows are the same workspace on two different machines, they showed the same name and the same path with nothing to tell them apart. Now each names its machine.
What
DeleteWorktreeTargetPreviewrenders the execution host per row, gated on the batch actually containing a same-id collision. Covers the batch list and the single-target path.The label is deliberately not unconditional — the sidebar's existing pattern only labels rows when hosts are genuinely mixed, and a chip on every row is noise rather than information.
Test
Two cases: a same-id collision names both hosts; a batch of distinct ids shows no host label. Mutation-verified — forcing the collision branch off fails the first.