Repository navigation
Support branch-on-branch (derived) stacked PRs in the PR management panel (stack controls, retargeting, and merge guard) #43477
Abdullahon2006
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Following up on #43467 (closed as a feature request rather than a bug).
Problem / Gap Today
When stacked PRs are created as standard branch-on-branch chains on GitHub (e.g.,
main← PR #1 ← PR #2 ← PR #3 viagh pr create --base <previous-branch>, without GitHub's native/stacksbeta API):ThreadPullRequestsPanel/resolveThreadPullRequestChains) already detects and renders them as aderivedstack (stack icon, layer count, nested hierarchy).PullRequestBaseBranchinPullRequestDetailPanelalso marks them with a stack icon (isStackedPullRequest).PullRequestDetailPanelonly loadsusePullRequestStack(GET /repos/{owner}/{repo}/stacks?pull_request=...inGitHubPullRequestApi.ts). BecausenativeStackisnullfor branch-on-branch stacks:PullRequestStackMenu(Merge stack, Rebase stack, layer picker1/N) does not appear.ThreadPullRequestsPanelomitsstackwhenlink.stack === null(ThreadPullRequestsPanel.tsx:147), soPullRequestSpeedActionsleaves single-PR quick-merge enabled on every layer.PullRequestDetailPanelshows the ordinary single-PR Merge button on every PR in the stack.If a user merges the stack bottom-up from T3 Code's PR management panel, PR #1 merges into
main, and then PR #2, #3, etc. each merge into their parent PR's feature branch instead ofmain—leaving every PR marked Merged while upper layers' changes never reachmain.Proposed Behavior
Support derived (branch-on-branch) stacks in the PR management panel with safe defaults:
PullRequestDetailPanel: Populate stack navigation / Merge stack / Rebase stack (or equivalent sequential retarget + rebase + merge orchestration) from derived chains when GitHub's native/stacksendpoint returns empty.main(and rebase/update) before merging, or warn / block merging into an already-merged feature branch.PullRequestSpeedActionsthat already exists for native stacks (entry.stack !== undefined).Related Discussions
All reactions