Repository navigation
fix(desktop): commit and push from the PR dropdown once a PR is open - #8651
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds Commit and Push to the tab-bar PR dropdown when the branch has local changes or unpushed commits.
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 |
|
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 Findings:
Full report with screenshots: https://app.superset.sh/page/pr-8651-review-commit-and-push-from-pr-dropdown-5u42so |
Links
Summary
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 commitin a terminal.How It Works
PRStatusGroupreads branch sync status from thepr-existsflow state:hasUncommitted→ Commit, no upstream orpushCount > 0→ Push.useShipActionshook (with its PR-creation queries turned off) andCommitForm.onCloseAutoFocus, the same patternShipControluses, because a popover opened on item click loses focus to the closing menu and closes itself.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.
mainmainin every statemain)pushmutation as the pre-PR Push button)Testing
tsc --noEmitinapps/desktop: no errors in the changed file. The run is red on unrelated better-auth type errors inpackages/auth,packages/trpc, and auth-session readers, the same set as on this base.biome checkon the changed filebun run check:i18n: no new messages (Commit,Pushalready exist)Known Limitations
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.
Written for commit f0d4558. Summary will update on new commits.
Summary by CodeRabbit