'Rebase stack' button is unavailable exactly when it's most needed: artificial conflicts after squash-merging the bottom PR #464
carrotRakko
started this conversation in
Feedback
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.
TL;DR: After squash-merging only the bottom PR of a stack via the API, the next PR often shows as CONFLICTING because its branch still carries the pre-squash commits (an artificial conflict —
git rebase --onto <squash-sha> <old-head-of-merged-pr> <branch>resolves it with zero conflicts). In exactly this state, the Rebase stack button does not appear; the merge box only offers "Resolve conflicts" / "Use the command line". The case the FAQ says the server can handle with--ontois the case where the server's rebase is unreachable.Repro (2026-08-22, private preview)
main <- PR-A <- PR-B, where both PRs append lines to the same file (adjacent lines — the common case for stacked work on one feature).merge-async(no cascading rebase runs on this path — see Post-merge cascading rebase runs when merging from the PR page, but not via the merge-async API — intended? #463).main,mergeable_state: dirty, diff re-includes PR-A's content.For contrast, when the remaining PR's changes don't textually collide with the squashed content (different files), the state is
clean, the "This stack is out-of-date with its base branch" banner appears with the Rebase stack button, and clicking it performs a server-side rebase that handles the squash correctly (effectively--onto, keeps authors, commits signed by GitHub). It works great — it's just gated behind the wrong predicate.Ask
Decide the button's availability (and ideally the automatic post-merge cascade) by simulating the actual stack rebase (
--ontofrom the merged PR's old head, which the server knows) rather than by three-way mergeability against the stale base. Artificial conflicts would then be healed by the existing machinery, and "Use the command line" would be reserved for true conflicts.✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)
All reactions