Commit 2b13986
feat: simplify diff views to side-by-side and split modes with word-level highlighting (#2108)
* feat: add side-by-side diff view option for ApplyView
Add a toggle to switch between inline and side-by-side diff views in the
ApplyView component. The side-by-side view shows original content on the
left and modified content on the right, with word-level diff highlighting.
- Add diffViewMode setting to persist user preference
- Add Tabs UI in header to switch between views
- Create SideBySideBlock component for two-column diff display
- Support word-level highlighting for paired add/remove lines
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* fix: preserve change order in side-by-side diff view
Fix issue where splitting block into removedLines and addedLines and
pairing by index would incorrectly pair unrelated lines. Now iterates
through the block in order and only pairs removed+added when they are
adjacent (indicating an actual replacement).
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* feat: simplify diff views to side-by-side and split modes with word-level highlighting
- Remove inline diff mode, keeping only side-by-side and split modes
- Add word-level highlighting to both modes for clearer change visualization
- Split mode shows original and modified content separately with highlighted words
- Side-by-side mode pairs adjacent changes with word-level diff
- Default to split mode for cleaner diff view on large changes
- Add migration for users who had inline mode saved in settings
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* fix: add JSDoc to wordLevelDiff and fallback for diffViewMode setting
- Add JSDoc documentation to the wordLevelDiff function to comply with
project coding standards
- Add nullish coalescing fallback for diffViewMode setting so users
with pre-existing settings get a deterministic default value
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* refactor: extract shared diff utilities and reduce code duplication
- Extract buildDiffRows function to eliminate duplicate row-building logic
- Create WordDiffSpan and DiffCell components for unified diff rendering
- Simplify tokenizer using regex-based split for better performance
- Add useMemo to prevent unnecessary recalculations
- Reduce file from ~813 to ~707 lines (~13% reduction)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
---------
Co-authored-by: Claude Opus 4.5 <[email protected]>1 parent 7f8b943 commit 2b13986
File tree
3 files changed
+306
-70
lines changed- src
- components/composer
- settings
3 files changed
+306
-70
lines changed
0 commit comments