diff --git a/CLAUDE.md b/CLAUDE.md index 3bd660a..add9d08 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2684,11 +2684,29 @@ duplicate above); the `app` container rebuilt each time, and the served bundle hash-matched against the local build output and confirmed to contain `txn-actions-row`/ `txn-actions-right` while `txn-col-head-actions` no longer appears anywhere. No backend touched - pure template reordering + CSS, so `backend/measure.py` doesn't -apply. **Not machine-verified:** the actual rendered alignment/spacing in a real -browser - Claude-in-Chrome still did not connect (tried again both passes) - same -standing limitation as every other UI-only change in this project; this one in -particular needs the user's own look, since it's a pure visual-alignment request and -the first pass already shipped a misread of it once. +apply. + +**Third pass, same day: the two headings were still a few pixels off vertically.** +Root cause, reasoned through rather than guessed at a pixel offset: `.pdf-col-head` +is `align-items:center` with the zoom-control buttons (26px tall, the tallest thing +that can appear in that row) as a sibling, so "Source Document" sits vertically +CENTERED within a 26px-tall row, a few px below the row's own top edge. Once +`.txn-col-head`'s own actions moved out (the second-pass fix above), that row had +NOTHING but its own h2 left in it - its height collapsed to the h2's own shorter +line-box, with no centering offset at all, so "Transactions" sat flush at the row's +top while "Source Document" sat a few px lower. Fixed with `min-height:26px` on +BOTH `.pdf-col-head` and `.txn-col-head` (not just the one that looked wrong) - +guarantees the same row height, and therefore the same centered text position, in +EVERY state, including before any file is even loaded (when `.pdf-col-head`'s own +zoom controls aren't rendered yet either, `v-if="previewUrl"` - without this fix on +both sides, the two headings would have realigned differently depending on whether +a document was loaded, not just whether Transactions had actions beside it). + +Verified: `npm run build` passes; the `app` container rebuilt, and the served CSS +bundle (hash-matched against the local build) confirmed to contain both new +`min-height:26px` rules. **Not machine-verified:** the actual rendered alignment in +a real browser - Claude-in-Chrome still did not connect (tried a third time) - same +standing limitation as every other UI-only change in this project. **Governing rule: never silently correct or exclude data.** This shows up in several concrete places, not just as an abstract principle: diff --git a/frontend/src/assets/main.css b/frontend/src/assets/main.css index 6a0ce12..88131bd 100644 --- a/frontend/src/assets/main.css +++ b/frontend/src/assets/main.css @@ -444,8 +444,19 @@ tr.editing td{ background:rgba(37,99,235,.03); } own padding, taller than .txn-col's own flat height and visibly mismatched. 102.5vh = the original 82vh increased 25% per request. */ .pdf-col{ flex:0 0 40%; min-width:260px; display:flex; flex-direction:column; height:102.5vh; } +/* min-height:26px (the zoom-control buttons' own height, the tallest + thing that can appear in this row) keeps "Source Document" vertically + centered at the SAME position whether or not those buttons are + present yet (before a file loads, this row would otherwise collapse + to just the h2's own shorter line-box) - and, matched on + .txn-col-head below, is what actually lines "Source Document" up + with "Transactions": that row has nothing BUT its own h2 now (its + actions moved below, see .txn-actions-row), so without an explicit + min-height here too, its line-box-only height would sit a few px + higher than this row's centered text. */ .pdf-col-head{ - display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; flex-shrink:0; + display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; + min-height:26px; flex-shrink:0; } .pdf-col-head h2{ margin-bottom:0; } /* Replaces the old native