diff --git a/CLAUDE.md b/CLAUDE.md index 013d705..8aa4348 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -602,6 +602,21 @@ restructure; the behavior itself predates it and is unchanged: the original vanilla-JS implementation closely before the Vue rewrite, and reproduced deliberately rather than "fixed" as an inconsistency (see `TransactionsTable.vue`'s own comment). +- An explicit "Recheck Balance" button (`TransactionsTable.vue`) re-runs just the checks + (via `/api/recheck`, no re-extraction) against whichever balance values are currently + *effective* — `extractionStore.effectiveOpeningBalance`/`effectiveClosingBalance`: the + typed input if non-blank, else that frozen original `opening_balance`/`closing_balance` + from the initial extraction — so clearing a typed value and clicking Recheck restores + the statement's own original figures, same check as the first run. Added so a user who + forgot to type a balance before Extract can still run the full check afterward (typing + alone was never wired to a recheck, same as the original vanilla-JS version — only a row + Save or Download triggered one). Below the fields, an `error-note` surfaces the check's + own `detail` text whenever the outcome isn't "pass": a leading "Balance doesn't match the + statement — " prefix for "fail" (its own detail is just the raw math), no prefix for + "not_available" (its detail — "No opening and/or closing balance available..." — already + reads as a complete sentence) — both outcomes used to leave the readout silently grey with + no explanation; "not_available"'s case was only noticed and fixed 2026-10-12, after "fail" + already had it. - Per-row edit lock (`TransactionRow.vue`/`useRowEditing.js`): cells are read-only until that row's pencil icon is clicked (pencil rendered in the blue accent color, fixed 2026-10-11 — it was the default muted gray, inconsistent with the Save button's own blue); diff --git a/frontend/src/components/TransactionsTable.vue b/frontend/src/components/TransactionsTable.vue index b137685..500ee6a 100644 --- a/frontend/src/components/TransactionsTable.vue +++ b/frontend/src/components/TransactionsTable.vue @@ -50,10 +50,17 @@ const toggleLabel = computed(() => (uiStore.pdfColHidden ? 'Show Source Doc' : ' // that client-side) right under the fields where the mismatch is // actually visible, instead of leaving the user to find the same line // in the (collapsed-by-default) checks list elsewhere on the page. +// Also covers "not_available" (neither a typed nor an auto-detected +// balance exists at all) - that outcome has its own explanatory detail +// text too and was previously left just as silent as "fail" used to be. const balanceMismatchText = computed(() => { const check = balanceCheck.value - return check?.outcome === 'fail' ? check.detail : '' + return check?.outcome === 'fail' || check?.outcome === 'not_available' ? check.detail : '' }) +// "fail" gets a leading "Balance doesn't match the statement —" since the +// detail text itself is just the raw math; "not_available"'s own detail +// text already reads as a complete sentence, so it needs no prefix. +const balanceMismatchPrefix = computed(() => (balanceCheck.value?.outcome === 'fail' ? "Balance doesn't match the statement — " : '')) // ── Balance recheck ────────────────────────────────────────────────── // Entering opening/closing balance AFTER extraction (e.g. the user @@ -108,7 +115,7 @@ async function handleRecheck() { {{ rechecking ? 'Checking…' : 'Recheck Balance' }} -
Balance doesn't match the statement — {{ balanceMismatchText }}
+
{{ balanceMismatchPrefix }}{{ balanceMismatchText }}
This statement format may not print a clean opening/closing balance — enter them here to run the full statement balance check; otherwise it's marked "not available" rather than guessed.
Click the pencil on a row to edit it, then Save to commit - edits are saved to this browser as you confirm them, row by row.