Skip to content

feat(sidebar): name the host when a delete batch collides on one id - #15423

Merged
brennanb2025 merged 3 commits into
mainfrom
brennanb2025/delete-preview-host-label
Aug 19, 2026
Merged

brennanb2025 merged 3 commits into
mainfrom
brennanb2025/delete-preview-host-label

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​173 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​172
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​92 $\color{#cf222e}{\Huge{\mathbf{−}}}$​11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​81

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

DeleteWorktreeTargetPreview renders 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.

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.
@coderabbitai

coderabbitai Bot commented Aug 19, 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 Plus

Run ID: 31c7e7eb-0240-4c95-90d2-f397454ffde8

📥 Commits

Reviewing files that changed from the base of the PR and between 48fef64 and aafba98.

📒 Files selected for processing (4)
  • src/renderer/src/components/sidebar/DeleteWorktreeDialog.test.tsx
  • src/renderer/src/components/sidebar/DeleteWorktreeDialog.tsx
  • src/renderer/src/components/sidebar/DeleteWorktreeTargetPreview.test.tsx
  • src/renderer/src/components/sidebar/DeleteWorktreeTargetPreview.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The 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)

Check name Status Explanation Resolution
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.
Description check ⚠️ Warning The description explains the change and tests, but omits required sections including Why, Linked Issue, Visual Proof, and checklist details. Add the missing required sections, including the linked issue, visual proof or N/A justification, testing details, review notes, and completed checklist items.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly identifies the main change: naming execution hosts when delete batches contain same-ID collisions.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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.

@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 Plus

Run ID: 4abd06f8-8feb-4f6d-bb53-ecaed32b7d1f

📥 Commits

Reviewing files that changed from the base of the PR and between 1272406 and 8a9b671.

📒 Files selected for processing (2)
  • src/renderer/src/components/sidebar/DeleteWorktreeTargetPreview.test.tsx
  • src/renderer/src/components/sidebar/DeleteWorktreeTargetPreview.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@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 Plus

Run ID: 3f68e907-ba2a-4f29-830b-6d3c71256e33

📥 Commits

Reviewing files that changed from the base of the PR and between 8a9b671 and 48fef64.

📒 Files selected for processing (4)
  • src/renderer/src/components/sidebar/DeleteWorktreeDialog.test.tsx
  • src/renderer/src/components/sidebar/DeleteWorktreeDialog.tsx
  • src/renderer/src/components/sidebar/DeleteWorktreeTargetPreview.test.tsx
  • src/renderer/src/components/sidebar/DeleteWorktreeTargetPreview.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@brennanb2025

brennanb2025 commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Visual QA — Delete Workspace host qualification

Tested aafba98 (brennanb2025/delete-preview-host-label) in an isolated ORCA_DEV_USER_DATA_PATH Electron instance launched from this worktree via config/scripts/run-electron-vite-dev.mjs on a unique CDP port. window.api.app.getIdentity() reported name: "Orca: brennanb2025/delete-preview-host-label", devWorktreeName: "review-15423-host-label", devRepoRoot matching this worktree, devBranch: "brennanb2025/delete-preview-host-label". Fixtures were disposable store/settings state only; the real delete-worktree dialog was opened through runWorktreeBatchDelete / runWorktreeDelete and inspected via Playwright CDP. No confirm/delete was clicked.

1. Same-id collision batch — each row shows its own host

Two targets shared id + display name shared-workspace + path /qa-visual/shared-workspace. Saved SSH label QA Linux vs custom override Studio Mac. Dialog title Delete Workspaces. Each listitem rendered its own host; accessible names were shared-workspace /qa-visual/shared-workspace QA Linux and shared-workspace /qa-visual/shared-workspace Studio Mac (aria-labelledby includes name + path + host).

delete-collision-batch.png

2. Ordinary mixed-host batch — no host metadata

Distinct ids alpha (local) and beta (SSH). Dialog listed only name + path. No QA Linux / Studio Mac / Local Mac in the dialog. Accessible names were alpha /qa-visual/alpha and beta /qa-visual/beta (aria-labelledby is name + path only). Sidebar still showed host chips, so host data existed but was not added to the confirmation rows.

delete-mixed-host-no-collision.png

3. Authentic single-target collision — passes

The live single-row funnel (runWorktreeDelete with one worktreeId + one host-qualified identity, while allWorktrees still held a same-id sibling) now labels the selected host. Dialog title Delete Workspace. One region rendered shared-workspace /qa-visual/shared-workspace QA Linux. The unselected sibling (unselected-sibling / Studio Mac) was not rendered in the dialog. Accessible name: shared-workspace /qa-visual/shared-workspace QA Linux (aria-labelledby includes name + path + host).

Payload observed: worktreeId: "shared-workspace", worktreeDeleteIdentities: [{ id: "shared-workspace", instanceId: "ssh-shared-instance", hostId: "ssh:qa-linux-42" }].

delete-collision-single.png

Other

  • Session console: no dialog/app errors. Pre-existing Tooltip controlled/uncontrolled warnings and React DevTools / React Grab noise only. Fixture-only noise from the disposable fake host: hostedReview:forBranch unknown repository and SSH restore for qa-linux-42 (not a configured target).
  • Uncropped full-window screenshots (1728×994). Inspected before upload; no secrets.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review status: land after fixes

Reviewed and pushed the final scoped fixes at aafba9895e4712f0f0a7655093989aca83acacab. The preview now:

  • shows saved SSH, runtime, and custom host labels only when a workspace ID has a host collision;
  • keeps ordinary distinct-ID rows quiet;
  • covers the authentic single-target funnel while rendering only the selected target;
  • uses one linear collision scan;
  • exposes name, path, and host together in each target's accessible name;
  • uses DOM/caller-level tests instead of raw markup substring checks.

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.

@brennanb2025
brennanb2025 merged commit 73f7767 into main Aug 19, 2026
46 checks passed
penghuizhang added a commit to penghuizhang/orca that referenced this pull request Aug 19, 2026
…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
paidaxingyo666 pushed a commit to paidaxingyo666/Manta that referenced this pull request Aug 21, 2026
…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
dallascrilley pushed a commit to dallascrilley/orca that referenced this pull request Aug 27, 2026
…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
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…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
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