Skip to content

Show each change id above its step - #48

Open
shukebeta wants to merge 1 commit into
minipai:mainfrom
shukebeta:visible-change-ids
Open

shukebeta wants to merge 1 commit into
minipai:mainfrom
shukebeta:visible-change-ids

Conversation

@shukebeta

@shukebeta shukebeta commented Sep 22, 2026 •

Copy link
Copy Markdown

What

Each step's change ids are now visible and clickable. Three parts:

  • The step's actions move out of the right gutter into a row above the step text, so the ids read as a label for the block rather than floating margin decoration.
  • LINK becomes a chain glyph (inline SVG, aria-label unchanged), which is what the wordmark was standing in for.
  • Each canonical change target renders its id (change-007) as a link to its own anchor, with the same padded hit area as the permalink.

Dropping the absolutely positioned gutter also returns the 68px it reserved to the step text and files.

Why

The main way I use diffwalk is an agent walking me through a report block by block. The agent names blocks the way the capture does — "the != in change-010" — but the id lived on a zero-sized span, so the reader was left matching prose against hunks by eye. Now the id is on screen where the anchor already was, and clicking it yields the shareable #change-010 link.

Tests

test/report.test.ts and test/report-dom.test.ts updated for the new markup: the permalink carries the glyph and keeps its label, and the change target is a link whose text is its id. tsc --noEmit clean; bun test ./test/report.test.ts ./test/report-dom.test.ts 81 pass / 0 fail.

Not done

Visual baselines need pnpm test:visual:update — the step gutter moves. I'm on Windows and can't reproduce the Linux/DejaVu renders CI compares against, so I didn't commit PNGs from the wrong platform.

An agent walking a reviewer through a report refers to blocks by their
change id ("see change-010"), but the target carrying that id was a
zero-sized span, so the reader had no way to tell which hunk was meant
short of guessing from the prose.

Move the step's actions out of the right gutter to a row above the step
text, replace the LINK wordmark with a chain glyph, and render each
change id beside it as its own link to that anchor.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@shukebeta shukebeta changed the title Show the change id on each change target Show each change id above its step Sep 22, 2026
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