Skip to content

Add GitHub PR write actions to the Inbox - #1

Merged
viannaanalyst merged 19 commits into
mainfrom
feat/pr-write-actions
Sep 15, 2026
Merged

viannaanalyst merged 19 commits into
mainfrom
feat/pr-write-actions

Conversation

@viannaanalyst

Copy link
Copy Markdown
Owner

What

Adds GitHub pull request write actions to the Inbox, on top of the existing read/review surfaces.

  • Merge — split button with squash (primary) / merge commit / rebase, "delete branch after merge" option, and native confirmation that names the method and deletion.
  • Review submission — pending review: inline comments on the Code-tab diff accumulate in a review bar, then publish as one GraphQL addPullRequestReview call with Comment / Approve / Request changes. Request changes requires a review body; approve is disabled on your own PR.
  • Close / reopen and label / assignee / reviewer editing with searchable multi-select popovers.
  • Gating — merge disabled with a reason for closed/draft/conflicting/blocked PRs; self-approve, empty review payloads, and invalid merge methods are rejected before gh runs.
  • i18n — pt-BR entries for every new string.

Rust commands wrap the authenticated gh CLI (existing patterns); no new dependencies and no new auth path.

Implementation notes

  • GitHubWorkItemDetails gains id, state, isDraft, mergeable, mergeStateStatus, labels, assignees, reviewRequests (all optional to keep tracker details typechecking); GithubPrDetails is the required shape for PR actions.
  • Pending review drafts persist per cwd:number for the session; the review bar is keyed to reset its dialog after a successful publish.
  • Inline comments reuse the existing per-line affordance in UnifiedDiffView, redirected from chat to the pending review via a new onLineComment prop. Default behavior is unchanged when the prop is absent.
  • gh pr merge / close / reopen / edit are silent on success, so those calls allow empty stdout while still surfacing failures.

Tests

  • Web: npm run check:web — 226 files / 2379 tests passed, tsc --noEmit clean.
  • Rust: npm run check:rust — fmt clean, clippy -D warnings clean, 310 tests passed.
  • New coverage: prReview.test.ts (draft, gating, persistence), PrReviewBar.test.ts (bar + inline edit + request handling), PrActions.test.ts (gating, merged state), githubPrWrite.test.ts (invoke payloads), Rust pr_merge_args / pr_edit_flags / pr_state_args / pr_review_payload tests.

Pending before merge

  • Manual end-to-end on a scratch PR with a second reviewer account: each merge method, approve/request changes, close/reopen, metadata edits, inline comments on added/context/deleted lines, and a blocked merge error.

This was referenced Sep 15, 2026
@viannaanalyst
viannaanalyst merged commit 9cd3409 into main Sep 15, 2026
3 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.

1 participant