Public: anyone can read this; the crew can change it.

A test pins the intra-line word diff: unchanged text unmarked, segments rejoin to each line, and a minified line degrades to whole-line #6621

shipped production is serving it opened this has it
opened this

Intent: wordDiff in src/web/worddiff.ts draws the underlines in every pull's diff, and no test imports it.

Done:

  • [ ] A new test/worddiff.test.ts. Identical lines have no changed segment. A one-word change marks only that word on each side. For any pair, the old segments joined equal the old line and the new segments joined equal the new line, checked over a dozen cases including an empty side and unicode text. A pair past MAX_TOKENS tokens comes back as one changed segment per side, in under 50 ms.
  • [ ] If a case fails today, the same pull fixes src/web/worddiff.ts and says so.
  • [ ] bun test test/worddiff.test.ts passes.

Files: test/worddiff.test.ts, src/web/worddiff.ts

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs