Skip to content

Commit, push and open a PR in one click; sidebar PR badge shows open/merged/closed - #1685

Merged
currentbits merged 1 commit into
mainfrom
coder/one-click-commit-push-pr-chain-with-pr-s-550b36
Oct 19, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/one-click-commit-push-pr-chain-with-pr-s-550b36

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Closes #363. The Git panel can now take uncommitted work all the way to a pull request in one click, and the sidebar shows each thread's PR state at a glance.

Changes

  • Commit & PR button next to Commit in the Git panel: writes the commit message with the agent when the box is blank (a typed message is kept), commits the ticked files, then pushes and opens the PR. The PR title and body are drafted by the agent, falling back to the thread title like autoPr. If the thread already has a PR, it's just updated. Shown only on local, non-archived worktree threads.
  • If the commit lands but the PR step fails (gh not signed in, size cap, …), the panel says Committed, but the PR failed: …, so you know the commit happened.
  • The sidebar #N link gets a PR icon, GitHub colours (open green, merged violet, closed red) and a hover title like PR #12 open. It reads the persisted last-known state, so a failed refresh never blanks or flickers it.

Verification

  • npm run test:renderer: 3169 pass, 0 fail. New tests cover the chain, a PR failure after the commit, the button hidden without a PR path, and the badge state.
  • tsc --noEmit and vite build clean.
  • Not tested: a live run against GitHub, or the electron suite (no electron code changed; the chain only composes existing suggestCommitMessage / commit / suggestPrText / createPr calls).

Notes for reviewers

  • PRs are created directly via gh and no browser tab opens (T3 opens GitHub's pre-filled page instead). The header then flips to watching checks.
  • An oversize PR shows up as an error here; the split / create-anyway choice still lives in the header Create PR dialog.

🤖 Generated with Claude Code

…363)

The Git panel gets a Commit & PR button: it drafts the commit message when
the box is blank, commits the staged files, then pushes and opens (or
updates) the PR with agent-drafted text, falling back to the thread title.
The sidebar #N badge now carries the PR state, with GitHub colours and a
merge glyph once merged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T08:12:28.916774Z 72cca79 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@currentbits
currentbits enabled auto-merge (squash) October 19, 2026 08:08

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 72cca79f6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +3943 to +3946
onCreatePr &&
detail?.thread.worktreePath &&
!project?.remoteHost &&
!isArchived

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Disable Commit & PR while the agent is working

When detail.thread.status === "working", this condition still supplies onCommitAndPr, so the Changes pane enables the action while the agent may be modifying the same worktree. Clicking it commits the current snapshot and immediately pushes/opens a PR, allowing later writes from the active run to be omitted and potentially racing Git index operations; gate this path on !isWorking, as the header Git action already does.

Useful? React with 👍 / 👎.

@currentbits
currentbits merged commit 6bef24d into main Oct 19, 2026
6 checks passed
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.

One-click commit-push-PR chain with PR-status sidebar icon

1 participant