feat: SSR diff page with Cohen-annotated hunk headers
Replace client-side diff.ts rendering with full server-side rendering. diff_page now fetches both snapshot manifests, batch-reads object content, runs difflib.unified_diff + annotate_hunk_action, and passes annotated file diffs to the template. No loading spinner on first paint.
- _build_file_diffs: batches object reads, annotates hunks with [change: *] labels - diff.html: renders stats bar + file cards + diff table rows server-side - Added df3-dl-hunk row type and df3-ln-hunk/trunc styles - 9 TDD tests (test_diff_page_ssr.py) all green
sha256:672ab421d152e0e187a6d0a6411d2c2d4aadcb3e52ef5018e33ddc5b8ef6f32d
sha
+48
~2
symbols
sha256:480c7f3e6462d02ac1424989c0232e9a244158a7974788a689228a58c2d0a408
snapshot
+48
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes
50 symbols
+
test_diff_page_added_file_shows_plus_lines
function
async_function test_diff_page_added_file_shows_plus_lines L237–258
+
test_diff_page_modified_file_shows_add_and_del_lines
function
async_function test_diff_page_modified_file_shows_add_and_del_lines L306–323
+
test_diff_page_modified_file_shows_cohen_hunk_header
function
async_function test_diff_page_modified_file_shows_cohen_hunk_header L285–302
+
test_diff_page_no_changes_shows_empty_state
function
async_function test_diff_page_no_changes_shows_empty_state L353–373
+
test_diff_page_removed_file_shows_minus_lines
function
async_function test_diff_page_removed_file_shows_minus_lines L262–281
+
test_diff_page_renders_stats_bar
function
async_function test_diff_page_renders_stats_bar L217–233
+
test_diff_page_renders_without_loading_spinner
function
async_function test_diff_page_renders_without_loading_spinner L197–213
+
test_diff_page_returns_200_for_unknown_commit
function
async_function test_diff_page_returns_200_for_unknown_commit L377–389
+
test_diff_page_root_commit_no_parent_shows_added_file
function
async_function test_diff_page_root_commit_no_parent_shows_added_file L327–349
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:672ab421d152e0e187a6d0a6411d2c2d4aadcb3e52ef5018e33ddc5b8ef6f32d --body "your comment"
No comments yet. Be the first to start the discussion.