bettersight-statement-extra.../frontend
JasonFraser e59013cdcb Move document persistence from localStorage to PocketBase (Stage B.2)
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.
2026-10-13 06:41:51 -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 Move document persistence from localStorage to PocketBase (Stage B.2) 2026-10-13 06:41:51 -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 Add PocketBase: accounts (password + Google) + schema for R2-backed docs 2026-10-13 00:26:41 -04:00
package.json Add PocketBase: accounts (password + Google) + schema for R2-backed docs 2026-10-13 00:26:41 -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.