feat(rapports) : repli/depliage a chaque niveau de la hierarchie (socle + 3 rapports) #292

Open
maximus wants to merge 2 commits from issue-288-collapse-socle into main
Owner

Resolves #288

Generated autonomously by /autopilot run of 2026-07-15

Summary

  • Generalizes the report category collapse from level-1-only to every hierarchy level on the 3 hierarchical report tables (real-vs-real Compare, real-vs-budget Compare, Trends by category), via an ancestor-walk visibility algorithm that is independent of row order (fixes the level-ordered budget grid case).
  • Persistence moves from localStorage to user_preferences (per-profile, destroyed with the profile — privacy-first); the hook gains storageKey: null + options.defaultExpanded + async hydration, and a pure tested isCollapsedFor polarity helper.
  • Both render gates fixed (isTopParent -> isParent) so intermediate parents get a truthful chevron + aria-expanded; aria-level added on parent rows; dead CategoryTable.tsx removed. Collapse stays purely visual (subtotals/results from raw rows). 823 vitest green, build + cargo clean.
Resolves #288 Generated autonomously by /autopilot run of 2026-07-15 ## Summary - Generalizes the report category collapse from level-1-only to **every hierarchy level** on the 3 hierarchical report tables (real-vs-real Compare, real-vs-budget Compare, Trends by category), via an **ancestor-walk** visibility algorithm that is independent of row order (fixes the level-ordered budget grid case). - Persistence moves from `localStorage` to `user_preferences` (per-profile, destroyed with the profile — privacy-first); the hook gains `storageKey: null` + `options.defaultExpanded` + async hydration, and a pure tested `isCollapsedFor` polarity helper. - Both render gates fixed (`isTopParent` -> `isParent`) so intermediate parents get a truthful chevron + `aria-expanded`; `aria-level` added on parent rows; dead `CategoryTable.tsx` removed. Collapse stays purely visual (subtotals/results from raw rows). 823 vitest green, build + cargo clean.
maximus added 2 commits 2026-07-16 00:58:37 +00:00
Lessons from the v0.13.0 release (session fdda84cb):
- Step 0: revalidate the tip locally before tagging — check.yml never
  runs on main, and ensure .claude/worktrees/ is empty (vitest recurses)
- Step 9: verify the published release — 7 expected artifacts and
  latest.json content (drives auto-update); status=success is not enough
- Rule: tagging publishes externally via the updater JSON — confirm
  with Max before tagging

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat(reports): collapse category hierarchy at every level (socle + 3 reports)
All checks were successful
PR Check / rust (pull_request) Successful in 23m0s
PR Check / frontend (pull_request) Successful in 2m30s
48adb3db77
Generalize the report category collapse from level-1-only to every hierarchy
level, on the three hierarchical report tables (real-vs-real Compare,
real-vs-budget Compare, Trends by category). Visibility is now decided by an
ancestor walk, not by row adjacency, so it is independent of row order (the
level-ordered budget grid emits a non-DFS order).

- collapsibleRows: rewrite visibleRows as an ancestor walk (a row is hidden iff
  any ancestor is collapsed); add parentKeyOf + injective `p:` keys;
  collapsibleKeys returns all parents (any depth); extract the pure, tested
  isCollapsedFor polarity helper; MAX_TREE_DEPTH cycle guard.
- useCollapsibleGroups: persist in user_preferences (per-profile, destroyed with
  the profile) instead of localStorage; storageKey nullable (no persistence);
  options.defaultExpanded; async hydration (no flash); collapseAll(rows).
- 3 tables: fix BOTH gates (collapsed flag + button) isTopParent -> isParent, add
  parentKeyOf accessors, aria-level on parent rows.
- Delete dead CategoryTable.tsx (0 imports).
- Tests: rewrite collapsibleRows.test.ts (BFS==DFS masking, cycle guard,
  cross-section ancestor, "(direct)" leaf, polarity); extend overTimeTableModel
  fixture to 3 levels with cascade assertions.

Collapse stays purely visual: subtotals and result lines are computed from raw
rows, never from visible rows.

Resolves #288

Generated autonomously by /autopilot run of 2026-07-15

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maximus added the
autopilot:pending-human
label 2026-07-16 00:58:50 +00:00
All checks were successful
PR Check / rust (pull_request) Successful in 23m0s
PR Check / frontend (pull_request) Successful in 2m30s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin issue-288-collapse-socle:issue-288-collapse-socle
git checkout issue-288-collapse-socle
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: maximus/Simpl-Resultat#292
No description provided.