bettersight-statement-extra.../frontend
JasonFraser 9adf3d8fca Add structural row edits: flip, insert, split, merge, delete (R.4)
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>
2026-10-13 20:20:50 -04:00
..
.vscode Restructure frontend to Vue 3 + Vite (Stage 2 of 2) 2026-10-12 06:32:49 -04:00
public Restructure frontend to Vue 3 + Vite (Stage 2 of 2) 2026-10-12 06:32:49 -04:00
src Add structural row edits: flip, insert, split, merge, delete (R.4) 2026-10-13 20:20:50 -04:00
.gitignore Restructure frontend to Vue 3 + Vite (Stage 2 of 2) 2026-10-12 06:32:49 -04:00
README.md Restructure frontend to Vue 3 + Vite (Stage 2 of 2) 2026-10-12 06:32:49 -04:00
index.html Restructure frontend to Vue 3 + Vite (Stage 2 of 2) 2026-10-12 06:32:49 -04:00
package-lock.json Replace the native PDF iframe with a pdf.js viewer for row highlighting 2026-10-13 11:26:48 -04:00
package.json Replace the native PDF iframe with a pdf.js viewer for row highlighting 2026-10-13 11:26:48 -04:00
vite.config.js Restructure frontend to Vue 3 + Vite (Stage 2 of 2) 2026-10-12 06:32:49 -04:00

README.md

Vue 3 + Vite

This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.

Learn more about IDE Support for Vue in the Vue Docs Scaling up Guide.