!!state.user alone only reflects whether a user record was ever
persisted (login), not whether that session's token is still valid -
pb.authStore keeps the record around across a token's own expiry with
nothing clearing it automatically. Root cause of a reported "my
documents disappeared and uploads fail with 'The requested resource
wasn't found'" symptom: the full authenticated shell kept rendering
while every PocketBase call silently ran as unauthenticated. Now checks
pb.authStore.isValid (decodes the token's own exp claim) too.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Three new export formats, all reusing this pipeline's existing
transactions data with no new extraction logic:
- QBO (QuickBooks Web Connect / Quicken): qbo_service.py writes OFX 1.x
SGML directly, including <INTU.BID>3000 so it actually qualifies as a
real QBO/QFX file (corrected same day from an initial build that
produced plain generic OFX with a .qbo extension slapped on - see
CLAUDE.md for the research trail). Needs a reusable, project-scoped
bankAccountProfiles record (pb_migrations/14) so a user isn't re-typing
routing/account numbers on every export of the same real account.
- Xero (import CSV): xero_csv_service.py, no bank-account concept at all
(Xero's own CSV import has none) - genuinely simpler than QBO.
- A plain, generic transactions CSV (csv_service.py) - distinct from
Xero's import-specific shape, writes every row regardless of a missing
date/amount since a plain dump has no structural requirement to violate.
The three original separate download buttons were consolidated into one
Download trigger + hover dropdown (QuickBooks/Xero/CSV/Excel), reusing
the Results dropdown's own zero-dead-zone hover structure. Excel's and
the new CSV's single/all download logic was generalized behind one
DOWNLOAD_FORMATS lookup rather than duplicated.
Also adds a per-transaction "include in downloads" checkbox - a lighter,
reversible alternative to permanently deleting a row: excludedFromExport
lives on the document's own result, read only at download time, with
zero effect on the live review screen's own data/checks.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The first piece of a stated future billing model, scoped to exactly
this: a visible "pages this month" counter and the raw data recording
behind it - not plan enforcement, payment processing, or the described
pause/resume billing-cycle logic itself. New append-only/immutable
usageEvents collection (pb_migrations/13); one event recorded per
successfully delivered extraction (result.page_reports.length), not a
Preview click. "This period" is explicitly the calendar month - a
placeholder until a real subscription/plan record exists to anchor a
custom cycle against.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Probes a staged bare image's own naturalWidth (fired, not awaited, so
staging stays synchronous) and flags one below LOW_RESOLUTION_WIDTH_PX -
deliberately the same threshold raw_ocr_extract._MIN_OCR_WIDTH_PX uses
server-side to decide whether to upscale before OCR, kept in sync rather
than two independently-chosen numbers. Inline warning under the staged
file's name, not a blocking modal - both real choices (pick a different
file, or proceed anyway) are already on screen.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
A needs-mapping statement in a multi-file batch used to live in a
single global slot (layoutMapperStore), so mapping the first of several
such statements silently lost the rest. Each one is now a placeholder
document in extractionStore's own documents list (with a pendingMapping
field carrying its file/fingerprint/candidate data), reachable via
DocumentNavBar and a per-document "Map now" reminder in TransactionsTable,
with a clickable notice banner linking straight to each queued statement.
Also makes this survive a reload: a needs-mapping placeholder is now
saved to PocketBase (documentsService.savePendingMappingDocument,
pb_migrations/12 relaxes documents.result to optional and adds the
pending* fields) instead of living only in memory, and useDocuments.js
reconstructs it as a placeholder on load. Includes the confirm-before-
remapping step for correcting an already-successful document, and the
delete-flow guard for a placeholder with no PocketBase id yet.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Compute a fingerprint unconditionally on every successful extraction
(not just the two failure paths), so a "Map" button on an already-
successful document can open the manual mapping screen to CORRECT it
via a real fingerprint, not just the auto-triggered failure flow.
- Extend forced-mapping support to OCR-sourced statements (scanned PDFs
and raw photos): raw_ocr_extract.py gains forced_zones/header_bottom/
date_format/value_patterns support and a new header_candidate_geometry
for OCR-derived fingerprinting; a forced OCR mapping bypasses Docling's
table-structure call entirely.
- Recognize parenthesized negative amounts ("(25.00)") via a shared
_split_sign() helper used by both _parse_money() and
_parse_money_with_patterns() - fixes a real blank-extraction bug on a
single-Amount-column statement using this accounting convention.
- Upscale a low-resolution image before OCR (_MIN_OCR_WIDTH_PX) - a real
480x800px phone photo was barely readable by tesserocr at native size.
- ManualMappingView.vue: no longer requires a Balance column (some real
statements don't print one), and imagePointScale converts a drawn
region's coordinates from an image's natural-pixel space into PDF
points before sending a forced mapping - every image-sourced mapping
before this sent zones in the wrong coordinate space entirely.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
A deliberate scope expansion past this product's original "does not
categorize transactions" boundary: project-scoped categorizationRules
(PocketBase), pure-JS matching (longest-pattern-wins, case-insensitive
substring), a Categorization tab beside Transactions, and an optional
"Categorized Summary" sheet in the Excel export. Categorization is
computed live from current rules and never persisted on the document
itself - only the rules persist.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
useBatchExtraction.js gets an else-if branch for needs_value_confirmation,
parallel to the existing needs_mapping one - reuses resolveNeedsMapping()
as-is (it's already fingerprint-only, agnostic to why resolution was
needed) and routes 'no_match' to a new layoutMapperStore.setPendingValueConfirmation()
instead of setPending().
ManualMappingView.vue gains a second mode (told apart by whether
pendingCandidateRow is set): a "Confirm values" card replacing region-
drawing - one row per field, raw text as read, an editable correction,
validated inline (empty-value and non-substring rejection, per explicit
requirement). The derived {stripPrefix?, stripSuffix?} per field is the
only thing sent as forcedMapping - no columnMap, letting auto-detection
resolve everything else.
Two real bugs caught by this stage's own testing: hasRequiredShape (the
region-drawing mode's Preview gate) stays permanently false in the new
mode since columnMap never populates there - fixed with a new canPreview
that branches per mode. The validation/diff logic's own substring check
didn't separate a leading "-" before comparing, so correcting a negative
value like "-CAD50.00" to "-50.00" failed validation outright (not a
contiguous substring) - the same bug already fixed on the backend earlier
the same day, reintroduced independently since the logic isn't shared.
LayoutsView.vue's own separate forcedMappingFor() (used by "Test") gets
the same valuePatterns key; Inspect gains a note for an empty columnMap
and a new card showing the saved cleanup rule itself.
Verified end to end against the real stack (19 assertions, actual
service/composable files): upload triggers needs_value_confirmation,
the derived pattern previews and saves correctly with no columnMap, the
real PocketBase superuser approves it via the existing L.8 review screen
unmodified, and a completely independent third-party user auto-applies
it via exact fingerprint match. measure.py byte-identical to baseline.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
.pdf-col-head centers "Source Document" within a 26px row (height set
by its zoom-control buttons). .txn-col-head's own row collapsed to just
its h2's line-box once its actions moved out, losing that same
centering offset, so "Transactions" sat a few px higher. Gave both
rows an explicit min-height:26px so they match in every state,
including before any file loads.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Previous commit put "Move to project" up into the Transactions title
row - wrong per explicit correction. Transactions is now just the bare
heading (aligning with Source Document). A new row directly above the
balance fields holds "Move to project" at the left and Flagged
only/Next flagged/Hide Source Doc grouped at the right.
Also fixes a duplicate .txn-top-bar block left over from the prior
commit's own edit, caught before this build.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The Transactions heading sat below two other rows while Source
Document was the first thing in its own column, so the two never lined
up. Reordered TransactionsTable.vue's template: the title row (now
also hosting "Move to project", moved off its own standalone row) is
first, and the former top bar (Results/DocumentNavBar/Accept/Download)
drops into the vertical slot that row vacated.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
TransactionRow.vue's "Show on source" highlighting was only reachable
through a flagged row's flag-detail panel. Now clicking anywhere in a
row outside its own action buttons (.row-actions - Edit/Save/Cancel/
flag toggle/more-actions menu, all unaffected) triggers the same
highlight, so any row with real position data can be located on the
source document, not just a flagged one.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New AdminLayoutReviewView.vue (/admin/layouts), rendered by App.vue
outside the normal authStore-gated shell entirely - a PocketBase
superuser is never a `users` record. Its own inline login against
pbAdmin's `_superusers` collection; lists every private mapping across
every owner (a superuser session bypasses collection rules); each row
expands into a read-only SourceDocumentPanel inspection (reusing L.7's
labeled-strip pattern) plus an Approve action that promotes straight to
shared, independent of the two-user confirmation hook.
adminLayoutsService.js gains getSourceDocument()/sourceFileUrl(), both
routed through pbAdmin since the mapping's sourceDocument belongs to its
owner, not the superuser.
Verified end to end against the real running stack (15 assertions via
the actual service files, not reimplementations): a fresh app user's
private mapping is visible to and approvable by the real superuser, its
source file round-trips byte-for-byte, and a completely independent
third-party user immediately resolves the now-shared mapping via
findByFingerprintHash. npm run build passes; app container rebuilt.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New /layouts route (LayoutsView.vue, linked from AppHeader.vue): List (own + shared
mappings with usage/failure stats), Inspect (source document with each column drawn
as a labeled vertical strip), Test (an unsaved dry run against any of the user's own
documents), Version history + Roll back (append-only - a rollback creates a new
version rather than editing history), and Retire. The plan's own "Edit" (reopening
ManualMappingView pre-populated) was deliberately dropped - columnMap never persists
page/vertical position, so there's no real data to re-populate a visual editor with.
Drift detection now runs on every recheck, not just the original extraction -
useRowEditing.js and TransactionRow.vue both call the same recordUsage() useBatchExtraction.js
already used, via a newly shared layoutMappingsService.checksPassed(). Required
threading layoutMappingUsed/layoutMappingVersionUsed onto the in-memory document
object too (extractionStore/useDocuments/useBatchExtraction), not just the PocketBase
record.
Found and fixed two real bugs via this stage's own end-to-end testing, both in the
same "computed correctly this session, never persisted" category as L.6's zone-padding
fix: startPage itself was never saved, so every future auto-apply of a saved mapping
would have silently reset to page 1, reintroducing the cover-page bug L.2 already
fixed once. Worse: startPage alone only skips whole pages - it does nothing about the
real header row text still sitting on the start page itself, which would have
corrupted essentially every real manually-mapped statement. Fixed with two new
persisted fields (startPage, headerBottom) and a new header_bottom parameter in
table_extract.py, using the same zone-padding margin as a safety buffer.
Verified against the real rebuilt container: a 2-page synthetic statement confirmed
both bugs real before their fixes and confirmed both fixed together; a second,
independent upload auto-applies the saved mapping with both fields carried through;
sourceDocument backfill, version history/rollback, retire, and real three-user
promotion all confirmed against the real PocketBase; a separate test confirmed the
recheck-triggered drift detection itself, flipping a real mapping to stale after a
deliberately broken running-balance edit. measure.py byte-identical throughout; npm
run build passes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New /map-layout route (ManualMappingView.vue): draw a box over each column on the
source document, assign it a role, set date format/sign convention/ignored rows,
Preview (required before Save) runs the real forced-mapping extraction and shows
the first ten rows plus the balance check outcome, Save Mapping persists the
mapping + an initial version + the document. A real File can't survive a router
navigation, so a new layoutMapperStore holds the one pending file + fingerprint in
memory; ExtractorView.vue shows a banner linking to the mapper while one is set.
Two real bugs found by actually wiring this up and testing it end to end:
useBatchExtraction.js was reading fingerprintHash from the wrong (post-reassignment)
response, which never carries that field - would have silently left
documents.layoutFingerprintHash unset for every mapping-applied extraction. More
consequential: forced-mapping column zones were completely unpadded, so a word
landing a fraction of a point past a raw boundary (or a human's own imprecise drag)
could silently exclude a whole transaction with no error - fixed with a new
_FORCED_ZONE_PADDING in table_extract.py, the same discipline the auto-detected
path's own zones already use.
Verified end to end against a hand-built synthetic statement (unmatchable gibberish
headers, 3 real transaction rows at known coordinates) through the real rebuilt
container: Preview correctly extracts all 3 transactions with a passing balance
check; Save persists correctly (confirmed on the re-fetched document record, not
the create response); a second, independent upload of the identical file then
silently auto-applies the saved mapping with zero further input, producing
byte-identical results to the manual Preview - the actual proof this feature
exists for. measure.py byte-identical throughout; a regression re-run of the
earlier Equals Money forced-mapping test confirmed the zone-padding fix changed
nothing there. npm run build passes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
usePdfViewer.js/useImageZoom.js gain a parallel highlights/showHighlights/
clearHighlights (several labeled boxes at once) alongside the existing single
highlight/showHighlight/clearHighlight the review screen already depends on -
that call site needed zero changes. SourceDocumentPanel.vue exposes both and
renders the plural boxes via a new v-for. New useRegionDraw.js composable adds
the click-and-drag-to-define-a-region interaction the manual mapping screen
(L.6) will use, wired in via a new regionDrawMode prop + region-drawn emit, a
no-op everywhere today. Both viewers now also expose their own raw zoom ref
(previously only a formatted display string was public) so the region tool can
convert a drawn pixel rectangle back into PDF-point/image-pixel space.
Verified: 21 assertions against the real composables (a fake window.addEventListener
is the only browser API useRegionDraw touches, so no real DOM was needed) - drag
math divides correctly by zoom, an up-left drag still normalizes to a positive box,
a sub-threshold drag never fires, and the new multi-highlight state never disturbs
the existing single-highlight state. npm run build passes; the app container
rebuilt and confirmed serving the new bundle. measure.py unaffected (no backend
touched). Not machine-verified: actual on-screen rendering and a real mouse drag,
same standing limitation as every other frontend-only change this session.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
useBatchExtraction.js now reacts to a needs_mapping:true response: looks up an
exact or near-match layout mapping (layoutMappingsService.js), applies it silently
on an exact match, asks for confirmation on a stale exact match or a near match via
a real ConfirmModal wired through ExtractorView.vue (not a placeholder), and falls
through to reason:'no_match' when nothing matches (the manual mapping screen's own
entry point, not built yet). A used mapping's usage is recorded for drift detection
and persisted onto the saved document record.
Found and fixed two real bugs in the near-match comparator by testing it against
the spec's own documented example (Debit/Credit renamed to Withdrawals/Deposits):
compute_fingerprint was building header_labels from whole header LINES instead of
per-field label text, making a two-word rename indistinguishable from a totally
different layout; added a field_labels map so the comparison is per-field. Even
after that, the first 70% overlap threshold still failed the documented example
itself (a 4-field rename of 2 fields is exactly 50%) - corrected to 50%, derived
from the example's own real numbers.
Verified: 18 assertions against the real layoutMappingsService/useLayoutMapping
(hard gates, the corrected per-field overlap, real PocketBase ownership/sharing
rules, stale-mapping decline/accept, no-match reporting); the real rebuilt
container's /api/process response now carries the fixed field_labels shape;
measure.py byte-identical throughout; npm run build passes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Completes the R.1-R.5 review screen plan. editLog/acknowledgedFlags/accepted all
live on the existing result JSON blob, no new PocketBase migration needed. Every
row mutation (manual edit, suggested-fix apply, structural edits) now logs a
field-level edit log entry; flags can be individually acknowledged; a document
can be Accepted once Verified or fully acknowledged; exports gain an optional
Edits sheet when edit_log is non-empty.
Verified: measure.py byte-identical to the pre-R.5 baseline, real curl round trip
through the rebuilt container confirming the Edits sheet appears/omits correctly,
extractionStore's new getters/actions run directly against real Pinia, and
useRowEditing's edit-log capture confirmed against a document actually persisted
on the live PocketBase container.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Frontend-only, as planned - /api/recheck already accepts any
transactions array regardless of length. Four extractionStore.js
actions: flipTransactionSign, deleteTransaction,
insertTransactionAfter(index, template?), mergeWithNext.
Two deliberate scope deviations, both for the same reason - don't
build something that doesn't actually apply:
- No separate splitTransaction action. "Split this row" is
insertTransactionAfter(index, {...row}) - duplicates the row's own
current values into a new row right after it rather than guessing
where to divide the amount, same "never silently correct" rule as
everywhere else. The user edits both rows manually afterward.
- No "bulk column fix" (date-format swap) - R.3 already established
this pipeline's dates have no day/month ambiguity left by the time a
transaction reaches this layer, so there's nothing for a bulk date
fix to do.
All four live behind a new "more actions" popover on TransactionRow.vue
rather than more always-visible icons - these are rarer, and two are
destructive. Delete and merge each go through the same ConfirmModal
(danger/busy) pattern every other destructive action in this app
already uses. mergeWithNext concatenates descriptions, sums amounts,
keeps the later row's own balance, and unions source_bbox when both
rows share a page, so "Show on source" still boxes the full merged area
afterward.
A new shared persistAndRecheck() in TransactionRow.vue replaces what
R.3's applySuggestedFix had inline - one function all five of this
component's own mutation paths now call.
Verified: all four actions executed directly against real Pinia plus
the real running backend - flip-then-restore, an insert-then-delete
round trip, and a real merge checked field-by-field (description
concatenation, summed amount, later row's own balance, unioned bbox),
including persisting the resulting shorter array for real and
confirming both /api/recheck and the PocketBase record itself accept
and reflect a 31-row statement that started at 32. measure.py
unaffected (no backend touched).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New backend/services/suggested_fixes_service.py, wired into
pipeline_service.py's run()/recheck() (both now return a suggestions
list alongside status/checks - no new endpoint needed).
Three patterns, tried in order so a row already explained by a sign
flip isn't also offered a digit-level fix: debit/credit swapped,
transposed digits, OCR digit misread. Each is tested empirically -
apply the candidate value to a copy of the real transactions and
re-run the actual check_running_balance - rather than hand-derived
from that check's own bridging/direction math, which is both safer
and simpler than tracing which row a bridged, auto-direction-detected
mismatch is "really" about.
"Date format swapped" was investigated and found not to apply to this
pipeline's data at all, documented directly in the new module's own
docstring rather than silently skipped: by the time a transaction
reaches this module its date is already normalized to "DD Mon YYYY"
(month already a name, not a number), so the raw numeric day/month
ambiguity that pattern addresses was already resolved upstream at
extraction time.
A real bug, found by the first end-to-end test and not by reading the
code: the running-balance check's own bridging logic means a mismatch
recorded at row i can be caused by row i or row i-1's amount - the
backend already tried both as fix candidates, but the frontend matched
a suggestion to a row by the fix target's own index, while the flag
icon only ever appears on the row the mismatch itself is reported
against. Confirmed for real: corrupting row 5 surfaced the mismatch on
row 6, so the correct suggestion (fix row 5) was completely unreachable
from the UI. Fixed by adding flag_index (the row shown flagged)
alongside index (the row the fix applies to) - TransactionRow.vue now
looks up by flag_index and always applies to suggestion.index.
TransactionRow.vue's suggestion UI lives in R.2's same flag-detail
panel; "Apply fix" runs the same save->persist->recheck pipeline a
manual edit already uses. extractionStore.applyCheckResults now
re-applies suggestions on every recheck, not just once, so a stale one
a manual edit already resolved disappears on its own.
Verified: three corruption patterns run through the real container via
curl against a known-good fixture, each detected and correctly
reverse-fixed at the right index. The real HSBC-Aug Cancelled-wire
mismatch (a genuine non-error case) correctly produces zero
suggestions. The full apply->persist->recheck->restore round trip
executed directly against real Pinia plus the real running PocketBase,
confirming the persisted record (not just local state) reflects the
fix. measure.py unaffected.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The piece that gives R.1's highlighting infrastructure something to do,
and the first genuinely new review-screen UI (R.1 was all plumbing -
same page, same components, just a different PDF renderer underneath).
New flagCatalogService.js translates each check's own raw mismatch/
issue data into a four-part plain-language flag (what/where/why/what to
do). Only running_balance/date_sanity/structure_sanity/
narrative_direction ever carry row-level data - the other three checks
are whole-statement, confirmed by reading checks_service.py directly.
date_sanity/structure_sanity return a free-text issue string, not a
structured type - pattern-matched against the backend's own known
message shapes, with a fallback that always shows the raw text rather
than silently dropping it if that text ever changes.
TransactionRow.vue gained a flag-icon toggle opening a second <tr> with
every flag's own explanation (Vue 3 supports multi-root components, so
this is a real sibling row, not a wrapped div that would break the
table's HTML) and a "Show on source" button.
The real design question: how does a flagged row (deep inside
TransactionsTable) tell the source panel (a sibling three levels up, no
direct prop/event path) to highlight itself? Solved with
uiStore.highlightRequest as the bridge - TransactionRow sets it,
ExtractorView (which holds the actual ref to SourceDocumentPanel)
watches it and calls the panel's own showHighlight(), built in R.1 but
unused until now. SourceDocumentPanel also clears both the request and
its own highlight state whenever the active document changes, so a
stale box never lingers over a different document.
useTransactionFilters.js gained a flaggedOnly toggle; TransactionsTable
added "Flagged only"/"Next flagged" buttons (shown only when something
is actually flagged) - the latter cycles through flagged rows via
scrollIntoView on each row's own id, wrapping after the last.
Verified: flagsForIndex executed directly against real backend output
(a live /api/process call against the HSBC-Aug fixture, which has a
real documented running_balance mismatch) plus synthetic data covering
every builder's own branches, including two checks flagging the same
row and confirming whole-statement checks never contribute a row flag.
npm run build passes, the app container rebuilt, measure.py unaffected
(pure frontend presentation, no backend touched). Not machine-verified:
the actual click-through - Claude-in-Chrome did not connect this
session.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reported: a newly loaded document didn't show up under its project in
the sidebar, with the same gap correctly anticipated for a document
moved from the transactions view.
Root cause: ProjectSidebar.vue's own per-project document list was a
reactive({}) local to that one component, lazy-loaded once per project
on first expand and cached indefinitely - nothing else in the app had
any way to tell it something changed.
Moved the cache into projectsStore.js (documentsByProject, keyed by
project id) - the natural shared owner. Four new actions:
loadProjectDocuments (the same lazy-fetch-once behavior, just
relocated), addDocumentToCache/removeDocumentFromCache/
moveDocumentInCache, each a no-op if that project was never expanded
so call sites don't need to know or care. All three real mutation
sites now call the relevant action right after their own successful
backend call: useBatchExtraction.js (new document), TransactionsTable's
"Move to project" (called before the document's own project field is
mutated, so the old project id is still readable), and
DocumentNavBar's delete (which didn't even import projectsStore
before). ProjectSidebar's own per-document delete now calls the same
shared action instead of mutating local state.
Verified end-to-end against the real running PocketBase: created a
project, loaded its cache, created a document and confirmed it
appeared immediately, moved it to a second project and confirmed it
left the first project's cache and entered the second's, deleted it
and confirmed it cleared - then re-fetched directly from PocketBase
and confirmed server-side state matched the client cache exactly at
every step. measure.py unaffected (no backend touched). Not
machine-verified: the sidebar UI itself reflecting this without a
manual collapse/re-expand - Claude-in-Chrome did not connect this
session.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reported: pages appeared blank/"a silhouette" on first load and
refresh, becoming visible only after hitting zoom.
Root cause: loadDocument() computed fitZoom/zoom correctly after
loading a PDF, but never actually called renderAllPages() - only
zoomIn/zoomOut/resetZoom do (via applyZoom), which is why touching zoom
"fixed" it. With nothing drawing into them, every <canvas> sat at the
browser's own unset-canvas default (300x150px), a small blank shadowed
rectangle. The render pipeline itself was never in question - already
proven correct by zoom successfully triggering it - this was purely a
sequencing bug.
Fixed with nextTick() before renderAllPages(): setting numPages only
queues the v-for's canvas elements, they don't exist in the DOM (so
canvasRefs stays empty) until Vue flushes that update, which nextTick
explicitly waits for.
Also investigated the separately reported "no longer see the other top
bar pdf options" - checked the zoom-controls row's own v-if and CSS,
found no second bug there. Most likely the same blank-canvas symptom
read as the whole panel looking broken; not confirmed as the same
issue, flagged to the user to check once this fix is live rather than
assumed resolved.
Verified: npm run build passes, the app container rebuilt. measure.py
unaffected. Not machine-verified - Claude-in-Chrome did not connect
this session.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reported from the sidebar's own per-document delete: the confirm modal
appeared behind the main content and couldn't be clicked.
Root cause: .app-sidebar (position:sticky) and .txn-col
(container-type:inline-size, which implies layout containment) each
always create their own CSS stacking context, with or without an
explicit z-index. ConfirmModal/DocumentOptionsModal/DownloadChoiceModal
are rendered as DOM descendants of one or the other depending on which
call site opens them, so their own z-index:50 was trapped inside that
ancestor's local stacking order - no z-index value could escape it,
since z-index only ever competes against siblings within the same
stacking context.
Fixed with <Teleport to="body"> on all three modals - the standard fix
for this bug, not a bigger z-index (which cannot escape a trapped
stacking context regardless of the number). Each modal now always
renders as a direct child of <body>, a sibling of #app rather than a
descendant of whichever component opened it, so this can't recur
regardless of which future component ends up opening one.
Verified: npm run build passes, the bundle references Teleport, the app
container rebuilt. measure.py unaffected. Not machine-verified -
Claude-in-Chrome did not connect this session.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Two real bugs from the first real test of R.1's pdf.js viewer:
1. getDocument(url) was called with a bare string. The installed
pdfjs-dist (6.4.299) requires an object - getDocument(src = {})
only ever reads src.url/src.data/src.range, so src.url ended up
undefined and pdf.js threw its own "expected either data, range, or
url parameter" error, exactly what was reported. Fixed:
getDocument({ url }).
2. Found while fixing #1: cleanup called pdfDoc.value.destroy(), but
destroy() lives on the loading task (getDocument()'s own synchronous
return value), not the resolved PDFDocumentProxy, which has no
destroy of its own - confirmed via the package's own type
definitions and a real Node script throwing "doc.destroy is not a
function" otherwise. Fixed by keeping the loading task and calling
loadingTask.destroy() instead.
Verified for real via pdf.js's own Node support, not just re-reading
the code: the buggy call shape reproduced the exact reported error
first, the fix loaded both the HSBC and RBC fixtures correctly, and
loading a second document after destroying the first (the real
document-switching scenario) succeeded cleanly.
Traced but could not find a code path connecting this to the separately
reported empty transactions table - that computed has no dependency on
the source panel's state. Fixed the confirmed bug; did not claim that
symptom is resolved.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
R.1 (frontend half) of the staged review-screen plan. An <iframe> has
no overlay hook, so drawing a highlight box on a flagged row's own
printed position (source_page/source_bbox, shipped in the previous
commit) needed real rendering control.
New usePdfViewer.js (installs pdfjs-dist) renders each page to its own
canvas, stacked in one scrollable column - the closest behavioral match
to the iframe's own scrollable multi-page view. The browser's native
PDF toolbar goes away as a direct consequence; zoom is rebuilt to match
useImageZoom.js's own -/+/Fit pattern. The coordinate mapping (bbox
value * zoom, no axis flip) is the exact one already verified correct
against real rendered fixtures in the backend half of this work, reused
here rather than re-derived.
useImageZoom.js gained the same highlight/highlightStyle/showHighlight/
clearHighlight shape for an image upload, reusing its own existing zoom
math. SourceDocumentPanel.vue exposes one unified showHighlight(page,
bbox)/clearHighlight() routing to whichever viewer is active - not
called from anywhere yet, since R.2 (the flagged-row UI that would
trigger it) isn't built. R.1 only builds the capability.
Verified: npm run build passes, the pdf.js worker bundles and serves
correctly (curl'd directly, 200). The app container rebuilt and the
served bundle confirmed to contain the new class/function names.
measure.py unaffected (no backend touched this half). Not
machine-verified, more consequential than usual to leave that way:
canvas rendering, worker loading, zoom, and scroll all depend on real
browser behavior a bundle check can't confirm - Claude-in-Chrome did
not connect this session.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ProjectSidebar: each project now expands (chevron toggle) into its own
lazy-loaded document list - click a document to open it in the main
view, or delete it via the same two-step ConfirmModal pattern already
used elsewhere (Move to project, DocumentNavBar's own delete). Deleting
from here keeps both the sidebar's cached list and the main workspace
(extractionStore) in sync.
Also fixes a real reported bug: the Results dropdown closed when the
mouse moved slowly from the toggle down to the checks list, but stayed
open on a fast drag. Root cause: the panel's 8px gap was a `top`
positioning offset, which doesn't extend its relatively-positioned
parent's own hoverable box - that gap sat outside the hover zone
entirely, so crossing it slowly let a genuine mouseleave fire first.
Fixed by moving the gap into padding on an invisible wrapper instead of
a positioning offset, so the whole hover path - button, gap, and panel
- is one continuous box with no dead zone.
Verified: npm run build passes; the served bundle contains the new
class names. The two new Vue reactivity patterns (a reactive Set via
ref(new Set()), and dynamic keys on a reactive({}) object) were each
executed directly against real Vue reactivity, not assumed - both
correct. measure.py unaffected. Not machine-verified: the actual
interactive behavior - Claude-in-Chrome did not connect this session.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Five related UX fixes from one request:
- DocumentNavBar's filename is now clickable (hover state + a trailing
ellipsis-icon hint) and renders for any loaded document, not just
once there's more than one - opens DocumentOptionsModal to rename, or
hands off to a ConfirmModal to delete (now with danger/busy props:
red confirm button, stays open with a spinner mid-request). Lets a
user delete a document they don't want before downloading.
- Every .btn-toggle button (Hide/Show, Recheck, Download, Results) is a
consistent 36px tall by construction now, not by each call site
matching a number.
- The separate "Download All" button is gone - the single Download
button opens DownloadChoiceModal (current vs. all) once more than one
document is loaded, same as before with exactly one.
- ResultCard.vue is deleted; its content (status banner, checks list,
Download) merges into TransactionsTable's own top bar: a Results
toggle (left) opens a hover-sticky dropdown - stays open while the
mouse is over the trigger or panel, closes the moment it leaves both,
via one shared @mouseleave rather than separate hover-tracking state
- DocumentNavBar sits truly centered (CSS Grid, not flex
space-between) in the middle, Download on the right.
- New shared useModalFocus composable, factored out once three modals
needed the same "focus on open so Esc works" logic.
Verified: npm run build passes; every new icon class confirmed against
the installed FontAwesome CSS; the app container rebuilt and the served
bundle confirmed to contain the new component/class names.
extractionStore.removeDocument/setActiveDocumentFileName executed
directly against a real Pinia instance across five scenarios (earlier
removal, active-document removal mid-list and as the last entry,
emptying to zero, a plain rename) - all correct.
documentsService.updateDocument(id,{fileName})/deleteDocument executed
directly against the real running PocketBase container - rename
persisted and re-fetched correctly, delete correctly 404s afterward.
measure.py re-run, unaffected. Not machine-verified: the actual
interactive behavior - Claude-in-Chrome did not connect this session.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The dropdown worked but gave zero feedback - no confirmation, nothing
visibly changed - so a successful move looked identical to a no-op
(reported directly by the user). Adds a generic ConfirmModal.vue
(reusable beyond this one call site) triggered on select instead of a
second button next to the dropdown, per request. Switches the select
from a bare :value binding to its own v-model so a cancelled move can
actually revert the visible selection (a plain :value can't re-sync a
<select>'s displayed option). Adds a transient "Moved to {project}"
note and clarifies the label from "Project" to "Move to project".
Verified: npm run build passes; the built bundle contains the new
modal/label/note strings; the app container rebuilt and serves 200.
measure.py unaffected. Not machine-verified: the actual modal
interaction - Claude-in-Chrome still isn't connected this session.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The project sidebar was "not impressive" per direct feedback, pointed
at docs/sample_ui.png (a Cloudflare R2 dashboard) as the reference.
Adds AppHeader (brand + breadcrumb + account menu) and AppFooter, and
rebuilds ProjectSidebar into the reference's own left-nav pattern
(search box, icon-led list, bottom-anchored collapse-to-rail toggle).
ProjectSidebar moves from ExtractorView into App.vue's shell, since
it's account-wide chrome, not page-specific - same reasoning as the
new header/footer.
Every unicode-entity icon left over from the original vanilla-JS build
is replaced with a FontAwesome solid icon (installed as a real npm
dependency, not a CDN link, to keep the Docker build offline-
reproducible) - not just in the sidebar, across every button site-wide,
per the explicit ask. Color theme is untouched.
Verified: npm run build passes with the fonts bundled correctly; every
icon class used was grepped against the installed FontAwesome CSS and
confirmed to exist; the app container was rebuilt and curl-checked
end-to-end (bundle, CSS, and font asset all serve correctly, and the
new component/icon class names are present in the built JS). measure.py
re-run, unaffected. Not machine-verified: the actual rendered page -
Claude-in-Chrome did not connect this session, same as every prior UI
change in this project.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Completes the three-stage PocketBase plan: project CRUD with delete
guard rails (refuses the default project and any non-empty project),
a collapsible sidebar to select/filter/rename/create/delete projects,
and a "Move to project" control on the transactions table. useFileUpload
is split back into a pure staging concern; loadDocuments moves out to
a new useDocuments composable shared by the sidebar and the initial
page load.
Verified at both the service layer and the Pinia store layer against
the real running PocketBase + app stack (signup, every delete guard,
move-to-project, filtered listing, store state sync) - all correct.
measure.py re-run, unaffected. Caught and fixed one binding bug before
any build/test: the "Move to project" select was reading result.project
(the raw backend blob, no such field) instead of the store's own
activeDocument.project.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The actual request was simple (store exports in R2 like source files,
pending a retention-duration decision), but investigating where
exports were written surfaced something worse: /api/process built and
saved a full workbook to disk on EVERY extraction, and nothing in the
frontend ever called /api/download/<filename> to retrieve it (confirmed
by grep - no reference anywhere). Every extraction was silently
orphaning an .xlsx file for no reason; 91 had already accumulated
locally from this session's own testing alone.
Removed the dead work entirely: /api/process no longer builds or saves
a workbook at all. /api/download/<filename>, file_repository.
save_workbook/resolve_output_path, and OUTPUT_FOLDER (env var, volume,
directory) are all gone - confirmed nothing else referenced any of
them before removing. outputs/ deleted, including its 91 accumulated
files.
/api/export (the only path actually used - Download Excel/All) now
builds the workbook into an in-memory BytesIO and streams it straight
from there - never touches disk, not even temporarily. The frontend
persists it long-term instead: documentsService.saveExportFile uploads
the same Blob the browser download already used to a new exportFile
field (pb_migrations/3_add_export_file.js), stored in R2 same as
sourceFile. Overwrites the previous export rather than keeping a
history - no retention policy has been decided yet, and keeping every
version would just relocate the same unbounded-growth problem from the
VPS to R2 instead of fixing it. Best-effort from ResultCard.vue - a
save failure is reported but never blocks the browser download itself.
Verified for real: /api/process's response no longer has `filename`
(title still does); /api/export still streams a valid, correctly-typed
.xlsx; /app/outputs no longer exists in the rebuilt container; the old
/api/download URL now falls through to the ordinary SPA catch-all, not
a leftover route. documentsService.saveExportFile run against the REAL
bytes /api/export produced, fetched back through the R2-backed URL,
confirmed byte-for-byte - and confirmed a second export overwrites
rather than creating a second record. measure.py unaffected; npm run
build passes.
New documentsService.js (saveDocument/updateDocument/listDocuments/
deleteDocument/sourceFileUrl) and a minimal projectsService.js
(getDefaultProject/listProjects, extended in B.3) replace
extractionService.js's old localStorage-backed persistResult/
restoreResult/lastBatchKeys/appendToLastBatch/startNewBatch/
discardPersisted - deleted outright, not kept alongside.
extractionStore's document entries gained a pbId field (the PocketBase
record id), set from saveDocument's create response or a listed
record's own id - needed so useRowEditing's saveEdit() knows which
record to PATCH.
RestoreBanner.vue and uiStore's restoreBannerVisible/Text/show/hide
deleted outright (not repurposed) - the banner existed because a
localStorage cache's presence was ambiguous ("did a crash happen?");
PocketBase being the real backend means a logged-in user's documents
just load, same as any other app showing your own data.
useFileUpload.restoreOnLoad() renamed loadDocuments(), simplified from
the plan's own "needs a watcher" - unnecessary, since App.vue's auth
gate already means ExtractorView can't mount before authenticated.
Two real bugs caught by executing the actual services against the live
PocketBase, not just reading them: an empty-string filter is rejected
outright rather than treated as "no filter" (fixed by omitting the key
entirely); sort:'-created' referenced a field that didn't exist -
projects/documents came out of migration 1 with no created/updated
fields at all, unlike the built-in users auth collection. Fixed with a
new migration (2_add_timestamps.js, not editing the one that already
ran) adding autodate created/updated to both, field shape copied from
users' own via the REST API.
Verified end-to-end with the real, committed services run from a
plain Node script against the live container: signup -> default
project resolves -> saveDocument with a real File -> listDocuments
finds it -> sourceFileUrl fetched for real returns the exact original
bytes -> updateDocument (simulating a row edit) -> re-listDocuments
confirms the change actually persisted. npm run build passes.
measure.py unaffected; R2/Google settings confirmed to survive the
PocketBase container rebuild.
Same official 4-color "G" logomark PocketBase itself serves (the exact
SVG confirmed from the live /api/collections/users/auth-methods
response while verifying the OAuth2 setup) - same button on both the
sign-in and sign-up views, since they're the same form with a mode
toggle, not separate pages.
.fields > div's flex:1 1 180px is a WIDTH basis meant for the
horizontal balance-fields row - in LoginView's column layout that same
180px became a HEIGHT basis instead, stretching each email/password
wrapper to ~180px tall. Not padding/margin, a flex-basis axis mismatch.
New third service alongside app/docling - a deliberate, revisited
decision from the documented "no DB" architecture, not an oversight.
pocketbase/Dockerfile - official minimal pattern (no official image
exists), pinned binary, migrations+hooks copied in and run on startup.
pb_migrations/1_create_collections.js - schema as code: users (auth,
self-registration open), projects (owner-scoped), documents (owner-
AND project-scoped - project is REQUIRED, not optional, since a
planned future per-project category-mapping feature needs every
document scoped from day one), with a sourceFile field for the
original PDF/image (stored in R2 once configured).
pb_hooks/ensure_default_project.pb.js - auto-creates each new user's
"General" project (isDefault:true) the moment their account exists -
covers password and Google signup uniformly, guarantees the required
documents.project relation always has somewhere to point.
configure-secrets.sh - the only place R2/Google secrets are handled,
reading from a gitignored .env and PATCHing PocketBase's own REST API.
Never in a migration (those are committed to git).
Frontend: pocketbaseRepository.js (the one SDK instance),
authService.js (login/signup/Google/logout), authStore.js (Pinia,
synced to the SDK's own authStore), LoginView.vue, and App.vue's new
auth gate - talks to PocketBase directly, not proxied through Flask.
Verified via real REST API calls against the running container (not
just read): migrations create the expected collections/rules; a fresh
signup gets exactly one auto-created "General" project; a second
user's token can't see the first user's data; a document created with
no project correctly fails validation (confirming the frontend must
resolve one itself); authService's actual functions exercised via a
live Node script against the real container (signup, hook-created
project visible, logout, re-login). npm run build passes. measure.py
unaffected (no backend code touched).
Not yet verified - needs real R2/Google credentials this session
doesn't have: configure-secrets.sh itself, and the Google OAuth popup
flow (needs a real browser + real Google Cloud OAuth client, both
outside this repo's control - documented as setup prerequisites in
README.md).
This is Stage B.1 of 3 (schema + auth gate). B.2 (document persistence
moves from localStorage to PocketBase) and B.3 (the project sidebar
UI) are not started yet.
DocumentNavBar no longer sits in its own standalone div above both
panels - it's now rendered inside TransactionsTable.vue, across the
top of the transactions card, above the Hide/Show Source Doc row, with
no border/background box of its own (already inside the card's). Still
disappears via the same v-if once there's nothing to navigate between.
.pdf-col/.txn-col height raised from 82vh to 102.5vh (25% more), both
panels still matching each other exactly.
Picking/dropping a file replaced whatever was already staged (reported:
"I select one document and start again to select another, the first
one is replaced"). setFiles now appends instead, deduping exact
name+size repeats, so a batch can be built up across several separate
picks/drops, not just one multi-select dialog.
Each staged file gets an x to remove it before Extract is clicked.
The staging list is cleared the moment Extract runs (not after it
resolves), so an already-handed-off file can't linger and get
re-processed - and duplicated, since extractionStore.documents has no
dedup of its own - by a later click.
Also resets the native file input after each pick so re-selecting the
same file (e.g. after removing it) still fires a change event.
extractionStore restructured from a single currentResult into a list
of documents + activeIndex, so a batch of files can be extracted
sequentially (useBatchExtraction.js replaces useExtraction.js) with
"Extracting N/M: filename" progress, and browsed afterward via
DocumentNavBar's prev/next. currentResult/currentDocKey/
flaggedIndexes/effectiveOpeningBalance/effectiveClosingBalance stay
getters with their exact old names (now derived from activeDocument),
so ResultCard.vue and most of TransactionsTable.vue needed no changes
beyond the balance-input v-model bindings.
Two choices from the plan were revised after user review before any
code was written: focus never moves on its own except to show the
very first result (a later file finishing mid-batch never yanks the
user away from whatever they're reviewing or editing), and a Download
All button sits beside Download Excel, shown once a multi-file batch
has actually finished.
Restore-on-reload generalized from one document to a whole batch
(lastBatchKeys/appendToLastBatch replace lastDocKey; persistResult now
saves {fileName, result} with a backward-compatible fallback for the
old bare-result shape).
Two real bugs caught in review before ever reaching a browser:
TransactionRow was keyed only by row index (could reuse a stale
component's draft across documents sharing an index - fixed by keying
on docKey+index too), and addDocument called recomputeFlags() which
only ever targets the active document (a document added while focus
stayed elsewhere would never get its own flaggedIndexes computed -
fixed by computing flags directly for whichever document was just
added, not just the active one).
Verified: npm run build; every new/changed store action and getter
executed directly against real Pinia with synthetic multi-document
scenarios; the real Docker container rebuilt and hit with sequential
/api/process calls confirming identical results to the pre-change
baseline; measure.py unaffected (no backend code touched). No backend
changes anywhere - /api/process|recheck|export already each take
exactly one file/document per call.
Both sticky rows kept their own border-bottom (inherited from the
base th rule), which read as a thin visible gap between them. The
header row no longer draws one - the filter row's own border is the
single line that should separate the whole sticky header block from
the scrolling data beneath it.
Dragging the resizer narrow on a wide screen never triggered the
existing @media(max-width:640px) stacked layout, since that only
watches the viewport, not the column itself - so the balance fields
and Recheck Balance button just overflowed the column's right edge
instead. Gave .txn-col container-type:inline-size and replaced that
media query with an equivalent @container rule, which also covers
the genuine-mobile case the old rule handled (the column is just as
narrow as the viewport there too).
Same root cause was squeezing the transactions table's Description
column unreadable: table-layout:fixed + width:100% shrinks every
column proportionally to fit, fixed-pixel ones included. Gave the
table a min-width (fixed columns' sum + a legible floor for
Description) so .table-wrap's overflow-x:auto takes over with a
horizontal scrollbar instead of compressing Description further.
Header row and filter row both stuck to top:0 via one shared rule,
so the filter row (later in the DOM) visually covered the header row
on scroll instead of stacking beneath it. Gave the header row an
explicit height and offset the filter row's own sticky top by that
amount so they stack correctly.
Also removed the now-empty <div class="note"> left over after its
instructional text was deleted - it was still taking up margin-bottom
space above the table for no reason.
Matching just the top edge (via the label-height spacer) wasn't
enough - the button's own padding made it naturally shorter than a
balance input, so the two boxes still looked slightly off-center
against each other. Both now get the same explicit height with the
button's text flex-centered inside it.
- Recheck Balance now lines up with the balance input fields on wide
viewports via an invisible label-height spacer, instead of the row's
top edge.
- Each transaction column gets its own up/down sort arrows, plus a
filter row beneath the header (Description doubles as search, Status
is a dropdown of values actually present). Sorting/filtering never
disturbs row identity - edits and flags still target the original
index, not the displayed position.
The mismatch note only handled outcome === 'fail'. A statement with no
typed or auto-detected balance at all returns "not_available" instead,
which was left just as silently grey as "fail" used to be before the
last fix.
Grey (vs green) on the calc-readouts said something was wrong but never
what - the actual explanation (the statement_balance check's own detail
text, with the full math and "off by \$X") only existed in the checks
list, which starts collapsed by default, with no visible link back to
the readouts near the balance fields.
Surfaces that same detail text directly under the balance fields/Recheck
button when the check outcome is "fail" - no new backend call or logic,
just showing what was already being computed and returned, in the place
the user is actually looking.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Typing opening/closing balance AFTER extraction (e.g. the user forgot to
fill it in before clicking Extract) never did anything on its own - the
fields were only ever read by some OTHER trigger (a row Save, or
Download). Confirmed this gap predates the Vue rewrite - the original
vanilla-JS version had the identical behavior.
Adds a "Recheck Balance" button (TransactionsTable.vue) that re-runs the
same recheck-only (no re-extraction) call a row Save already makes,
using whatever's currently in the balance fields - an explicit,
deliberate trigger rather than auto-firing on blur, matching the
existing per-row Save pattern (edits/entries only take effect when
confirmed). Positioned at the row's own right edge, aligned under the
Hide/Show Source Doc toggle above it; drops below the closing-balance
field at mobile widths (a new 640px breakpoint, separate from the
860px one the overall layout already used).
Verified end-to-end against the real backend: uploaded a statement with
no balance supplied (statement_balance: not_available), then called
/api/recheck with balances added afterward - the check correctly
recalculated and reported the result, the same request shape and
endpoint the new button uses.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The previous commit fixed .txn-col but missed the real asymmetry: only
.pdf-col's CHILD (iframe/img-preview-wrap/empty-panel-source) was pinned
to 82vh - the .pdf-col CARD itself had no height of its own, so its real
total height was 82vh plus pdf-col-head's own height plus the card's
padding, taller than .txn-col's flat 82vh. Visually this is exactly
"transactions panel is shorter."
Applied the identical fixed-height-flex-column pattern to .pdf-col that
.txn-col already had: height:82vh on the card itself, pdf-col-head
flex-shrink:0, and the child (iframe/img-preview-wrap/empty-panel-source)
changed from height:82vh to flex:1 1 auto; min-height:0 so it fills
whatever space remains under the head - both columns are now driven by
the same fixed value through the same structural pattern, which is what
actually guarantees matching heights (one side being content-driven and
the other fixed can't reliably match, regardless of what the fixed value is).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
.pdf-col's height came from its child (iframe/img-preview-wrap/
empty-panel-source, all fixed at 82vh); .txn-col had no height of its
own, just whatever its header+fields+notes+table content needed - the
two columns drifted apart whenever txn-col's content was taller than
82vh on its own.
.txn-col is now flex-column with a fixed height:82vh, matching its
sibling exactly; the table area (table-wrap, or empty-panel-table when
there's no result yet) is the one piece that absorbs whatever space is
left after the header/fields/notes above it (flex:1, min-height:0 so its
own overflow-y:auto scroll still works within that constrained space),
rather than the whole column growing taller than 82vh.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The opening/closing balance fields live in TransactionsTable, which was
only rendered after a successful extraction - so there was no way to
type a balance before clicking Extract, even though both fields are
submitted as part of that same request. Confirmed this wasn't introduced
by the Vue rewrite - the original vanilla-JS version had the identical
behavior (#resultSection stayed display:none until renderResult ran).
Both panels are now always visible. Each shows an empty-state message
("No Source Document to Display..."/"No Transactions to Display...")
until there's something real to show instead - SourceDocumentPanel until
a file is chosen, TransactionsTable's table (not the balance fields
above it) until an extraction result exists.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>