← Back to Pull requests

feat(source-control): T3's other pull request actions, merge queue, merge method per project, GitHub avatars (W46, D1661–D1665) #336

Open
unknown opened this pull request with 401 lines diff across 5 files
View on GitHub
unknown unknown commented on Oct 28, 2026 20:07 UTC
Author

W46 of docs/plans/t3-roadmap.md (round 6), layer 1: T3's other pull request actions. Decisions D1661–D1665 in docs/plans/source-control.md ("Round 6 … (W46, D1661–D1680)").

What it does

  • D1661 git.pr.action takes T3's eleven PullRequestActions (draft, update-branch with updateMethod, enable-/disable-auto-merge, revert, delete-branch, approve-workflows besides the four of W41), each forge offering what T3's changeRequestActions give it. GitHub sends T3's GraphQL mutations through gh api graphql (convertPullRequestToDraft, updatePullRequestBranch with the head it read, enable/disablePullRequestAutoMerge, revertPullRequest, updateRefs for the branch with T3's refusals) and its REST call to approve a fork's waiting workflow runs; GitLab glab mr update --draft, glab mr rebase, --auto-merge=true and cancel_merge_when_pipeline_succeeds; Azure DevOps --draft true, --auto-complete; Forgejo POST pulls/<n>/update?style=. Snapshots carry autoMerge; git.pr.detail answers updateMethods and defaultMergeMethod.

  • D1662 a merge into a base with a merge queue enables auto-merge (the queue takes it), and enable-auto-merge on a pull request GitHub would merge now merges it, as T3's runPullRequestAction.

  • D1663 a panel row's menu carries T3's pull request page menu (Jhin has no such page yet): draft toggle, "Merge now" / "Confirm merge?", auto-merge on/off, the merge methods as a radio group, "Close pull request", "Reopen pull request", "Revert changes", "Delete branch" behind T3's dialog.

  • D1664 pullRequestMergeMethod per node and per project ("Default pull request merge method", unset = T3's "Last selected"); the client remembers the last method chosen on the device; speed actions and the menu resolve as T3's resolvePullRequestMergeMethod.

  • D1665 GitHub avatars by T3's loginAvatarUrl.
  • Deferred (in the plan): T3's pull request page with its "Update branch" and "Approve workflows" controls, viewer permissions, agent-credit removal on merge.

    Evidence

    $ vp run --filter @jhin/plugin-source-control typecheck   # clean
    $ vp run --filter @jhin/web typecheck                     # clean
    $ vp test run plugins/source-control/test/pr-detail.test.ts plugins/source-control/test/github.test.ts
     Test Files  2 passed (2)
          Tests  31 passed (31)
    $ vp test run --project browser apps/web/test/pull-requests-panel.browser.test.tsx
          Tests  12 passed (12)
    $ cd e2e && npx playwright test tests/git-actions.spec.ts -g D1663
      ✓  1 [chromium] › tests/git-actions.spec.ts:116:1 › D260–D274, D1281–D1283, D1663: … (23.5s)
      1 passed (26.2s)
    $ vp check --fix <changed files>
    Found 0 errors and 5 warnings in 14 files   # warnings pre-existing in index.ts
    

    The row menu with T3's pull request actions (Playwright, real node, fake gh):

    !menu

    "Merge now" asks first, as T3's inline confirm:

    !confirm

    🤖 Generated with Claude Code

    Diff: 401 lines (+300 / -101) across 5 files Reviewer: claude[bot] Review duration: 2m
    All Vouch review confidence checks passed
    Residual risk 0.36 = Change Risk (0.45) × (1 − Review Confidence (0.19)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 401 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 25% · Reviewer familiarity: 35%
    19%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.359
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #336"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 19.4% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 44.7% (MEDIUM) · Higher = larger blast radius
    44.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 19.4% · Lower = rushed or shallow review
    19.4%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 36% · Moderate risk
    36%
    Repository