Repository navigation
fix(sidebar): stop a worktree drag preview from closing the Agent Dashboard - #10531
Merged
Merged
Conversation
…hboard The companion-board mutual-exclusion Effect keyed on `workspaceBoardRenderedOpen`, which is `workspaceBoardOpen || workspaceBoardDragPreviewOpen`. WorktreeList sets the drag preview at the start of every card drag — including a pure reorder within a group that never opens the board — so dragging any card closed the Agent Dashboard drawer, and cancelling the drag never restored it. Key the Effect on `workspaceBoardOpen` so only the user actually opening the board evicts the dashboard. The reciprocal Effect is unchanged.
Contributor
|
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 (2)
📝 WalkthroughWalkthroughThe sidebar now dismisses the agent dashboard only when the workspace board is actively open, rather than during drag-preview rendering. Tests add shared workspace-board mocks, reset them between cases, and verify dashboard retention during previews, dashboard dismissal when the board opens, and workspace-board dismissal when the dashboard opens. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…hboard (stablyai#10531) The companion-board mutual-exclusion Effect keyed on `workspaceBoardRenderedOpen`, which is `workspaceBoardOpen || workspaceBoardDragPreviewOpen`. WorktreeList sets the drag preview at the start of every card drag — including a pure reorder within a group that never opens the board — so dragging any card closed the Agent Dashboard drawer, and cancelling the drag never restored it. Key the Effect on `workspaceBoardOpen` so only the user actually opening the board evicts the dashboard. The reciprocal Effect is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Dragging any worktree card closed the Agent Dashboard drawer, and cancelling the drag never restored it.
The companion-board mutual-exclusion Effect in
src/renderer/src/components/sidebar/index.tsxkeyed onworkspaceBoardRenderedOpen. That flag is not "the workspace board is open" — peruseWorkspaceBoardPanel.ts:149it is:and
WorktreeList.tsx:2791-2799sets the drag preview as soon as any card drag becomes active:That gate is not conditioned on the pointer being over the board, so even a pure reorder within a group — which never opens the board — flipped
workspaceBoardRenderedOpenand evicted the dashboard.Fix
Key the Effect on
workspaceBoardOpen. A transient drag preview is not the user opening the board, so it should not dismiss the other companion board. The reciprocal Effect (agentDashboardDrawerOpen => closeWorkspaceBoard) was already correct and is untouched.Tests
Three tests in
Sidebar.test.tsx, each proven non-vacuous by its own targeted mutation:workspaceBoardRenderedOpen(the bug)All three pass with the fix (
7 passed). Gates:npm run typecheckandnpm run lintboth exit 0.Known trade-off (not papered over)
Both sheets render at identical geometry (
side="left", sameleft/top/bottom/width, both non-modal). With this fix, dragging a card while the dashboard is open now renders the board drag preview over the dashboard for the duration of the drag, where previously the dashboard was destroyed outright. Both terminal states are correct — drop into the board solidifies it and the mutual-exclusion Effect closes the dashboard; cancel clears the preview and the dashboard is still there. Suppressing the preview entirely while the dashboard is open would need a flag threaded intoWorktreeList, which is out of scope for this one-line fix.Verification scope
Static + unit only. The real pointer-drag interaction was not exercised in a running Electron app; the drag-preview call path was verified by reading
flushWorktreePointerDragandhandleWorktreeRowPointerDown, not by driving a live drag.