Skip to content

Add refine option for two-pass sub-token diffs - #11

Merged
krkarma777 merged 1 commit into
masterfrom
feature/refine-option
Aug 31, 2026
Merged

Add refine option for two-pass sub-token diffs#11
krkarma777 merged 1 commit into
masterfrom
feature/refine-option

Conversation

@krkarma777

Copy link
Copy Markdown
Owner

Summary

  • New DiffOptions.refine (default false): after the primary diff, each adjacent delete/insert pair is re-diffed one granularity finer — word pairs by char, line pairs by word — so quickquicker reports the shared text as equal and just +er as the change
  • Entry merging is preserved across splice seams (no two adjacent entries share an operation); char mode ignores the flag (already finest)
  • Shared src/entries.ts now holds the DiffEntry/DiffOperation types and the merging pushEntry helper that was previously duplicated in chars.ts and scan.ts

Test Plan

  • 6 new tests: word→char and line→word refinement, char no-op, solo delete/insert passthrough, merge/order invariants, 600 refine fuzz round-trips
  • Full suite 34/34, typecheck clean

@krkarma777
krkarma777 merged commit b999c3c into master Aug 31, 2026
5 checks passed
@krkarma777
krkarma777 deleted the feature/refine-option branch August 31, 2026 01:50
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