Skip to content

Add AppKit NSTextDiffView API and unify SwiftUI rendering#2

Merged
iSapozhnik merged 3 commits intomainfrom
codex/nstextdiffview-appkit-parity
Feb 17, 2026
Merged

Add AppKit NSTextDiffView API and unify SwiftUI rendering#2
iSapozhnik merged 3 commits intomainfrom
codex/nstextdiffview-appkit-parity

Conversation

@iSapozhnik
Copy link
Owner

@iSapozhnik iSapozhnik commented Feb 17, 2026

Summary

  • add public NSTextDiffView with API parity to SwiftUI TextDiffView (original, updated, style, mode)
  • move AppKit drawing and diff-update lifecycle into NSTextDiffView with guarded recompute for unchanged inputs
  • refactor TextDiffView/DiffTextViewRepresentable to use NSTextDiffView as the shared rendering path
  • split DiffTextLayoutMetrics into its own file and remove old DiffCanvasView
  • update README with AppKit usage, update-in-place example, sizing notes, and snapshot docs

Tests

  • swift test 2>&1 | xcsift

Added coverage

  • new behavior tests for NSTextDiffView updates/recompute semantics
  • new direct AppKit snapshot suite and baselines under Tests/TextDiffTests/__Snapshots__/NSTextDiffSnapshotTests/

@iSapozhnik iSapozhnik force-pushed the codex/nstextdiffview-appkit-parity branch from de2a063 to b6bd365 Compare February 17, 2026 20:28
@iSapozhnik iSapozhnik merged commit c6d5bf2 into main Feb 17, 2026
2 checks passed
@iSapozhnik iSapozhnik deleted the codex/nstextdiffview-appkit-parity branch February 17, 2026 22:08
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