Skip to content

fix(git-graph): leave a folded mark unjoined, not threaded - #1672

Merged
huichen merged 2 commits into
mainfrom
pr/huichen
Nov 22, 2026
Merged

huichen merged 2 commits into
mainfrom
pr/huichen

Conversation

@huichen

@huichen huichen commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

What

The TUI, desktop and mobile git lane graphs draw a commit whose lane was folded into the six-column window as * (a diamond on the phone and desktop). Until now the geometry still emitted a vertical thread through that mark, so several unrelated tips drawn in the bundle column joined into one continuous line and read like a single branch with commits on it — the opposite of what the mark means. A folded mark now carries no thread, and the row above no longer reaches down into it.

Commits

  • fix(git-graph): leave a folded mark unjoined, not threaded

Verification

  • ./node_modules/.bin/vitest run packages/git-graph/src/index.test.ts → 23 passed (23)
  • ./node_modules/.bin/tsc -p packages/git-graph --noEmit → clean
  • make check-docs → 425 docs checked, placement, bilingual pairing, links and fences OK
  • scripts/screenshots/scenarios.d/git-lane-window.json gained two assertions (desktop and mobile): the folded marks carry no vertical stroke at x=77, and the row above does not extend into them.

User-visible changes

  • Git lane graph (TUI /git, desktop and mobile history): before, commits in the folded seventh-and-beyond lanes were joined by a vertical thread, so separate tips in the bundle column read as one branch; after, each folded mark stands alone and the row above does not reach into it. Revert 0e878c37f.

A commit drawn in the bundle's column carried a vertical thread whenever
the rows around it carried something in that column — and a folded mark
did, so four tips from past the window came out as one continuous line
with four marks on it. That is the reading the `*`/diamond exists to
prevent: several unrelated lines drawn in the sixth column, saying they
are not that column's commits, joined into a single branch by the stroke
between them.

A folded mark now carries no thread and no longer counts as a lane a
neighbouring thread may reach into, so the marks stand apart.

Measured on the ten-branch demo history (phone, 2x): the bundle column
was one 309 px run before, five separate runs after. The decoder test
asserts no thread at the bundle's lane plus their pixel x, and the two
screenshot scenarios assert no `<line>` at the bundle's x on a folded row
nor one reaching down into it from the row above.
@huichen
huichen enabled auto-merge (squash) November 22, 2026 15:18
@huichen
huichen merged commit 24c5b0d into main Nov 22, 2026
14 checks passed
@huichen
huichen deleted the pr/huichen branch November 22, 2026 15:35
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