feat(catalog): part-count signposting + drill hint for deep category trees #116

Merged
root merged 1 commits from dev into main 2026-06-09 17:02:33 +03:00
Owner

pcat/emex vehicles decode into a tree whose top level is ~100% folders with
zero parts (6746/9458 root nodes are parents, 0 direct leaves across 477
vehicles). Users — serkan filazi among them — saw an opaque wall of identical
folder cards, assumed the parts feature was missing, and bounced without ever
drilling (his session: 3 view-mode toggles, 0 category clicks; his data was
2-3 clicks deep and fully reachable).

Two changes, no upstream/proxy cost:

  • getCategoryTree now rolls up a subtree partCount per node (one grouped parts
    read + JS post-order sum). The grid already renders "N parça", so folders
    now read "Fren sistemi · 142 parça" and steer drilling toward the branches
    that actually contain parts; empty branches stay quiet. Counts reflect
    drilled data and grow as branches are visited.
  • A one-line drill hint on a "cold" tree (nothing drilled yet → no counts) so
    first-visit users know parts live inside the subcategories instead of reading
    the folder wall as a broken/empty catalog. Drops away once any branch is hit.

Verified: subtree roll-up unit test + existing suite (10/10), tsc + biome clean
across api/web/shared.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

pcat/emex vehicles decode into a tree whose top level is ~100% folders with zero parts (6746/9458 root nodes are parents, 0 direct leaves across 477 vehicles). Users — serkan filazi among them — saw an opaque wall of identical folder cards, assumed the parts feature was missing, and bounced without ever drilling (his session: 3 view-mode toggles, 0 category clicks; his data was 2-3 clicks deep and fully reachable). Two changes, no upstream/proxy cost: - getCategoryTree now rolls up a subtree partCount per node (one grouped parts read + JS post-order sum). The grid already renders "N parça", so folders now read "Fren sistemi · 142 parça" and steer drilling toward the branches that actually contain parts; empty branches stay quiet. Counts reflect drilled data and grow as branches are visited. - A one-line drill hint on a "cold" tree (nothing drilled yet → no counts) so first-visit users know parts live inside the subcategories instead of reading the folder wall as a broken/empty catalog. Drops away once any branch is hit. Verified: subtree roll-up unit test + existing suite (10/10), tsc + biome clean across api/web/shared. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
root added 1 commit 2026-06-09 17:02:28 +03:00
feat(catalog): part-count signposting + drill hint for deep category trees
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
3482bb86e3
pcat/emex vehicles decode into a tree whose top level is ~100% folders with
zero parts (6746/9458 root nodes are parents, 0 direct leaves across 477
vehicles). Users — serkan filazi among them — saw an opaque wall of identical
folder cards, assumed the parts feature was missing, and bounced without ever
drilling (his session: 3 view-mode toggles, 0 category clicks; his data was
2-3 clicks deep and fully reachable).

Two changes, no upstream/proxy cost:
- getCategoryTree now rolls up a subtree partCount per node (one grouped parts
  read + JS post-order sum). The grid already renders "N parça", so folders
  now read "Fren sistemi · 142 parça" and steer drilling toward the branches
  that actually contain parts; empty branches stay quiet. Counts reflect
  drilled data and grow as branches are visited.
- A one-line drill hint on a "cold" tree (nothing drilled yet → no counts) so
  first-visit users know parts live inside the subcategories instead of reading
  the folder wall as a broken/empty catalog. Drops away once any branch is hit.

Verified: subtree roll-up unit test + existing suite (10/10), tsc + biome clean
across api/web/shared.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
root merged commit 7009c98d37 into main 2026-06-09 17:02:33 +03:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: root/sase.tr#116