Skip to content

docs(git-graph): write the palette index as the modulo it is - #1670

Merged
huichen merged 1 commit into
mainfrom
pr/huichen
Nov 22, 2026
Merged

huichen merged 1 commit into
mainfrom
pr/huichen

Conversation

@huichen

@huichen huichen commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

What

Correct the palette-contract comment in packages/git-graph/src/palette.ts: the decoder indexes the palette with palette[column % palette.length], not column * length.

Why

The old wording described an expression the decoder never used, so the comment documented behaviour that does not exist. This is a comment-only change: no executable line is touched, and the palette itself is unchanged.

Commits

  • docs(git-graph): write the palette index as the modulo it is

Verification

  • git diff -U0 origin/main...dev-huichen shows every changed line inside the /** ... */ block comment in packages/git-graph/src/palette.ts (all additions and deletions start with *); no code line changed.
  • npx tsc --noEmit -p packages/git-graph/tsconfig.json -> exit 0.
  • Rust and application tests were not run: the diff cannot affect them.

User-visible changes

None: only a doc comment is corrected; rendering and palette values are unchanged.

The comment said the decoder paints `column * length`; the code paints `palette[column % palette.length]`. A multiplication would be meaningless — the index is the column taken modulo the palette size.
@huichen
huichen enabled auto-merge (squash) November 22, 2026 07:17
@huichen
huichen merged commit afd642d into main Nov 22, 2026
14 checks passed
@huichen
huichen deleted the pr/huichen branch November 22, 2026 07:31
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