Skip to content

fix(cli): indent stack members instead of a reserved gutter lane - #70

Merged
lettertwo merged 2 commits into
gh-stack-docsfrom
lane-graph-indentation
Aug 30, 2026
Merged

fix(cli): indent stack members instead of a reserved gutter lane#70
lettertwo merged 2 commits into
gh-stack-docsfrom
lane-graph-indentation

Conversation

@lettertwo

@lettertwo lettertwo commented Aug 28, 2026

Copy link
Copy Markdown
Owner

This PR is not about gh-stack. It fixes a pre-existing ADR-026 bug that a Graphite user with one
tracked stack hits today.

The lane graph let a trunk hand its own lane to its primary child. With one stack and no forks,
every row rendered flush left, indistinguishable from an unrelated worktree, and the trunk carried
no marker. Indentation carried no information in the single-stack case, which is the common case.

Column 0 is now reserved for bases. A trunk or an ungrouped worktree renders flush left, and every
stack member sits in column 1 or further right, so indentation alone signals membership. A base
never hands its lane to a child, so all its children close on its row (◉─┴─╯ main) and graph width
is the number of concurrent stacks on that trunk, independent of any one stack's depth.

Ordering changes from most-active-subtree to tallest subtree first, with activity demoted to a
tiebreaker and branch name as the final tiebreak. TreeNode gains subtree_size.

docs/adr/026-graphite-lane-graph.md is rewritten to match. An earlier revision of it reserved lane
0 as a dedicated membership column, which is kept there under "Superseded".

The change is textually dependent on the gh-stack work: it touches stack_number in six places,
TreeNode::stack_number exists only because of Stack::number, and it edits lane examples in
docs/recipes/stacked-diffs.md.

Testing: 651 tests, clippy clean.


Stack created with GitHub Stacks CLIGive Feedback 💬

@lettertwo lettertwo changed the title lane graph indentation fix(cli): indent stack members instead of a reserved gutter lane Aug 28, 2026
@lettertwo lettertwo closed this Aug 28, 2026
@lettertwo lettertwo reopened this Aug 28, 2026
@lettertwo
lettertwo force-pushed the lane-graph-indentation branch from 8882f18 to e331f60 Compare August 28, 2026 03:13
@lettertwo
lettertwo force-pushed the lane-graph-indentation branch from e331f60 to 99e91e9 Compare August 29, 2026 23:35
@lettertwo
lettertwo merged commit ba41911 into main Aug 30, 2026
27 checks passed
@lettertwo
lettertwo deleted the lane-graph-indentation branch August 30, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant