feat(desktop): a Changes tab's diff may be split side by side, its changed words marked
Closed
DA
2d ago+705+705+012345678901234567890123456789-33-33-01234567890123456789
Summary
This is #2921's split diff view, split out of #3030 (the plan Add PR tab) so #3030 stays focused on the Pull request tab. #2921 was closed when that work took this over. These are #2921's own two commits, as its agent left them on c930664c6, cherry-picked onto main without changes.
changes-model.tspairs a hunk's removed and added lines side by side (splitRows) and marks the words that changed within a pair (markChangedWords). Git's "No newline" note stands on its own line and is never paired.- The diff view draws either unified or split rows. The diff's ⋯ menu gains Split view and Highlight changed words. Both are saved with the File tabs' settings, and settings saved before this change still load.
planning.css: the narrow-panel rule that hides the first line-number column no longer applies to split rows. Otherwise each side would lose its only number.
Evidence
changes-model.test.ts(6 tests) andagent-changes-tab.test.ts(3 tests), from #2921.vitest run apps/desktop/src/renderer/planning: 655 passed.tsc,oxlintandbiomeare clean for desktop.- #2921's CI passed on the commit before its rebase (
3bd866df2). Devin's one finding there is fixed (the second commit).
Notes
- Not checked on macOS.
- When #3030 lands, the Changes tab is the Pull request tab's Files changed view. Whichever of the two merges second will need a small rebase in
agent-changes-tab.tsx.
Made with Luke
Summary by cubic
Lets the Changes tab's diff be split side by side, with each hunk's removed and added lines paired and the words that changed within each pair marked. Two new items in the ⋯ menu — Split view and Highlight changed words — control this and are saved with the existing File tabs' settings, so choices persist across launches and settings saved before this change still load with the new options at their defaults.