Skip to content

Rename a delta to a crosscut, and offer one 2 stories share - #126

Merged
nedtwigg merged 3 commits into
mainfrom
crosscut-rename
Dec 1, 2026
Merged

nedtwigg merged 3 commits into
mainfrom
crosscut-rename

Conversation

@nedtwigg

@nedtwigg nedtwigg commented Dec 1, 2026

Copy link
Copy Markdown
Member

A delta, one change repeated across stories, is now a crosscut. "Delta" said nothing about the change being shared, and "group" would have meant two things, since a hunk group is hunks near each other in one story. A crosscut groups hunks by what they hold, across stories.

Glossary

  • Crosscut replaces Delta, and says how it differs from a hunk group.
  • Hunk and Hunk group are new: crosscut is defined in their terms, and they weren't in the glossary before.
  • Render batch is now defined by what it has: a commit, an environment, and a render per story, then the rest of render_batches. It no longer says "record", which the glossary uses for a pair's cached diff.
  • system.md → Future gains Composite hunks. Today two merges join changes: the differ's 12-pixel cut, which keeps no pieces, and hunk groups, which do. One merge that keeps its pieces would let a crosscut be agnostic to a raw or composite hunk. Not scheduled.

The rename

  • Files: deltas.ts becomes crosscuts.ts in shared/ and client/, and DeltaOffers.tsx becomes CrosscutOffers.tsx, with their tests and stories. selfie-ui/deltas becomes selfie-ui/crosscuts. CSS classes and identifiers are renamed too. deltaKeysOf becomes hunkKeysOfRow, since it returns a row's hunk keys.
  • Kept as they were:
    • The storage key selfie:accepted-deltas:<batch>, with a comment saying why, so no browser forgets what it accepted.
    • The numeric deltas: maxChannelDelta, and "delta 255" in flake notes.
    • product-demo/'s scene ID.
    • The JSON's hunkGroups.
    • The page's "Repeated changes" heading.

One behavior change: 2 stories, not 3

MIN_AFFECTED is 2. On #108, two stories with the same change read as one change, and offering nothing looked like the page had missed it. ui.md and its rationale say so. The tests that assumed 3 now check the same things at 2, and RepeatedChanges shows a 2-story offer.

Snapshots

Expect renamed and changed stories, which need approving:

  • Pages/Story/Deltas becomes Pages/Story/Crosscuts.
  • The batch stories named for deltas are renamed.
  • The copy now says "crosscut".
  • One offer in the batch stories has 2 stories.

Testing

pnpm test passes: ui 160, store 661, render 147, cli 553. /simplify ran. It brought a comment on the kept storage key, a diagram in system.md that still said 3, a 2-story story, and clearer glossary wording. Two optional renames are left for later: keysOf and hunkKeysOfRow.

🤖 Generated with Claude Code

nedtwigg and others added 3 commits November 30, 2026 16:37
…ssary

A crosscut is one change repeated across stories, grouped by what a hunk
holds. A hunk group is by where hunks are, in one story. Names only: the
accepted crosscuts keep their storage key, so none is forgotten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two stories with the same change read as one change, and offering
nothing looked like the page had missed it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nedtwigg
nedtwigg merged commit 4941371 into main Dec 1, 2026
5 checks passed
@nedtwigg
nedtwigg deleted the crosscut-rename branch December 1, 2026 00:51
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.

2 participants