Simpl-Resultat/src/utils
le king fu a58f8b98bc fix(onboarding): count an import only once the file brought a transaction
The "Import a first file" step counted `imported_files` rows in status
`completed`. `executeImport` writes that row before its first insert, so
an import that added nothing (a file holding only its header, or one
whose rows were all in error in the preview) ticked the step: the Import
card then said "Done." at rest and sent the user to /transactions, which
had nothing to categorize and led back to the import.

The counter now keeps a completed file only when a transaction points at
it (`EXISTS` on `transactions.file_id`, covered by
`idx_transactions_file`). Replayed with sqlite3 on
`consolidated_schema.sql`: 0 after an import without a valid row, 0
before a successful import's first insert and 1 after, 0 once the file
turns to `error`. Duplicates only change nothing: their transactions
came with an earlier completed file, and a restore writes its own.

The tests run without SQLite, so the rule is pinned on the query, and
the Import page is pinned at rest after such an import: step 4 again,
on the first source card, without "Done.".

Review of #398 (PR #404), option A chosen by Max.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 21:05:14 -04:00
..
amountParser.test.ts fix(import): read amounts with an anchored parser and a real debit/credit rule 2026-08-13 13:37:06 -04:00
amountParser.ts fix(import): read amounts with an anchored parser and a real debit/credit rule 2026-08-13 13:37:06 -04:00
bankSignatures.test.ts fix(import): stop a generic bank signature from claiming, and misreading, a richer file 2026-08-14 12:03:07 -04:00
bankSignatures.ts fix(import): stop a generic bank signature from claiming, and misreading, a richer file 2026-08-14 12:03:07 -04:00
chartPatterns.tsx feat: add chart patterns, context menu, and import preview popup (v0.2.3) 2026-02-13 23:55:19 +00:00
collapsibleRows.test.ts feat(reports): collapse category hierarchy at every level (socle + 3 reports) 2026-07-15 20:58:18 -04:00
collapsibleRows.ts feat(reports): collapse category hierarchy at every level (socle + 3 reports) 2026-07-15 20:58:18 -04:00
csvAutoDetect.test.ts feat(import): recognise known bank layouts and report format drift 2026-08-13 14:54:46 -04:00
csvAutoDetect.ts fix(import): veto a labelled description column that behaves like an enum 2026-08-14 12:02:59 -04:00
dateParser.ts fix: reload column headers on config change and add YYYYMMDD date format 2026-02-08 04:08:33 +00:00
dateRange.test.ts test: add unit tests for dateRange.ts utility 2026-03-10 23:05:32 -04:00
dateRange.ts fix: address reviewer feedback (#31) 2026-03-10 18:53:31 -04:00
headerDictionary.test.ts feat(import): detect transaction columns by header label 2026-08-13 13:58:02 -04:00
headerDictionary.ts feat(import): detect transaction columns by header label 2026-08-13 13:58:02 -04:00
importFormat.test.ts fix(import): fail a row whose amount cell is unreadable beside a 0,00 sibling 2026-08-14 12:02:52 -04:00
importFormat.ts fix(import): fail a row whose amount cell is unreadable beside a 0,00 sibling 2026-08-14 12:02:52 -04:00
onboardingChecklist.test.ts feat(onboarding): share the getting-started path through a provider 2026-10-08 07:33:57 -04:00
onboardingChecklist.ts feat(onboarding): share the getting-started path through a provider 2026-10-08 07:33:57 -04:00
onboardingPath.test.ts feat(onboarding): the Budget page's step card and its highlight 2026-10-08 09:21:29 -04:00
onboardingPath.ts fix(onboarding): count an import only once the file brought a transaction 2026-10-08 21:05:14 -04:00
referencePeriod.test.ts feat(reports/highlights): default reference month to previous month + YTD current year, user-changeable (#106) 2026-04-19 08:28:30 -04:00
referencePeriod.ts feat(reports/highlights): default reference month to previous month + YTD current year, user-changeable (#106) 2026-04-19 08:28:30 -04:00
renderCategoryLabel.test.ts feat(balance): account form vehicle field + category rename via custom_label (#203) 2026-06-01 20:50:40 -04:00
renderCategoryLabel.ts feat(balance): account form vehicle field + category rename via custom_label (#203) 2026-06-01 20:50:40 -04:00
reorderRows.ts feat(reports): hierarchical real-vs-real compare with subtotals 2026-07-04 17:32:38 -04:00
sqlFilters.test.ts feat(reports): plumb accountIds[] account filter into 7 report services 2026-07-11 15:15:37 -04:00
sqlFilters.ts feat(reports): plumb accountIds[] account filter into 7 report services 2026-07-11 15:15:37 -04:00
sqlFlag.test.ts fix(transactions): bind the manual-categorization flag as an integer (#390) 2026-10-06 20:35:00 -04:00
sqlFlag.ts fix(transactions): bind the manual-categorization flag as an integer (#390) 2026-10-06 20:35:00 -04:00