Skip to content

[Bug]: PR panel shows an active merge button when GitHub reports the merge as BLOCKED #25583

Open

Description

@herkulano

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. On a GitHub repository, add a ruleset on the default branch with "Require conversation resolution before merging" (required_review_thread_resolution: true) and no required approvals.
  2. Open a pull request and let a review bot (CodeRabbit here) leave one inline comment.
  3. Let every required check pass.
  4. Open the pull request in the T3 Code PR panel.

Expected behavior

The panel shows that the merge is blocked and why, as github.com does: "Merging is blocked. A conversation must be resolved before this pull request can be merged." The merge button is disabled or names the blocker.

Actual behavior

The panel shows an active "Squash and merge" button and no sign of the block. github.com shows "All checks have passed" and "Merging is blocked" for the same pull request.

GitHub already reports the state:

$ gh pr view 98 --json mergeStateStatus,mergeable,reviewDecision
{"mergeStateStatus":"BLOCKED","mergeable":"MERGEABLE","reviewDecision":""}

reviewDecision is empty because no review is required, so a hint keyed on it says nothing here. mergeStateStatus: BLOCKED with green checks and no required review points at another rule, such as unresolved conversations.

Related, not duplicates:

Impact

Minor bug or occasional failure

Version or commit

Server 0.1.2

Environment

Linux arm64, GitHub repository with a branch ruleset that requires conversation resolution, gh 2.103.2

Workaround

Check the pull request on github.com before merging.

Activity

  1. fsioni commented on Oct 29, 2026

    @fsioni
    Contributor

    Another trigger for the same root cause, on nightly 0.1.4-nightly.20261028.3824 (macOS arm64, desktop app, local server, GitHub App credential):

    A branch protection rule on the base branch requires 6 status checks, and none of them had reported on the head commit. The panel showed an active "Merge" button. Clicking it failed with: Pull request operation runAction failed: GitHub returned an error: 6 of 6 required status checks are expected. (reproduced twice).

    From the source: resolvePullRequestPrimaryControl (apps/web/src/components/pullRequest/[pullRequestDetail.logic.ts](https://github.com/Users/fares/.t3/scratch/2026-10-29-read-triage-playbook-md-users-3824f1c3/apps/web/src/components/pullRequest/pullRequestDetail.logic.ts)) offers "Enable auto-merge" only when checksState is non-null and not "passing". checksState is rolled up from the reported contexts only, so required checks that are missing do not count. With no contexts the value is null, and with only non-required checks green it is "passing". Either way the panel falls through to "Merge". mergeStateStatus: BLOCKED is only used for canMergeNow, which controls whether auto-merge is offered, not for disabling Merge. The code is unchanged on main.

    Expected: when mergeStateStatus is BLOCKED, show the blocker (e.g. "Waiting for N required checks") and offer auto-merge when the repo allows it, instead of an active Merge button.

    Investigated with Claude Code (Claude Opus 5.5) via T3 Code triage.

  2. seankoji commented on Nov 11, 2026

    @seankoji

    Note

    Written by GPT-6.1 Sol on behalf of @seankoji

    Supporting evidence gathered on 11 November 2026 AEDT, using T3 Code desktop 0.1.9-nightly.20261111.4501 on macOS 26.7.1 arm64. These are historical observations, not a fresh reproduction.

    GitHub showed "Merging is blocked | A conversation must be resolved before this pull request can be merged." T3 still showed an enabled Merge control. Earlier local inspection found the label "Merge", tooltip "Merge this pull request (squash)", and no block warning.

    The GitHub query during investigation returned:

    {"mergeable":"MERGEABLE","mergeStateStatus":"BLOCKED","reviewDecision":null,"isDraft":false}

    The reporter said clicking it "works", but no completed merge was demonstrated. A later read returned state: OPEN, mergedAt: null, and mergeCommit: null. It still reported BLOCKED, but by then the review threads had been resolved and a required gatekeeper check was pending. That later reading does not establish a continuing conversation block.

    Earlier inspection of the installed bundle found that BLOCKED excludes immediate merging, but an available action can call EnablePullRequestAutoMerge when auto-merge is allowed. Silently enabling auto-merge is therefore a plausible explanation, not a traced click outcome. The reporter had admin/bypass permission, so these observations neither prove nor rule out bypass.

    Expected behavior: explain GitHub's block before the click. If the action enables auto-merge, label it explicitly as "Enable auto-merge" rather than "Merge".

  3. seankoji commented on Nov 24, 2026

    @seankoji

    Note

    Written by Claude Opus 5.5 on behalf of @seankoji

    Another trigger for the same root cause, and this time the click merged. A repository admin merged past a pending required check from the PR panel, with no bypass prompt.

    Setup. A private repository whose default branch has a ruleset requiring one status check (a single aggregating "all checks passed" job), plus pull request, linear history, non-fast-forward and deletion rules. The viewer is a repository admin with bypass permission.

    What happened on 24 November 2026 (AEDT, UTC+11).

    • With 4 of 12 checks still running, including the required one, github.com showed "Some checks haven't completed yet", greyed out "Squash and merge", and offered only the "Merge without waiting for requirements to be met (bypass rules)" checkbox.
    • At the same moment the T3 Code PR panel showed "4 of 12 running" on its Summary tab and an enabled merge action.
    • Clicking it merged the PR at 17:29:11 (06:29:11Z). T3 Code showed no warning or confirmation, so the required check was bypassed without the admin opting in.

    The 11 November comment above could not tell whether bypass was involved. Here it was. For a viewer who can bypass rules, the button doesn't just hide the block, it overrides the ruleset.

    Related, same session: a second PR, into a branch with no rules, was merged from T3 Code at 17:28:25 (06:28:25Z) while two of its checks had failed. GitHub allows that, but T3 Code gave no warning about the failing checks.

    Where the merge path ignores BLOCKED (main @ c9e22e5). This comes from reading the public source. It fits what we saw, but I haven't traced this specific click.

    • GitHubPullRequestProvider.ts L86-L91 grants merge to any viewer with write access. canMergeNow (from mergeStateStatus) only decides whether enable-auto-merge is offered.
    • pullRequestDetail.logic.ts L117-L125 falls through to "merge" whenever enable-auto-merge is unavailable, for example when the repository has auto-merge turned off. It never reads mergeStateStatus.
    • GitHubPullRequestApi.ts L2965-L2985 sends the mergePullRequest mutation for the merge action whatever the current mergeStateStatus. Hypothesis: GitHub lets a bypass-capable actor merge through this mutation without the opt-in that github.com asks for, which matches the result here.

    Expected.

    • When mergeStateStatus is BLOCKED, the panel names the blocker (for example "Waiting for 1 required check") and disables Merge, or offers auto-merge when the repository allows it.
    • If the viewer can bypass rules, merging past them needs a separate, clearly labelled "Merge without waiting for requirements (bypass rules)" confirmation, as on github.com. The default merge click never bypasses.
    • When mergeStateStatus is UNSTABLE (non-required checks failing), the panel warns before merging.

    Version. The local t3 CLI reports 0.1.12-nightly.20261123.5165, on Linux. The exact app build used for the merge wasn't recorded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions