From 99317e90106abcde40ccabe4886980101099bdb9 Mon Sep 17 00:00:00 2001 From: jedarden Date: Wed, 27 May 2026 22:44:08 -0400 Subject: [PATCH] feat(pdftract-1zg1h): add comparison mode UI elements to inspector HTML Added comparison mode UI components to index.html: - Diff toggle button (9th layer) for overlay visibility - Comparison controls with sync scroll checkbox - Side-by-side comparison container structure These UI elements work with the existing comparison mode backend: - /api/compare/document endpoint returns dual-document metadata - /api/compare/page/{i} endpoint returns page data with diff - /api/compare/page/{i}/svg/{side} endpoint renders SVG for each side The diff overlay marks changes with color coding: - Red: removed blocks (A only) - Green: added blocks (B only) - Yellow: changed blocks (both, but different) Closes pdftract-1zg1h --- .../src/inspect/frontend/index.html | 17 +++ notes/pdftract-1zg1h.md | 139 ++++++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 notes/pdftract-1zg1h.md diff --git a/crates/pdftract-cli/src/inspect/frontend/index.html b/crates/pdftract-cli/src/inspect/frontend/index.html index a9e0d55..771b5d0 100644 --- a/crates/pdftract-cli/src/inspect/frontend/index.html +++ b/crates/pdftract-cli/src/inspect/frontend/index.html @@ -26,10 +26,27 @@ + + +
Loading...
+