Repository navigation
Close worktree ready notification when its workspace opens - #28238
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
ELI5
Opening a newly created worktree now closes its “is ready” notification automatically.
What Changed
Previously, selecting the worktree in the sidebar left the persistent notification covering the screen. The notification now watches the existing navigation state and dismisses itself once its workspace is displayed on the host that created it. Dismissal rechecks the settled state so an intermediate switch from Tasks cannot close the wrong notification. Notifications for other workspaces remain available. Closing the notification or using its button releases the listener, and a late notification is skipped when the workspace is already open.
Why
Once you have opened the worktree, the notification has done its job. Watching the existing navigation state covers every route into the workspace without adding dismissal logic to each navigation control. It preserves the persistent reminder while you are elsewhere.
Linked Issue
Requested directly by a maintainer; no linked issue.
Visual Proof
Captured from this worktree's hidden Electron renderer through Playwright CDP on macOS. Both screenshots show the same worktree after selecting it in the sidebar. The ready notification was invoked directly to reproduce a background creation completing.
Before: the notification remains after opening the worktree.
After: opening the worktree dismisses the notification.
Testing
I manually tested these changes locally
Automated tests added/updated
ORCA_BACKGROUND_LAUNCH=1 pnpm test src/renderer/src/lib/worktree-creation src/renderer/src/store/slices/worktrees-create-base-status.test.ts— 123 tests pass across 16 files.ORCA_BACKGROUND_LAUNCH=1 pnpm tc:web— passes.pnpm run check:code-quality:changed— passes, including the design system gate.Commit hooks: lint, React Doctor rules, and formatting pass.
macOS Electron CDP: reproduced the original bug, selected the target through the sidebar, asserted the notification disappeared, and inspected before/after screenshots. Also exercised Tasks → unrelated workspace (notification stays) and “Go to worktree” (target opens and notification closes).
Unit coverage includes unrelated workspaces, multiple notifications, folder workspace wording/dismissal, equivalent remote Windows paths, same-ID workspaces on different hosts, paired response host mapping, nested SSH ownership, legacy rows without a host, host-qualified button navigation, another app view, transient navigation updates, the pending creation panel, already-open workspaces, and listener cleanup including queued callbacks.
Review
Adversarial sub-agent review reproduced issues in host collisions, intermediate navigation updates, paired response host mapping, and legacy rows without a host. All were fixed and covered with regression tests. The final independent review reports no remaining findings (27 toast/creation-flow tests pass). No new IPC or host operations.
Agent skill upstream boundary
Notes
The change is renderer navigation policy and uses the existing workspace identity comparison. No platform-specific APIs, shortcuts, paths, or remote protocol changes. Linux, Windows, live SSH, and mobile were not exercised locally. Full lint, typecheck, test suite, and production build are left to CI; the dev Electron build and focused checks passed locally.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)