diff --git a/CLAUDE.md b/CLAUDE.md index 2bf6da2..b3cc537 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -272,9 +272,18 @@ security only, not the full SaaS-shaped doc — and the judgment call on what co away in the rewrite. ``` /frontend/src - main.js — createApp(App).use(pinia).use(router).mount('#app') - App.vue — page chrome (
wrapper) around the routed view - /assets/main.css — the full original CSS, moved verbatim - same tokens, same rules + main.js — createApp(App).use(pinia).use(router).mount('#app'); + imports @fortawesome/fontawesome-free's all.min.css once + here (an npm dependency, not a CDN link - keeps the Docker + build offline-reproducible) ahead of main.css + App.vue — the auth gate, then the full app shell: AppHeader + + ProjectSidebar + routed view + AppFooter (see "Enterprise + app-shell redesign" under Key decisions & lessons - + modeled on docs/sample_ui.png, same enterprise-light theme) + /assets/main.css — started as the original CSS moved verbatim; grown + substantially since (table/sidebar/account-bar/app-shell + sections each added for their own stage - see Key + decisions & lessons for which) /router/index.js — one route today ('/' -> ExtractorView), kept as a real router per the standards doc's structure /stores (Pinia) @@ -375,10 +384,16 @@ security only, not the full SaaS-shaped doc — and the judgment call on what co filename —"), useRowEditing (saveEdit() now calls `documentsService.updateDocument`, best-effort), useImageZoom, useAutoGrow - /components — FileUploadZone (multi-select input), DocumentNavBar + /components — AppHeader (sticky top bar — brand mark, active-project + breadcrumb, account menu with email + sign out; added + 2026-10-13, see "Enterprise app-shell redesign" under Key + decisions & lessons), AppFooter (slim bottom bar, same + entry), FileUploadZone (multi-select input), DocumentNavBar (prev/next between completed documents), ProjectSidebar - (Stage B.3 — project list/select/create/rename/delete, - filters the document list, collapsible), LoginView + (the app's primary left nav as of 2026-10-13 — project + list/select/create/rename/delete, a client-side project + search box, filters the document list, collapses to an + icon-only rail), LoginView (Sign In/Sign Up toggle + "Continue with Google"), ProcessingIndicator, ResultCard (Download + Download All, best-effort persists the export to R2 via @@ -387,12 +402,17 @@ security only, not the full SaaS-shaped doc — and the judgment call on what co select), TransactionRow, ResizablePanels. `RestoreBanner` was removed in Stage B.2 (see Key decisions & lessons) — PocketBase being the real backend left no ambiguity for it - to explain. - /views/ExtractorView.vue — composes everything above - this IS the whole page, - now split into `.page-layout` (ProjectSidebar + a - `.page-main` wrapper around what used to be its direct - children). `App.vue` gates this behind - `authStore.isAuthenticated`, showing `LoginView` otherwise. + to explain. Every button/nav icon site-wide uses + FontAwesome solid icons now (`@fortawesome/fontawesome-free`) + in place of the original vanilla-JS build's unicode + entities (✎/✓/✕/←/→/▶/−/▲▼). + /views/ExtractorView.vue — the extraction page itself: upload, result, document + navigation, side-by-side review. No longer owns a page-level + layout wrapper or ProjectSidebar (both moved up to App.vue's + shell 2026-10-13 — ProjectSidebar is account-wide chrome, not + specific to this one page). `App.vue` gates the whole shell + behind `authStore.isAuthenticated`, showing `LoginView` + otherwise. ``` **One real bug caught and fixed during this restructure, server-side:** the production `Dockerfile` serves `frontend/dist` from Flask via a catch-all route @@ -943,6 +963,82 @@ direct execution; the UI wiring on top of it follows the same prop/emit-name cross-checking discipline as the original Vue restructure, but is unconfirmed by an actual click until the user tries it in their own browser. +**Enterprise app-shell redesign (header/sidebar/footer) + FontAwesome icon pass, +2026-10-13.** The user's own assessment of the Stage B.3 sidebar: "not impressive at +all" - pointed at `docs/sample_ui.png` (a Cloudflare R2 dashboard screenshot) as the +reference to model the shell on, keeping the existing enterprise-light color theme +(blue `#2563EB` accent, white cards) unchanged, and asked for FontAwesome icons on +buttons and sidebar navigation "so they look professional and enterprise" rather than +hand-drawn ones. This was a real structural change, not just a restyle: `ProjectSidebar` +moved from being a child of `ExtractorView` (page-specific) to a child of `App.vue` +(account-wide chrome, same level as the new header/footer) - reasoned the same way as +the header/footer themselves: which project is active isn't specific to the extraction +page, it's account-level navigation. + +New shell, built in `App.vue`: `AppHeader` (sticky, full width - a brand mark, a +breadcrumb showing the active project, and an account menu with email + sign out, +replacing the old plain `.account-bar`) + a body row (`ProjectSidebar` + `.app-content` +holding ``) + `AppFooter` (slim, real content only - app name/phase/ +copyright, no fabricated Support/Careers/Status links the reference screenshot has but +this app doesn't actually have pages for). `ProjectSidebar` itself was rebuilt to match +the reference's own left-nav pattern: a project search/filter box (new, client-side +only), an icon-led nav list ("All Documents" + each project, `fa-folder`/ +`fa-folder-open` when active), and a collapse toggle anchored at the bottom of the +sidebar rather than floating at its top - collapsed state is a narrow icon-only rail +(same pattern most enterprise dashboards use - Slack, Linear, etc.), not the old "shrink +to just a toggle button" treatment, so project icons stay clickable (with their own +`title` tooltips) even collapsed. + +**Deliberately kept page-level scrolling, not nested scroll panes.** The reference +screenshot's own sidebar/content scroll independently of each other (a classic fixed- +viewport dashboard shell). This app's `.review-grid`/`.pdf-col`/`.txn-col` already rely +on `position:sticky` tracking the PAGE's own scroll (confirmed by reading their own +comments - "Sticky on the GROUP... keeps moving together... while the main page +scrolls"). Giving `.app-content` its own independent scroll container would have broken +that sticky behavior outright (sticky positioning needs its nearest scrolling ancestor +to actually be the page, not a nested pane) - not something this request asked to +touch, so `.app-sidebar` instead uses the exact same `position:sticky` pattern already +proven out elsewhere in this file (`top:56px` - the header's own height - instead of +`top:24px`), and the page keeps scrolling as a whole, same as before. This was a +deliberate judgment call to preserve working, already-verified behavior rather than +literally copy the reference's nested-scroll-pane structure. + +**FontAwesome, not hand-drawn icons, per explicit request.** Installed as a real npm +dependency (`@fortawesome/fontawesome-free`, imported once in `main.js`) rather than a +CDN `` - keeps the Docker build fully offline-reproducible, same reasoning as +every other dependency in this repo. Every unicode-entity icon left over from the +original vanilla-JS build (✎/✓/✕/←/→/▶/−/▲▼, scattered across `TransactionRow`, +`DocumentNavBar`, `ResultCard`, `TransactionsTable`, `SourceDocumentPanel`, +`FileUploadZone`, `ProjectSidebar`) was replaced with a solid FontAwesome icon of the +same meaning, not just the sidebar - the user's own framing ("the buttons AND the +sidebar navigation") read as the whole app, and leaving half the icons as unicode +glyphs after an icon pass would have been a worse, inconsistent result. Icons were +verified to actually exist in the installed FA7 free solid set by grepping the real +installed `all.min.css` for each class name used (`fa-file-invoice-dollar`, +`fa-cloud-arrow-up`, `fa-folder-open`, etc.) before using any of them, not assumed from +memory of FA's icon library. + +**One pre-existing dead CSS rule fixed as a side effect, not touched deliberately:** +`.img-zoom-controls button#imgZoomReset{...}` (fit-to-width zoom button sizing) existed +in `main.css` since the original Vue restructure but matched nothing - the button it +targeted never actually had `id="imgZoomReset"` in `SourceDocumentPanel.vue`'s markup. +Adding the icon to that button was also the moment to add the id it was always supposed +to have, so this rule now applies for the first time. + +Verified: `npm run build` passes (FontAwesome's woff2 fonts bundle correctly into +`dist/assets`); every icon class name used was grepped against the real installed +`all.min.css` and confirmed present; the `app` container was rebuilt and `curl`-checked +end-to-end - `/` serves 200, the built CSS/JS bundles serve 200, the referenced +`fa-solid-900-*.woff2` file the CSS points at resolves 200, and the built JS bundle +contains the new component class names/icon classes (`app-sidebar`, `app-header`, +`app-footer`, `fa-file-invoice-dollar`, etc.) - not just that the build didn't error. +`measure.py` re-run, unaffected (no backend touched). **Not machine-verified:** the +actual rendered page - whether the header/sidebar/footer look right, whether the +collapse rail behaves, whether any icon is misaligned - Claude-in-Chrome was not +connected this session either (tried again, same as every prior UI change in this +project); this is the one area of this change the user needs to confirm visually +themselves before considering it done. + **Governing rule: never silently correct or exclude data.** This shows up in several concrete places, not just as an abstract principle: - A row with an unusual status (e.g. HSBC's "Cancelled" wires) stays in the output and is @@ -1125,7 +1221,7 @@ be set explicitly (`/usr/share/tesseract-ocr/5/tessdata`); tesserocr does not re auto-discover Debian's tessdata location on its own (confirmed for real: failed with "invalid tessdata path: ./" without it). -## Frontend / UI state (as of 2026-10-12) +## Frontend / UI state (as of 2026-10-13) **Theme is enterprise-light, not the Bettersight brand default.** `UI_DESIGN_THEME.md` specifies a dark-first brand system (deep navy base, single lime-green accent) — that's diff --git a/docs/sample_ui.png b/docs/sample_ui.png new file mode 100644 index 0000000..9d7ee9c Binary files /dev/null and b/docs/sample_ui.png differ diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f8f36ff..dda0802 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8,6 +8,7 @@ "name": "frontend", "version": "0.0.0", "dependencies": { + "@fortawesome/fontawesome-free": "^7.3.1", "pinia": "^4.0.3", "pocketbase": "^0.28.1", "vue": "^3.5.42", @@ -64,6 +65,15 @@ "node": ">=6.9.0" } }, + "node_modules/@fortawesome/fontawesome-free": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-7.3.1.tgz", + "integrity": "sha512-wmglKKPDIkgV3aWlZzWECCPoGIkYCulzBwxG9+w7rc5BGapZ6cPMpoPOT8k36J0Ni7PPX6c/rsoMWfS4d1MUMg==", + "license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)", + "engines": { + "node": ">=6" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", diff --git a/frontend/package.json b/frontend/package.json index 94b919c..1752d95 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,6 +9,7 @@ "preview": "vite preview" }, "dependencies": { + "@fortawesome/fontawesome-free": "^7.3.1", "pinia": "^4.0.3", "pocketbase": "^0.28.1", "vue": "^3.5.42", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 46db8f2..fe68d50 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,17 +1,22 @@ + + diff --git a/frontend/src/components/AppHeader.vue b/frontend/src/components/AppHeader.vue new file mode 100644 index 0000000..40220b3 --- /dev/null +++ b/frontend/src/components/AppHeader.vue @@ -0,0 +1,78 @@ + + + diff --git a/frontend/src/components/DocumentNavBar.vue b/frontend/src/components/DocumentNavBar.vue index 49087a8..ab7006c 100644 --- a/frontend/src/components/DocumentNavBar.vue +++ b/frontend/src/components/DocumentNavBar.vue @@ -26,8 +26,9 @@ const positionText = computed( title="Previous document" :disabled="extractionStore.activeIndex === 0" @click="extractionStore.prev()" - >← + >
+ {{ extractionStore.activeDocument?.fileName }} ({{ positionText }})
@@ -37,6 +38,6 @@ const positionText = computed( title="Next document" :disabled="extractionStore.activeIndex === extractionStore.documents.length - 1" @click="extractionStore.next()" - >→ + > diff --git a/frontend/src/components/FileUploadZone.vue b/frontend/src/components/FileUploadZone.vue index 90356fc..2d9cd6f 100644 --- a/frontend/src/components/FileUploadZone.vue +++ b/frontend/src/components/FileUploadZone.vue @@ -43,6 +43,7 @@ const extractionStore = useExtractionStore() accept=".pdf,application/pdf,.jpg,.jpeg,.png,image/jpeg,image/png" @change="emit('file-input-change', $event)" > +
Drop one or more statement PDFs or photos here or browse
.pdf, .jpg, or .png files - add as many as you like, one at a time or together
@@ -52,12 +53,15 @@ const extractionStore = useExtractionStore() pulled back out before Extract is ever clicked. --> diff --git a/frontend/src/components/ProcessingIndicator.vue b/frontend/src/components/ProcessingIndicator.vue index c52229b..a2d3e85 100644 --- a/frontend/src/components/ProcessingIndicator.vue +++ b/frontend/src/components/ProcessingIndicator.vue @@ -15,5 +15,5 @@ defineProps({ diff --git a/frontend/src/components/ProjectSidebar.vue b/frontend/src/components/ProjectSidebar.vue index 68be8a3..41cdad0 100644 --- a/frontend/src/components/ProjectSidebar.vue +++ b/frontend/src/components/ProjectSidebar.vue @@ -2,15 +2,20 @@ /** * ProjectSidebar.vue * - * Lists the logged-in user's projects; selecting one FILTERS the - * document list (documentsService.listDocuments({project})) rather than - * gating anything - "All" (the default) shows every document, same as - * before projects existed at all. Collapses to a slim strip with just - * its own toggle (never fully disappears - unlike Hide Source Doc, - * there's no sibling component to host a toggle button when this one is - * gone entirely, so it owns its own collapse/expand). + * The app's primary left nav (full height, beside AppHeader/AppFooter - + * see App.vue's shell) - modeled on docs/sample_ui.png's own left nav: + * a search/filter box, an icon-led nav list, and a collapse toggle + * anchored at the bottom. Selecting a project FILTERS the document list + * (documentsService.listDocuments({project})) rather than gating + * anything - "All Documents" (the default) shows every document, same + * as before projects existed at all. + * + * Collapsed state shrinks to a narrow icon-only rail (same pattern as + * Slack/most enterprise dashboards) rather than nearly vanishing - the + * search box, section label, and inline rename/delete controls hide; + * icons + the expand toggle stay reachable via their own title tooltips. */ -import { ref } from 'vue' +import { ref, computed } from 'vue' import { useProjectsStore } from '../stores/projectsStore' import { useUiStore } from '../stores/uiStore' import { useDocuments } from '../composables/useDocuments' @@ -19,6 +24,13 @@ const projectsStore = useProjectsStore() const uiStore = useUiStore() const { loadDocuments } = useDocuments() +const searchQuery = ref('') +const filteredProjects = computed(() => { + const q = searchQuery.value.trim().toLowerCase() + if (!q) return projectsStore.projects + return projectsStore.projects.filter((p) => p.name.toLowerCase().includes(q)) +}) + const newProjectName = ref('') const creating = ref(false) const errorMessage = ref('') @@ -81,21 +93,26 @@ async function confirmRename(project) { diff --git a/frontend/src/components/ResultCard.vue b/frontend/src/components/ResultCard.vue index 6685a4f..df27679 100644 --- a/frontend/src/components/ResultCard.vue +++ b/frontend/src/components/ResultCard.vue @@ -19,6 +19,16 @@ const uiStore = useUiStore() const result = computed(() => extractionStore.currentResult) const statusClass = computed(() => 'status-banner ' + (result.value?.status || '').replace(' ', '-')) const periodText = computed(() => (result.value?.period ? `Statement period: ${result.value.period}` : '')) +const statusIcon = computed(() => { + const s = result.value?.status + if (s === 'Verified') return 'fa-circle-check' + if (s === 'Needs review') return 'fa-triangle-exclamation' + if (s === 'Failed') return 'fa-circle-xmark' + return 'fa-circle-info' +}) +const outcomeIcon = { + pass: 'fa-check', fail: 'fa-xmark', needs_review: 'fa-triangle-exclamation', not_available: 'fa-minus', +} const downloading = ref(false) const downloadingAll = ref(false) @@ -127,24 +137,26 @@ async function handleDownloadAll() { type="button" :aria-expanded="String(uiStore.resultExpanded)" :title="uiStore.resultExpanded ? 'Hide details' : 'Show details'" - >▸ + >

Result

-
{{ result.status }}
+
{{ result.status }}
{{ periodText }}
  • - {{ check.outcome.replace('_', ' ') }} + {{ check.outcome.replace('_', ' ') }} {{ check.name.replace(/_/g, ' ') }} — {{ check.detail }}
diff --git a/frontend/src/components/SourceDocumentPanel.vue b/frontend/src/components/SourceDocumentPanel.vue index 53c1894..1e1d310 100644 --- a/frontend/src/components/SourceDocumentPanel.vue +++ b/frontend/src/components/SourceDocumentPanel.vue @@ -34,10 +34,10 @@ const pdfSrc = computed(() => (props.previewUrl ? props.previewUrl + '#toolbar=1

Source Document

- + {{ zoomLevelText }} - - + +
diff --git a/frontend/src/components/TransactionRow.vue b/frontend/src/components/TransactionRow.vue index 9249bcc..20bc2ee 100644 --- a/frontend/src/components/TransactionRow.vue +++ b/frontend/src/components/TransactionRow.vue @@ -47,10 +47,10 @@ function handleEdit() {