Per spec FR1 + Phase 1.4 + architecture feedback (data != view):
- Data classes DiffHunk, DiffFile -> src/patch_modal.py (alongside PendingPatch; all patch-domain data)
- Operations parse_diff/parse_hunk_header/get_line_color/apply_patch_to_file (called by gui_2) -> src/gui_2.py
- GUI is a pure view; data lives elsewhere; no new files per AGENTS.md
Tests: tests/test_diff_viewer.py imports from src.gui_2 (parse_diff/apply_patch_to_file) and src.patch_modal (DiffFile/DiffHunk).
- Add create_backup() to backup files before patching
- Add apply_patch_to_file() to apply unified diff
- Add restore_from_backup() for rollback
- Add cleanup_backup() to remove backup files
- Add 15 unit tests for all patch operations
- Create src/diff_viewer.py with parse_diff function
- Parse unified diff into DiffFile and DiffHunk dataclasses
- Extract file paths, hunk headers, and line changes
- Add unit tests for diff parser