Some checks failed
Release / build (windows-latest) (push) Has been cancelled
- Import: persist `has_header` flag to DB (migration v3) so headerless CSVs like Desjardins don't lose their first data row on re-import. - Categories: promote children to root on parent deletion instead of cascading deactivation, preventing invisible orphans. - Categories: add re-initialize button to reset all categories and keywords to seed defaults. - Bump version to 0.2.1 across tauri.conf.json, package.json, Cargo.toml. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.1 KiB
1.1 KiB
Task: Fix orphan categories + add re-initialize button
Root Cause (orphan categories)
deactivateCategory ran SET is_active = 0 WHERE id = $1 OR parent_id = $1, which silently
deactivated ALL children when a parent was deleted — even children that had transactions assigned.
Since getAllCategoriesWithCounts filters WHERE is_active = 1, those children vanished from the UI
with no way to recover them.
Plan
- Fix
deactivateCategory: promote children to root, only deactivate the parent itself - Add
getChildrenUsageCountto block deletion when children have transactions - Add
reinitializeCategoriesservice function (re-runs seed data) - Add
reinitializeCategoriesto hook - Add re-initialize button with confirmation on CategoriesPage
- Add i18n keys (en + fr)
- Update deleteConfirm/deleteBlocked messages to reflect new behavior
npm run buildpasses
Review
6 files changed. Orphan fix promotes children to root level instead of cascading deactivation. Re-initialize button resets all categories+keywords to seed state (with user confirmation).