Simpl-Resultat/src/utils
le king fu ce25ddc191 feat: open the Reports on « Cette année » and let « Tout » reach every date (#479)
Without any period in the URL, the Reports opened on the whole calendar
year (January 1st to December 31st, months to come included) under the
« Personnalisé » button. They now open on « Cette année », the year to
date (January 1st to today), as the Dashboard does, with its button lit
(decision 1 of Max, 2026-10-20). « Tout » showed the current calendar
year too: resolveReportsPeriod replaced its empty range by that year.
It now leaves `from` and `to` absent, and the services add no date
clause (decision 2).

- computeDateRange takes `today` as a last optional parameter (default:
  the current day); no existing caller changes, the Dashboard included.
- resolveReportsPeriod: a bookmark with two valid dates is kept as it
  is; a valid preset other than `custom` gets its range for `today`
  (`all`: none); anything else (no parameter, an invalid period,
  `custom` without two valid dates) falls back to « Cette année ».
  currentYearRange is gone; `from` and `to` are optional in
  UseReportsPeriodResult.
- getCategoryZoom takes optional bounds: its four queries skip a bound
  bound to NULL, `($2 IS NULL OR t.date >= $2) AND ($3 IS NULL OR
  t.date <= $3)`, with the same parameters in the same order
  ([id, from ?? null, to ?? null]). In the per-child query the
  condition stays in the LEFT JOIN's ON, so a subcategory without any
  transaction in the period keeps its row (total 0).
- useTrends and useCategoryZoom pass absent bounds through.
- useCompare: syncReferenceOnPeriodChange takes an absent `to`; on
  « Tout » the reference month shown does not move, and a later switch
  to a dated period syncs it to the end of that period (decision of
  Max, 2026-10-27). The ref is typed `string | undefined`, so a direct
  opening on ?period=all works.
- Texts fixed by Max (2026-10-27): reports.help.tips[2] and
  reports.hub.trendsDescription, FR and EN, no longer say "12 months":
  Trends follows the period selector.

Tests: the default, a custom bookmark, `custom` without dates, a preset
and `all` resolved for a fixed day; computeDateRange with `today`;
getCategoryZoom without bounds ([42, null, null] in every query, no
bare date condition), with bounds, and the per-child bounds in the ON;
the sync on « Tout »; wiring tests (src/test/hookHarness.ts) of
useCompare (mount on « Cette année » or « Tout », « Tout » then a dated
period, a user-picked month kept), useTrends (both views) and
useCategoryZoom (absent bounds reach the service).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 23:04:27 -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
categoryHierarchy.test.ts test(categories): pin the rules the review of #393 left green (#393) 2026-10-19 20:59:07 -04:00
categoryHierarchy.ts feat: gather the category hierarchy rules in one module (#393) 2026-10-18 19:16:14 -04:00
changelog.test.ts feat: show the Journal before the version history, folded by version (#372) 2026-10-18 18:02:48 -04:00
changelog.ts feat: show the Journal before the version history, folded by version (#372) 2026-10-18 18:02:48 -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 fix(budget): emit the grid rows depth-first and close subtotal blocks 2026-10-13 20:42:27 -04:00
collapsibleRows.ts fix(budget): emit the grid rows depth-first and close subtotal blocks 2026-10-13 20:42:27 -04:00
csvAutoDetect.test.ts docs(import): apply the review suggestions of PR #489 (#371) 2026-10-23 19:21:16 -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 feat: open the Reports on « Cette année » and let « Tout » reach every date (#479) 2026-10-27 23:04:27 -04:00
dateRange.ts feat: open the Reports on « Cette année » and let « Tout » reach every date (#479) 2026-10-27 23:04:27 -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 test(onboarding): pin the order of CHECKLIST_ITEM_KEYS to the rows 2026-10-13 21:33:37 -04:00
onboardingChecklist.ts feat(onboarding): visit steps, eight rows, "Got it" and one-time initialization 2026-10-13 21:32:20 -04:00
onboardingPath.locales.test.ts feat(onboarding): Transactions card suggests Add as keyword, Budget card names leaves and the Annual column 2026-10-13 21:12:25 -04:00
onboardingPath.test.ts feat(onboarding): step cards of the Categories and Reports pages 2026-10-13 21:45:05 -04:00
onboardingPath.ts feat(onboarding): step cards of the Categories and Reports pages 2026-10-13 21:45:05 -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 test(i18n): follow-ups of the review of PR #435 2026-10-13 19:53:18 -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.test.ts test(budget): a collapsed sub-group last in its group keeps its subtotal (#446) 2026-10-19 21:10:03 -04:00
reorderRows.ts fix(budget): emit the grid rows depth-first and close subtotal blocks 2026-10-13 20:42:27 -04:00
rootFiles.test.ts feat(import): warn about the CSV files placed directly in the import folder 2026-10-13 20:59:20 -04:00
rootFiles.ts feat(import): warn about the CSV files placed directly in the import folder 2026-10-13 20:59:20 -04:00
splitOffset.test.ts test: pin the amount condition of isOffsetChild under a parent of zero (#454) 2026-10-27 22:14:49 -04:00
splitOffset.ts fix: a split's offset line follows its parent when it is recategorized (#454) 2026-10-27 22:13:08 -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
startupConnection.test.ts fix: replace the home and profile folders exactly in the Journal (#497) 2026-10-26 21:24:35 -04:00
startupConnection.ts fix: replace the home and profile folders exactly in the Journal (#497) 2026-10-26 21:24:35 -04:00