fix: a split's offset line takes its parent's manual flag (#454) #519

Merged
maximus merged 2 commits from issue-454-offset-manual-flag into main 2026-10-30 00:39:19 +00:00

2 commits

Author SHA1 Message Date
le king fu
4526637223 docs: the offset line's manual flag in the docs and changelogs (#454)
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m25s
- docs/architecture.md: the line of splitOffsetService.ts says that the
  offset line takes its parent's manual flag, when, and why; the « SQL
  réel — node:sqlite » section describes the scenario test that runs
  whole services on the schema of a new profile, seed included.
- CHANGELOG.md, CHANGELOG.fr.md: one more sentence in the entry of #454,
  “Auto-categorize” no longer moves that amount alone.
- REVIEW.md: the new test joins the list of the front tests that read
  consolidated_schema.sql, which a PR touching only src-tauri/** does not
  run.

Refs #454

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 21:39:33 -04:00
le king fu
36c04ad6b8 fix: a split's offset line takes its parent's manual flag (#454)
`autoCategorizeTransactions` picks every row without a category whose
`is_manually_categorized` is 0, the children of a split included. The
offset line kept the flag 0 whatever its parent's, so a split parent set
to « Aucune catégorie » by hand lost its offset line to « Catégoriser
automatiquement »: the keyword of the parent's description sent it alone
to its category. With −120 « EPICERIE METRO » split as −50 to B, then set
to no category, the totals went from NULL −70 and B −50 to 1111 +50,
B −50 and NULL −120 (scenario R-S3 of the review of PR #515).

- propagateCategoryToOffsets reads the parent's flag, after the caller's
  UPDATE of the parent, and writes it on the offset line with its
  category, through toSqlFlag (a base written before #390 may hold the
  TEXT 'true').
- saveSplitAdjustment gives the offset line its parent's flag when it
  writes the split, so a split made under a parent categorized, or set to
  no category, by hand does not lose it either. The entries keep the
  column's default, 0.

Tests: a scenario test on a real SQLite database (node:sqlite, the schema
of a new profile with its seed, foreign keys on, the real services
through an adapter local to the file), unit tests of both copies (flag 1,
flag 0 and the TEXT 'true'), and the tests that pinned the offset line's
UPDATE and, since #513, its INSERT, which change on purpose.

Refs #454

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 21:36:55 -04:00