Repository navigation
Description
Summary
On a repository that uses GitHub merge queues, bb shows no sign that a pull request has been queued. Worse than a missing indicator: a queued pull request that has already passed its pre-merge checks reports mergeable: MERGEABLE from gh, so bb classifies it as mergeability.state = "mergeable" / attention = "ready_to_merge" and renders the green "Merge" split button — for a merge the queue already owns. A queued pull request whose queue checks are still running reports mergeStateStatus: UNKNOWN and lands in mergeability.state = "unknown" ("Mergeability unknown", amber warning triangle), which is also wrong. GitHub's own UI gives queued pull requests a distinct ochre "Queued" state; bb has no equivalent.
Expected: bb shows the pull request as queued (GitHub's ochre), reports its place in the queue, and does not offer a direct merge action for it.
Versions and environment
- bb 0.38.0, run from source at
6da2a7a9b332a02e5a25db05ac980a180fee6ab0(main) - macOS 26.5.2, Node v26.0.0
gh version 2.97.0 (2026-07-31)- Repository under test:
ai-ecoverse/slicc(merge queue enabled onmain), observed 2026-08-20
Steps to reproduce
-
Enable a merge queue on the base branch of a GitHub repository (
ai-ecoverse/slicchere). -
Enqueue two pull requests: one whose queue checks are still running, one that has already passed them.
-
Run the exact
ghread the bb host daemon makes for a workspace branch —GH_PR_VIEW_JSON_FIELDS:gh pr view 2239 --json number,state,isDraft,mergeStateStatus,mergeable,reviewDecision gh pr view 2241 --json number,state,isDraft,mergeStateStatus,mergeable,reviewDecision -
Open a bb thread whose environment branch is one of those pull requests and look at the PR pill, the prompt context banner, and the thread metadata panel.
Did not reproduce with a draft pull request (bb correctly shows draft), and does not depend on the thread's provider — this is entirely in the workspace/PR read path.
Expected vs actual
Verbatim gh output for the two queued pull requests (both were in the merge queue at the time):
$ gh pr view 2239 --json number,state,isDraft,mergeStateStatus,mergeable,reviewDecision
{"isDraft":false,"mergeStateStatus":"UNKNOWN","mergeable":"UNKNOWN","number":2239,"reviewDecision":"","state":"OPEN"}
$ gh pr view 2241 --json number,state,isDraft,mergeStateStatus,mergeable,reviewDecision
{"isDraft":false,"mergeStateStatus":"UNSTABLE","mergeable":"MERGEABLE","number":2241,"reviewDecision":"","state":"OPEN"}
Both were genuinely queued, confirmed against the GraphQL API in the same window:
$ gh api graphql -f query='{repository(owner:"ai-ecoverse",name:"slicc"){mergeQueue{entries(first:20){nodes{position state pullRequest{number mergeStateStatus mergeable isInMergeQueue}}}}}}'
{"data":{"repository":{"mergeQueue":{"entries":{"nodes":[
{"position":1,"state":"AWAITING_CHECKS","pullRequest":{"number":2239,"mergeStateStatus":"UNKNOWN","mergeable":"UNKNOWN","isInMergeQueue":true}},
{"position":2,"state":"AWAITING_CHECKS","pullRequest":{"number":2236,"mergeStateStatus":"UNKNOWN","mergeable":"UNKNOWN","isInMergeQueue":true}},
{"position":3,"state":"AWAITING_CHECKS","pullRequest":{"number":2231,"mergeStateStatus":"UNKNOWN","mergeable":"UNKNOWN","isInMergeQueue":true}},
{"position":4,"state":"QUEUED","pullRequest":{"number":2241,"mergeStateStatus":"UNSTABLE","mergeable":"MERGEABLE","isInMergeQueue":true}}]}}}}}
Feeding those exact raw values through the server's own assembler (assembleThreadPullRequest) produces:
PR #2239 (UNKNOWN/UNKNOWN) -> mergeability=unknown attention=none
PR #2241 (UNSTABLE/MERGEABLE) -> mergeability=mergeable attention=ready_to_merge
Expected instead: both report a queued state, #2241 carries queue position 4, and neither offers a merge action.
Evidence
-
The daemon's PR read requests a fixed field list that contains no merge-queue field:
git-host.ts#L32-L46. This is not an omission that can be fixed by adding a field name —gh pr view --jsonon 2.97.0 offers no merge-queue field at all. Full list, verbatim fromgh pr view --json:additions assignees author autoMergeRequest baseRefName baseRefOid body changedFiles closed closedAt closingIssuesReferences comments commits createdAt deletions files fullDatabaseId headRefName headRefOid headRepository headRepositoryOwner id isCrossRepository isDraft labels latestReviews maintainerCanModify mergeCommit mergeStateStatus mergeable mergedAt mergedBy milestone number potentialMergeCommit projectCards projectItems reactionGroups reviewDecision reviewRequests reviews state statusCheckRollup title updatedAt urlisInMergeQueueandmergeQueueEntryexist only on the GraphQLPullRequesttype, so this needs a separategh api graphqlread. -
GitHub's
MergeStateStatusenum has no queued member either, so the state cannot be inferred from the fields bb already has:gitHostPullRequestMergeStateStatusSchema. -
Server policy that misclassifies the two cases above:
assembleThreadPullRequestMergeability—mergeable === "MERGEABLE"wins for#2241, and#2239falls through tounknown. -
The merge action is gated on exactly that state:
ThreadPromptContextBanner.tsx#L1008-L1010, and the same on mobile inresolvePullRequestBannerAction. -
The pill has no queued state; it colours by
PullRequestStateonly (open/draft/merged/closed):PullRequestStatusPill.tsx#L21-L60. -
The ochre token GitHub's queued state calls for already exists and needs no new colour:
--attention: oklch(0.74 0.15 80)inapps/app/src/components/ui/theme.css, plusattentionin the mobile native theme.
What you ruled out
- Not a duplicate: no open or closed issue or pull request in this repository mentions merge queues; the 155 open issues were listed in full and searched.
- Not fixable in a plugin: the data comes from the host daemon's
ghinvocation and flows throughGitHostPullRequest→ThreadPullRequest; the pill, prompt banner, and metadata panel are core components with no slots, and adding the field is a wire change that needs aHOST_DAEMON_PROTOCOL_VERSIONbump.experimental_setThreadRowStatuscan decorate sidebar rows only, and would need a second redundant poll. - Not a stale-cache artifact: the
gh pr viewand GraphQL reads above were taken in the same minute and disagree about the same pull requests. - Not specific to one pull request: reproduced on both a queue entry still running checks (
#2239) and one that had passed them (#2241), which fail in two different ways. - Not draft-related: draft pull requests are classified correctly today.
Suggested priority and effort
Medium-high for merge-queue repositories, which is every repository with a protected trunk at any scale — no workaround, and the failure is an action bb offers that should not be offered. Effort: Low-Medium (one extra GraphQL read on the daemon, one new mergeability/attention state, display entries on web and mobile).
AGENT GENERATED: by Claude Opus 5
Activity
SawyerHood commentedon Aug 24, 2026
---Auto-Generated---
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/2048.html
gh pr view --jsonwith a fixed field list that has no merge-queue field (and gh offers none), soassembleThreadPullRequestMergeabilityclassifies a queued PR asmergeable/ready_to_merge(gh: UNSTABLE/MERGEABLE) orunknown(gh: UNKNOWN/UNKNOWN), and the web/mobile/server merge gates key on exactlymergeability.state === "mergeable".gh pr viewread, make one extra read-onlygh api graphqlcall forisInMergeQueueandmergeQueueEntry{position state enqueuedAt estimatedTimeToMerge}and return it as a new required-nullablemergeQueuefield onGitHostPullRequest(packages/domain/src/thread.ts); bump HOST_DAEMON_PROTOCOL_VERSION 164 -> 165. Server (apps/server/src/services/environments/pull-request.ts): add aqueuedmergeability and attention state checked right after the draft branch, carry position/state/ETA onThreadPullRequestMergeability; …The report is self-contained: copy-paste repro steps with the test or script inline, expected vs actual output, screenshots where the bug is visual, and code permalinks at the base commit. It was independently re-executed by a second agent (see its Verification section).