Skip to content

fix(desktop): commit and push from the PR dropdown once a PR is open - #8651

Merged
Kitenite merged 1 commit into
mainfrom
fix-commit-push-after-pr-24894473
Oct 19, 2026
Merged

Kitenite merged 1 commit into
mainfrom
fix-commit-push-after-pr-24894473

Conversation

@Kitenite

@Kitenite Kitenite commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Links

Summary

  • Once a branch has a PR, the PR badge's dropdown in the tab bar now lists Commit and Push above the merge actions, when there is something to commit or push.
  • Commit opens the same message popover used before a PR exists. The bar itself is unchanged.

Why / Context

Before a PR exists, the tab-bar Changes control shows Commit/Push. Once a PR exists, the control becomes the PR badge, and its dropdown only had merge actions and links. A user who opens the PR first and then makes review changes had no way to commit or push from the UI and had to run git commit in a terminal.

How It Works

  • PRStatusGroup reads branch sync status from the pr-exists flow state: hasUncommitted → Commit, no upstream or pushCount > 0 → Push.
  • Actions come from the existing useShipActions hook (with its PR-creation queries turned off) and CommitForm.
  • The commit popover opens from the menu's onCloseAutoFocus, the same pattern ShipControl uses, because a popover opened on item click loses focus to the closing menu and closes itself.
  • The chevron shows the spinner and is disabled while a commit or push runs, as it already did for merge.
  • The pane-area variant is left as it was (it never showed ship actions before a PR either).

Manual QA Checklist

Verified in the dev app over CDP against a real PR (#8609, throwaway worktree, nothing pushed). Screenshots on the page linked above.

  • PR open + uncommitted changes: dropdown shows Commit above Merge
  • Commit item opens the message popover with the textarea focused; ⌘↵ committed and closed the popover
  • PR open + unpushed commits: dropdown shows Push instead of Commit
  • PR open + unpushed commits + new edits: Commit and Push both shown
  • PR open, nothing to commit or push: menu is the same as on main
  • Closed bar is the same as on main in every state
  • No-PR branch: control unchanged (screenshot byte-identical to main)
  • Push clicked for real (not done, to avoid pushing to someone's PR; it calls the same push mutation as the pre-PR Push button)

Testing

  • tsc --noEmit in apps/desktop: no errors in the changed file. The run is red on unrelated better-auth type errors in packages/auth, packages/trpc, and auth-session readers, the same set as on this base.
  • biome check on the changed file
  • bun run check:i18n: no new messages (Commit, Push already exist)

Known Limitations

  • The bar gives no hint that the dropdown has Commit/Push in it. A small dot on the chevron is an option if this turns out to be hard to find.

Summary by cubic

Adds Commit and Push to the PR badge dropdown in the tab bar so review changes made after opening a PR can be committed and pushed from the UI instead of a terminal.

  • Commit and Push appear only when there are uncommitted changes or commits the remote doesn't have yet.
  • Commit opens the same message popover used before a PR exists.

Written for commit f0d4558. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • New Features
    • Added commit and push actions for pull requests with an eligible workspace sync state.
    • The pull request menu now reflects commit and push activity as busy states.

Once a branch had a pull request, the tab-bar Changes control showed only
the PR badge, so review changes made after opening the PR needed a manual
`git commit`/`git push` in a terminal. The PR badge's dropdown now lists
Commit (uncommitted changes) and Push (commits the remote doesn't have)
above the merge actions. Commit opens the same message popover used before
a PR exists. The bar itself is unchanged.
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c19d6fcc-4c16-4c6b-af2f-869641965f51
📥 Commits

Reviewing files that changed from the base of the PR and between 5968679 and f0d4558.

📒 Files selected for processing: 1
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/ChangesControl/components/PRStatusGroup/PRStatusGroup.tsx

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

📝 Walkthrough

PRStatusGroup adds Commit and Push actions for eligible workspace sync states. Commit opens a CommitForm popover after the dropdown closes. The menu and its trigger show a busy state during commit and push actions, as well as merge and mark-ready operations.

Changes: PR status actions

Layer / File(s) Summary
Action eligibility and wiring
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/ChangesControl/components/PRStatusGroup/PRStatusGroup.tsx
The component derives commit eligibility from uncommitted changes and push eligibility from upstream and push-count state. It wires useShipActions and initializes the commit-form state.
Menu actions and commit popover
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/ChangesControl/components/PRStatusGroup/PRStatusGroup.tsx
The menu adds eligible Commit and Push actions. Selecting Commit opens CommitForm after the dropdown closes. Commit and push activity now contribute to the busy state.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: avipeltz

Merge Risk: ⚪ Minimal · up to f0d45

The PR adds Commit and Push to the PR dropdown when changes need committing or pushing. No concrete defect was identified, so merge risk is minimal.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding commit and push actions to the PR dropdown. It follows the required conventional commit format.
Description check Passed The description explains what changed, why it changed, how it works, and how it was tested. It includes manual QA results and known limitations. It does not use the template headings exactly and does …
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
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.
Full details: Description check

Explanation

The description explains what changed, why it changed, how it works, and how it was tested. It includes manual QA results and known limitations. It does not use the template headings exactly and does not include the repository checklist, but the required substantive information is present.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@greptile-apps

greptile-apps Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds Commit and Push to the tab-bar PR dropdown when the branch has local changes or unpushed commits.

  • PR dropdowns offer Commit and Push when branch work is pending.

No actionable issues found. Static review only; no runtime verification was performed. The diff whitespace check passed.

Acknowledged limitation: Kitenite notes that the closed dropdown gives no hint that Commit or Push is available. A visual hint is deferred unless users have trouble finding these actions.

Reviews (1) · Last reviewed commit: "fix(desktop): commit and push from the P..." · Reviewed by Greptile

Copy link
Copy Markdown
Contributor

Review verdict: minor issues. The approach is correct. I tested it in the dev desktop over CDP against this PR, linked through a throwaway workspace. Commit, Push, and Commit + Push all show in the right states. The commit popover opens with focus in the textarea, and Ctrl+Enter commits. A real Push to a local bare remote worked, and the chevron shows the spinner during the push. CI is green at f0d4558c.

Findings:

  • Minor, PRStatusGroup.tsx:270: with the commit form open, a hover on the badge opens the PR hover card on top of the form (reproduced, screenshot on the page). Fix: keep the HoverCard closed while isCommitFormOpen is true.
  • Minor, PRStatusGroup.tsx:172: Commit/Push also show on merged and closed PRs, where a push goes to a branch that no open PR shows. Fix: limit to open/queued PRs, or confirm that this is intentional.
  • Nit, PRStatusGroup.tsx:320: during a commit or push, the chevron's aria-label still says "Open pull request options" (it changes only for a merge).
  • Nit, PRStatusGroup.tsx:340: the onCloseAutoFocus deferred-open logic is now copied from ShipControl. Extract it if a third copy appears.

Full report with screenshots: https://app.superset.sh/page/pr-8651-review-commit-and-push-from-pr-dropdown-5u42so

@Kitenite
Kitenite merged commit ae14c4f into main Oct 19, 2026
17 checks passed
Kitenite added a commit that referenced this pull request Oct 21, 2026
* docs: weekly update 2026-10-21

#8651 PR dropdown Commit/Push, #8656 PR link click modifiers (diff-viewer), #8658 close-warning setting (terminal-integration), #8629 archive per-id report (cli-reference).

* docs: fold PR click behavior into pull-requests, restructure Changes control

This branch was previously deployed

1 inactive deployment
preview — f0d4558c Deployed Oct 19, 2026 by Kitenite via Deploy Docs #12224
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.

2 participants