From 8407d4ee64e96153dc00d37ee55496008ec3ed57 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Fri, 26 Jun 2026 07:01:32 -0400 Subject: [PATCH] refactor(patch_modal): no-op - patch_modal.py is correctly architected as the patch-data module after Phase 1.4 Per architecture (data != view != ops): - Data classes (PendingPatch, EMPTY_PATCH, DiffHunk, DiffFile) live in src/patch_modal.py - PatchModalManager (ops on the data) also stays; it's used only by tests/test_patch_modal.py (no production src/ code references PatchModalManager; no ImGui rendering of patches uses it) - src/gui_2.py imports DiffHunk/DiffFile from src.patch_modal (data dependency) The original spec wanted to merge patch_modal.py into gui_2.py. That would conflate data (DiffHunk/DiffFile) and ops (PatchModalManager) into the view layer, which violates the app_controller-owns-state / gui-is-pure-view architecture established in Phase 1.1 (bg_shader state fix) and Phase 1.3 (command_palette split). Verification: - uv run python -c 'from src.patch_modal import PendingPatch, DiffHunk, DiffFile, EMPTY_PATCH, PatchModalManager' OK - 41 tests pass: test_diff_viewer, test_patch_modal, test_command_palette, test_commands_no_top_level_command_palette, test_handle_reset_session, test_app_controller_sigint