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> |
||
|---|---|---|
| .. | ||
| .vscode | ||
| public | ||
| src | ||
| .gitignore | ||
| README.md | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| vite.config.js | ||
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.