Skip to content

fix(merge): support merge queue targets - #59

Merged
kitlangton merged 2 commits into
mainfrom
fix/merge-queue-maintenance
Sep 2, 2026
Merged

kitlangton merged 2 commits into
mainfrom
fix/merge-queue-maintenance

Conversation

@kitlangton

Copy link
Copy Markdown
Owner

Why

Merging a pull request into a branch with a merge queue fails because ghui always passes --delete-branch. GitHub CLI rejects that flag for queue targets, including explicit admin merges.

Closes #57.

What Changes

Target and action New behavior
Ordinary branch, successful action Existing merge flags, branch deletion, and optimistic state remain unchanged.
Queue branch, normal or auto Omit branch deletion, keep the PR open without inventing an auto-merge state, refresh after success, and report Requested merge queue for #42.
Queue branch, admin Omit branch deletion while retaining explicit --admin, optimistic completion, and the Admin merged notice. The modal explains the queue bypass.
Any target, lookup failure Block Enter and direct confirmation rather than execute a hidden action using seeded merge information. Preserve ready/draft and open state.

Queue detection reads PullRequest.mergeQueue alongside the existing admin-permission query. This is the queue for the PR's base branch, not whether the PR already has a queue entry. Draft PRs retain the two-stage confirmation and mark-ready flow.

Demo

comparison.mp4

Matched production GHUI TUI runs: base 090a4d5 and final fix 57d6d1e, refreshed after the error-gate follow-up, using the same m, then Enter interaction at 120x26. The GitHub backend is simulated; merge-info decoding, CLI argument construction, merge flow, rendering, and key handling are production code from each revision. Both recordings use the same fixture from 57d6d1e. Startup is trimmed; playback is 1x with 1.5-second modal and 3.5-second result-frame holds. Exported at 60fps. Also verified both revisions at 84x26.

Scope

This fixes merge-queue targets and blocks confirmation after lookup errors within the existing merge workflow. It does not add queue management or change successful ordinary merge behavior. A patch changeset is included.

Verification

bun run test --test-name-pattern 'production merge flow|GitHubService merge queue'
bun run format:check
bun run typecheck
bun run lint
bun run test
bun run test:keymap
bun run package:smoke
bun run changeset:status
git diff --check

All passed at final head 57d6d1e: 34 focused regressions, 578 tests in the full command, and 131 keymap tests. The full suite emitted nonfatal TreeSitter teardown warnings. Verified with Bun 1.4.0 and the repository-pinned Effect/Atom beta.90 dependencies. Supplemental typechecking of the new tests also passed.

Read-only GitHub GraphQL introspection confirmed the queue field and its meaning; the query validated against GitHub. GitHub CLI 2.96.0 source confirms the deletion rejection, automatic queue request, and explicit admin bypass. No live GitHub merge was performed; mutation verification uses a fake command runner and real merge-flow hook tests.

Four production regressions verify that lookup errors block Enter/direct confirmation for ready/draft PRs without command calls or state changes. An independent production hook/keymap probe still reproduces the hidden request on base 090a4d5 and confirms disabled dispatch with no mutations on final head 57d6d1e.

@kitlangton
kitlangton merged commit 45e2279 into main Sep 2, 2026
1 check passed
@kitlangton
kitlangton deleted the fix/merge-queue-maintenance branch September 2, 2026 03:22
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.

Support repositories with merge queue enabled

1 participant