Skip to content

feat(pull-requests): show a GitHub stacked pull request's stack - #194

Merged
incognitojam merged 2 commits into
mainfrom
t3code/show-pr-stack
Aug 19, 2026
Merged

incognitojam merged 2 commits into
mainfrom
t3code/show-pr-stack

Conversation

@incognitojam

Copy link
Copy Markdown
Owner

Note

The pull request detail view now shows GitHub's stacked pull requests (public preview) as a Stack section in the Summary tab: every layer with its state, top of the stack first, current layer highlighted, base branch at the foot. GitHub-only, read as an optional enrichment that degrades to nothing on hosts without the preview field.

GitHub shipped stacked pull requests to public preview in July 2026, and its own UI draws the whole stack on every member. T3 Code showed nothing, so a stacked pull request read like a standalone one.

Server: the GitHub provider reads pullRequest.stack over GraphQL as a new optional read beside the base comparison, decoded into a provider-neutral PullRequestStack on the detail. The field is in public preview, so a host that has never heard of it refuses the query — treated the same as a pull request that stands alone, and the rest of the detail is untouched. Rides the existing detail cache; other providers simply omit the optional field.

Contracts: PullRequestStack / PullRequestStackEntry, and an optional stack on PullRequestDetail. No RPC changes — pullRequests.detail already carries the whole struct.

Web: a Stack section in the Summary tab, heading Stack · 2 of 3 style with the open layer's position. Layers are drawn top of the stack first with their state glyph and tick rail, #N · branch, and a state label; the layer being read is highlighted rather than linked, and every other layer opens through the existing pull request link opener — in the app where the workspace has the repository, in the browser with a modifier. The section only renders for stacked pull requests, so nothing changes for everyone else. Mobile has no pull request view, so there is nothing to add there.

Verified against real preview data on yngatech/leaderboard (#57–#59), plus decoder and provider tests (92 pass) and clean typechecks for contracts, server, and web.

Before After
Summary tab without the stack Summary tab with the Stack section

Follow-up (agreed, after this merges): per-layer Ready/Not ready badges from each sibling's check rollup, matching GitHub's own stack entries.


Written by an agent (Claude Code, claude-fable-5).

GitHub's stacked pull requests (public preview, July 2026) were invisible
in the detail panel. The GitHub provider now reads the stack over GraphQL
as an optional enrichment — hosts whose schema predates the preview field
degrade to no stack — and the Summary tab draws the ladder: every layer
with its state, top of the stack first, the current layer highlighted,
the base branch at the foot. Sibling layers open like any pull request
link: in the app where the workspace has the repository, in the browser
with a modifier.
The ladder counted itself from the entries it had, which understates two
ways: GitHub counts layers it will not name to this viewer, and a stack
taller than one page keeps only what arrived. So a position read "2 of 3"
on a stack of seven. The read now takes GitHub's own "size" beside a full
page of entries, positions are counted against it, and a ladder missing
layers says so under the last rung instead of quietly ending early.
@incognitojam
incognitojam merged commit ef220ff into main Aug 19, 2026
8 of 9 checks passed
@incognitojam
incognitojam deleted the t3code/show-pr-stack branch August 19, 2026 00:37
incognitojam added a commit that referenced this pull request Aug 19, 2026
> [!NOTE]
> The pull request detail view now shows GitHub's stacked pull requests
(public preview) as a Stack section in the Summary tab: every layer with
its state, top of the stack first, current layer highlighted, base
branch at the foot. GitHub-only, read as an optional enrichment that
degrades to nothing on hosts without the preview field.

GitHub shipped stacked pull requests to public preview in July 2026, and
its own UI draws the whole stack on every member. T3 Code showed
nothing, so a stacked pull request read like a standalone one.

**Server**: the GitHub provider reads `pullRequest.stack` over GraphQL
as a new optional read beside the base comparison, decoded into a
provider-neutral `PullRequestStack` on the detail. The field is in
public preview, so a host that has never heard of it refuses the query —
treated the same as a pull request that stands alone, and the rest of
the detail is untouched. Rides the existing detail cache; other
providers simply omit the optional field.

**Contracts**: `PullRequestStack` / `PullRequestStackEntry`, and an
optional `stack` on `PullRequestDetail`. No RPC changes —
`pullRequests.detail` already carries the whole struct.

**Web**: a Stack section in the Summary tab, heading `Stack · 2 of 3`
style with the open layer's position. Layers are drawn top of the stack
first with their state glyph and tick rail, `#N · branch`, and a state
label; the layer being read is highlighted rather than linked, and every
other layer opens through the existing pull request link opener — in the
app where the workspace has the repository, in the browser with a
modifier. The section only renders for stacked pull requests, so nothing
changes for everyone else. Mobile has no pull request view, so there is
nothing to add there.

Verified against real preview data on `yngatech/leaderboard` (#57–#59),
plus decoder and provider tests (92 pass) and clean typechecks for
contracts, server, and web.

| Before | After |
| --- | --- |
| ![Summary tab without the
stack](https://raw.githubusercontent.com/yngatech/t3code/assets/pr-show-pr-stack/before.png)
| ![Summary tab with the Stack
section](https://raw.githubusercontent.com/yngatech/t3code/assets/pr-show-pr-stack/after.png)
|

Follow-up (agreed, after this merges): per-layer Ready/Not ready badges
from each sibling's check rollup, matching GitHub's own stack entries.

---
Written by an agent (Claude Code, claude-fable-5).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 20, 2026
> [!NOTE]
> The pull request detail view now shows GitHub's stacked pull requests
(public preview) as a Stack section in the Summary tab: every layer with
its state, top of the stack first, current layer highlighted, base
branch at the foot. GitHub-only, read as an optional enrichment that
degrades to nothing on hosts without the preview field.

GitHub shipped stacked pull requests to public preview in July 2026, and
its own UI draws the whole stack on every member. T3 Code showed
nothing, so a stacked pull request read like a standalone one.

**Server**: the GitHub provider reads `pullRequest.stack` over GraphQL
as a new optional read beside the base comparison, decoded into a
provider-neutral `PullRequestStack` on the detail. The field is in
public preview, so a host that has never heard of it refuses the query —
treated the same as a pull request that stands alone, and the rest of
the detail is untouched. Rides the existing detail cache; other
providers simply omit the optional field.

**Contracts**: `PullRequestStack` / `PullRequestStackEntry`, and an
optional `stack` on `PullRequestDetail`. No RPC changes —
`pullRequests.detail` already carries the whole struct.

**Web**: a Stack section in the Summary tab, heading `Stack · 2 of 3`
style with the open layer's position. Layers are drawn top of the stack
first with their state glyph and tick rail, `#N · branch`, and a state
label; the layer being read is highlighted rather than linked, and every
other layer opens through the existing pull request link opener — in the
app where the workspace has the repository, in the browser with a
modifier. The section only renders for stacked pull requests, so nothing
changes for everyone else. Mobile has no pull request view, so there is
nothing to add there.

Verified against real preview data on `yngatech/leaderboard` (#57–#59),
plus decoder and provider tests (92 pass) and clean typechecks for
contracts, server, and web.

| Before | After |
| --- | --- |
| ![Summary tab without the
stack](https://raw.githubusercontent.com/yngatech/t3code/assets/pr-show-pr-stack/before.png)
| ![Summary tab with the Stack
section](https://raw.githubusercontent.com/yngatech/t3code/assets/pr-show-pr-stack/after.png)
|

Follow-up (agreed, after this merges): per-layer Ready/Not ready badges
from each sibling's check rollup, matching GitHub's own stack entries.

---
Written by an agent (Claude Code, claude-fable-5).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
yngatech-nightly Bot pushed a commit that referenced this pull request Aug 21, 2026
> [!NOTE]
> The pull request detail view now shows GitHub's stacked pull requests
(public preview) as a Stack section in the Summary tab: every layer with
its state, top of the stack first, current layer highlighted, base
branch at the foot. GitHub-only, read as an optional enrichment that
degrades to nothing on hosts without the preview field.

GitHub shipped stacked pull requests to public preview in July 2026, and
its own UI draws the whole stack on every member. T3 Code showed
nothing, so a stacked pull request read like a standalone one.

**Server**: the GitHub provider reads `pullRequest.stack` over GraphQL
as a new optional read beside the base comparison, decoded into a
provider-neutral `PullRequestStack` on the detail. The field is in
public preview, so a host that has never heard of it refuses the query —
treated the same as a pull request that stands alone, and the rest of
the detail is untouched. Rides the existing detail cache; other
providers simply omit the optional field.

**Contracts**: `PullRequestStack` / `PullRequestStackEntry`, and an
optional `stack` on `PullRequestDetail`. No RPC changes —
`pullRequests.detail` already carries the whole struct.

**Web**: a Stack section in the Summary tab, heading `Stack · 2 of 3`
style with the open layer's position. Layers are drawn top of the stack
first with their state glyph and tick rail, `#N · branch`, and a state
label; the layer being read is highlighted rather than linked, and every
other layer opens through the existing pull request link opener — in the
app where the workspace has the repository, in the browser with a
modifier. The section only renders for stacked pull requests, so nothing
changes for everyone else. Mobile has no pull request view, so there is
nothing to add there.

Verified against real preview data on `yngatech/leaderboard` (#57–#59),
plus decoder and provider tests (92 pass) and clean typechecks for
contracts, server, and web.

| Before | After |
| --- | --- |
| ![Summary tab without the
stack](https://raw.githubusercontent.com/yngatech/t3code/assets/pr-show-pr-stack/before.png)
| ![Summary tab with the Stack
section](https://raw.githubusercontent.com/yngatech/t3code/assets/pr-show-pr-stack/after.png)
|

Follow-up (agreed, after this merges): per-layer Ready/Not ready badges
from each sibling's check rollup, matching GitHub's own stack entries.

---
Written by an agent (Claude Code, claude-fable-5).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
incognitojam added a commit that referenced this pull request Aug 27, 2026
> [!NOTE]
> The pull request detail view now shows GitHub's stacked pull requests
(public preview) as a Stack section in the Summary tab: every layer with
its state, top of the stack first, current layer highlighted, base
branch at the foot. GitHub-only, read as an optional enrichment that
degrades to nothing on hosts without the preview field.

GitHub shipped stacked pull requests to public preview in July 2026, and
its own UI draws the whole stack on every member. T3 Code showed
nothing, so a stacked pull request read like a standalone one.

**Server**: the GitHub provider reads `pullRequest.stack` over GraphQL
as a new optional read beside the base comparison, decoded into a
provider-neutral `PullRequestStack` on the detail. The field is in
public preview, so a host that has never heard of it refuses the query —
treated the same as a pull request that stands alone, and the rest of
the detail is untouched. Rides the existing detail cache; other
providers simply omit the optional field.

**Contracts**: `PullRequestStack` / `PullRequestStackEntry`, and an
optional `stack` on `PullRequestDetail`. No RPC changes —
`pullRequests.detail` already carries the whole struct.

**Web**: a Stack section in the Summary tab, heading `Stack · 2 of 3`
style with the open layer's position. Layers are drawn top of the stack
first with their state glyph and tick rail, `#N · branch`, and a state
label; the layer being read is highlighted rather than linked, and every
other layer opens through the existing pull request link opener — in the
app where the workspace has the repository, in the browser with a
modifier. The section only renders for stacked pull requests, so nothing
changes for everyone else. Mobile has no pull request view, so there is
nothing to add there.

Verified against real preview data on `yngatech/leaderboard` (#57–#59),
plus decoder and provider tests (92 pass) and clean typechecks for
contracts, server, and web.

| Before | After |
| --- | --- |
| ![Summary tab without the
stack](https://raw.githubusercontent.com/yngatech/t3code/assets/pr-show-pr-stack/before.png)
| ![Summary tab with the Stack
section](https://raw.githubusercontent.com/yngatech/t3code/assets/pr-show-pr-stack/after.png)
|

Follow-up (agreed, after this merges): per-layer Ready/Not ready badges
from each sibling's check rollup, matching GitHub's own stack entries.

---
Written by an agent (Claude Code, claude-fable-5).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
incognitojam added a commit that referenced this pull request Aug 28, 2026
> [!NOTE]
> The pull request detail view now shows GitHub's stacked pull requests
(public preview) as a Stack section in the Summary tab: every layer with
its state, top of the stack first, current layer highlighted, base
branch at the foot. GitHub-only, read as an optional enrichment that
degrades to nothing on hosts without the preview field.

GitHub shipped stacked pull requests to public preview in July 2026, and
its own UI draws the whole stack on every member. T3 Code showed
nothing, so a stacked pull request read like a standalone one.

**Server**: the GitHub provider reads `pullRequest.stack` over GraphQL
as a new optional read beside the base comparison, decoded into a
provider-neutral `PullRequestStack` on the detail. The field is in
public preview, so a host that has never heard of it refuses the query —
treated the same as a pull request that stands alone, and the rest of
the detail is untouched. Rides the existing detail cache; other
providers simply omit the optional field.

**Contracts**: `PullRequestStack` / `PullRequestStackEntry`, and an
optional `stack` on `PullRequestDetail`. No RPC changes —
`pullRequests.detail` already carries the whole struct.

**Web**: a Stack section in the Summary tab, heading `Stack · 2 of 3`
style with the open layer's position. Layers are drawn top of the stack
first with their state glyph and tick rail, `#N · branch`, and a state
label; the layer being read is highlighted rather than linked, and every
other layer opens through the existing pull request link opener — in the
app where the workspace has the repository, in the browser with a
modifier. The section only renders for stacked pull requests, so nothing
changes for everyone else. Mobile has no pull request view, so there is
nothing to add there.

Verified against real preview data on `yngatech/leaderboard` (#57–#59),
plus decoder and provider tests (92 pass) and clean typechecks for
contracts, server, and web.

| Before | After |
| --- | --- |
| ![Summary tab without the
stack](https://raw.githubusercontent.com/yngatech/t3code/assets/pr-show-pr-stack/before.png)
| ![Summary tab with the Stack
section](https://raw.githubusercontent.com/yngatech/t3code/assets/pr-show-pr-stack/after.png)
|

Follow-up (agreed, after this merges): per-layer Ready/Not ready badges
from each sibling's check rollup, matching GitHub's own stack entries.

---
Written by an agent (Claude Code, claude-fable-5).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
incognitojam pushed a commit that referenced this pull request Sep 28, 2026
…g#10839)

Fork adaptation: fork #194's GitHub stack ladder on the pull request detail keeps working beside upstream's host-native stacks. Its contract, CLI read, and GraphQL decoder schema are renamed to PullRequestStackLadder, getPullRequestStackLadder, and RawStackLadderSchema so they no longer collide with upstream's PullRequestStack, getPullRequestStack, and RawStackSchema. Agent-facing link_pull_request text names the styal MCP server.

(cherry picked from commit afb8489)
Upstream-PR: 10839
incognitojam pushed a commit that referenced this pull request Sep 28, 2026
Fork adaptation: fork #194's stack ladder field on the pull request detail is renamed from stack to stackLadder, because upstream now uses stack for list-entry stack membership. Auto-merge authorization from fork #495 still applies to non-stack actions.

(cherry picked from commit de37964)
Upstream-PR: 10875
incognitojam added a commit that referenced this pull request Sep 28, 2026
The pull request detail view showed a GitHub stack twice. The Stack
section on the Summary tab lists every layer (fork #194). Upstream's
stack support, now on main from
pingdotgg#10839,
pingdotgg#10870 and
pingdotgg#10875, lists the same layers,
branches and states in a popover from the header's position badge
(`3/6`). Upstream also adds stack badges to the pull request list, links
and groups a whole stack in the Linked pull requests panel, and offers
Merge stack and Rebase stack. The fork's section also made a separate
GraphQL request on every detail load.

This removes the fork's version:

- the Stack section in the Summary tab
- the `getPullRequestStackLadder` GraphQL read, its decoder, and the
`stackLadder` detail field in the contract
- their tests, the user guide bullet, and the
`stacked-pull-request-navigation` fork feature ledger entry

Opening a layer beside the thread (fork #329) is not affected:
upstream's popover opens a layer as a tab beside the thread, and PR
links in descriptions and comments still use the fork's link opener,
which the `github-reference-links` ledger entry covers.

| Before | After | After, popover open |
| --- | --- | --- |
| ![Before: Stack section on the Summary tab below upstream's
popover](https://github.com/user-attachments/assets/4178c7cc-c3b6-407f-958b-b4fca27353e7)
| ![After: Summary tab without the Stack
section](https://github.com/user-attachments/assets/dbfae28b-328e-442d-8c58-f07881d15b26)
| ![After: header stack
popover](https://github.com/user-attachments/assets/0d757dad-a6e8-4991-b0de-5dfffde900e9)
|

## Validation

Web client in a local dev server, with a project whose remote is
`pingdotgg/t3code`, on the open six-layer stack
pingdotgg#13565:

- The Summary tab goes from Comments straight to Description, with no
Stack section.
- The `3/6` badge opens the popover listing all six layers, with the
current one checked.
- Choosing pingdotgg#13567 from the
popover opens that pull request.
- No browser console errors and no server errors during these steps.

Focused checks: typecheck for contracts, server and web; the GitHub
provider, JSON decoder and pull request service tests (235 pass); fork
feature ledger validation.

---
Written by an agent (Claude Code, claude-opus-5-5).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant