Skip to content

feat(source-control): add Stage Files primary button - #1670

Merged
AmethystLiang merged 1 commit into
mainfrom
show-commit-msg-instead-of-pull
May 10, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
show-commit-msg-instead-of-pull

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented May 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new stage primary action kind to Source Control: when there are unstaged/untracked changes but nothing is staged yet, the primary button shows Stage Files instead of Commit/Push/Sync
  • Clicking it bulk-stages all unstaged + untracked paths in one bulkStage call, so the user lands directly in commit-ready state
  • Dropdown surface is unchanged; stage is intentionally excluded from DropdownActionKind to keep existing dropdown behavior pristine
  • Design doc at docs/source-control-stage-files-primary.md

Test plan

  • Cold path (nothing staged, nothing committed): primary shows "Stage Files"; clicking it stages everything
  • After-click: primary transitions to "Commit" immediately after staging
  • Untracked-only: untracked files are staged correctly
  • Mixed (tracked + untracked): all files staged together
  • Clean repo: "Stage Files" does not appear; normal primary action (Push/Sync/Publish) shown
  • Conflicts: primary shows correct conflict action, not "Stage Files"
  • Dropdown/per-row regression: existing dropdown and per-row stage buttons unaffected

All 7 Electron scenarios validated green.

Made with Orca 🐋

When there are unstaged/untracked changes but nothing staged yet, the
Source Control primary button now reads "Stage Files" and bulk-stages all
unstaged + untracked paths in one shot, so users can immediately hit
Commit on the next click without manually staging first. This replaces
the previous behavior where Pull/Sync/Push/Publish could appear as the
primary on a dirty tree and then fail with "Please commit or stash them".

Co-authored-by: Orca <[email protected]>
@AmethystLiang
AmethystLiang force-pushed the show-commit-msg-instead-of-pull branch from 241bfc0 to e728d4a Compare May 10, 2026 21:45
@AmethystLiang
AmethystLiang merged commit 24c1254 into main May 10, 2026
2 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
When there are unstaged/untracked changes but nothing staged yet, the
Source Control primary button now reads "Stage Files" and bulk-stages all
unstaged + untracked paths in one shot, so users can immediately hit
Commit on the next click without manually staging first. This replaces
the previous behavior where Pull/Sync/Push/Publish could appear as the
primary on a dirty tree and then fail with "Please commit or stash them".

Co-authored-by: Orca <[email protected]>
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