Repository navigation
Add primary-branch option to preserve primary branch spine - #182
Merged
lusingander merged 2 commits intoOct 3, 2026
Merged
Conversation
lusingander
reviewed
Oct 3, 2026
lusingander
left a comment
Owner
There was a problem hiding this comment.
Thank you for the PR! It's mostly ready, but I left some comments for minor details. Could you please check them?
Contributor
Author
|
I've made |
Owner
|
Thank you! |
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.
Closes #181
Summary
Adds the
-b, --primary-branch <BRANCH>CLI option andcore.option.primary_branchconfiguration setting.When specified, Serie preserves the first-parent spine of the specified branch along column 0, keeping the trunk visually straight even when feature branches contain newer commits.
When omitted, Serie preserves its existing behavior exactly.
Behavior
column >= 1).--max-count, Serie falls back to the standard layout and displays a warning via Serie's native status-line notification (StatusLine::NotificationWarn). This avoids writing to stderr while Ratatui's alternate screen buffer is active.Ref::Branch).Tests & Docs
primary_branch_001tosrc/tests/graph.rswith image snapshots covering bothchronoandtopoorderings undertests/graph/.primary_branch_merge_back: Verifies column stability when feature branches merge back into the primary trunk.primary_branch_fallback_unresolved_or_none: Verifies fallback to default layout and status warning when the branch name cannot be resolved.primary_branch_max_count: Verifies fallback when tip is truncated, and visible spine pinning when older commits are truncated.README.mdCLI help block,docs/src/getting-started/command-line-options.md,docs/src/configurations/config-file-format.md, andconfig.schema.json.