Repository navigation
feat(source-control): full-row hover, tooltips, and staged discard-all - #1407
Merged
Merged
Conversation
- Section header hover background now spans the entire row instead of clipping around the label. - +/-/undo buttons use the Radix Tooltip component instead of native 'title', matching the rest of the sidebar chrome. - Discard-all (undo) now appears on Staged Changes too; it bulk-unstages before running per-file discard so the index doesn't retain the staged delta after the working tree is reset to HEAD. Co-authored-by: Orca <[email protected]>
…tons Review feedback: - handleRevertAllInArea: wrap bulk unstage in its own try/catch and bail before the per-file discard loop on failure. Otherwise a failed unstage would leave the index carrying the staged delta while the working tree got reset to HEAD, producing phantom inverse 'Changes' rows the user thought they just discarded. - Area-specific undo tooltip: 'Delete all untracked' for the untracked section (since git.discard rm -rf's untracked paths), 'Discard all' elsewhere. The generic label hid how destructive the untracked variant actually is. - ActionButton: drop the native disabled prop. Radix TooltipTrigger on a disabled button gets pointer-events blocked in Chromium, so the Radix tooltip never fires — a regression vs. the native title attribute it replaced. Use aria-disabled + opacity + an onClick guard; the handlers already early-return on isExecutingBulk. Co-authored-by: Orca <[email protected]>
Extract the discard-all filter + sequencing into discard-all-sequence.ts so it can be unit-tested without spinning up the full SourceControl component tree. - getDiscardAllPaths: conflict-filter rules (skips unresolved and resolved_locally entries, mirrors per-row suppression). - runDiscardAllForArea: staged path bulk-unstages before discard; a failed unstage aborts the discard loop so we never leave a stale index + clean worktree (the specific bug the iteration-1 review caught). Also export ActionButton to cover the aria-disabled click guard — the native-disabled -> aria-disabled switch that was needed so Radix tooltips still fire on 'busy' buttons in Chromium. Co-authored-by: Orca <[email protected]>
- Extract throwing `discardSingle` so bulk flows can observe per-file failures; `handleDiscard` stays fire-and-forget for per-row UI. - Aggregate bulk-discard failures into a single toast with the first error message and a sample of failed paths (was console.error only). - Share stage/unstage/discard path filters between visibility checks and handlers via `getStageAllPaths`/`getUnstageAllPaths` so they can't drift silently. - Drop nested `TooltipProvider` in `ActionButton`; rely on the app-root provider so adjacent tooltips skip the open delay. - Hoist the three bulk-action buttons under one reveal wrapper so keyboard focus reveals the whole group (and add `[@media(hover:none)]:opacity-100` for touch/SSH per AGENTS.md). - Narrow `area` inline at call sites to remove `as StageAllArea` + `as unknown as React.MouseEvent` casts. Co-authored-by: Orca <[email protected]>
Merged
2 tasks done
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
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.
Summary
+/-/undobulk-action buttons use the Radix Tooltip component instead of nativetitle, matching the rest of the sidebar chrome. Tooltips read "Stage all", "Unstage all", "Discard all" — and "Delete all untracked" for the untracked variant since that path actually deletes files.git restore --worktree --source=HEADwould leave the staged delta in the index and the file would instantly reappear under "Changes" as the inverse modification. If the bulk unstage fails, the discard loop is skipped so we never end up in that stale-index state.Review feedback applied
bulkUnstagerejection inhandleRevertAllInAreaso a failed unstage bails before the per-file discard loop.ActionButtonusesaria-disabled+ opacity + an onClick guard instead of the nativedisabledprop — RadixTooltipTriggeron a DOM-disabled button gets pointer-events blocked in Chromium and suppresses the tooltip entirely, a regression vs. the nativetitleattribute it replaced.Test plan
tsc -p config/tsconfig.tc.web.jsonpasses.discard-all-sequence.test.ts(11): staged/unstaged/untracked sequencing, bulk-unstage failure aborts the discard loop, conflict filtering (unresolved/resolved_locallyskipped), and the staged-bulk-unstage-before-discard ordering invariant.ActionButton.test.tsx(8): aria-disabled swap, click guardpreventDefault, Radix tooltip content, visual-disabled class toggling.pnpm test src/renderer/src/components/right-sidebar/→ 55/55 pass (46 existing + 9 new).role="tooltip").git status→orca.yamlfully gone from both index and working tree (no phantom inverse row in Changes — the exact bug Fix 1 was designed to prevent).git diff HEAD -- orca.yaml→ empty.Made with Orca 🐋