fix(statusline): layered base branch detection#70
Merged
Conversation
…ain/master
Replace the hardcoded main/master check with a 4-tier fallback chain:
1. Branch reflog ("Created from <branch>") for explicit base
2. HEAD reflog ("moving from X to <branch>") for implicit base
3. GitHub PR base branch via gh CLI (cached 5-min TTL)
4. main/master existence check (previous behavior)
This fixes incorrect diff stats for branches created off develop,
staging, or other non-default branches.
dean0x
pushed a commit
that referenced
this pull request
Feb 25, 2026
- Update release date to 2026-02-25 - Add /review → /code-review rename under Changed - Add statusline base branch detection fix (#70) under Fixed - Add stale CLAUDE.md files array fix under Fixed - Add landing page reference under Changed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
main/masterbase branch check with a 4-tier fallback chaindevelop,staging, or other non-default branchesDetection layers
Created from <branch>(instant, explicit base)moving from X to <branch>(instant, implicit base)gh pr viewwith/tmpfile cache, 5-min TTL (~500ms first call, then cached)Test plan
npm test— 118/118 passmain— status line renders correctlydiffclean)