mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 13:52:20 +00:00
The top insights navigation was driven purely by data availability: a sub-page pill appeared whenever its metric had readings in the 90-day window, with no connection to the per-tile visibility the customize panel writes. Hiding a sub-page in Anpassen therefore never removed its nav pill, and the two surfaces drifted apart. Thread the resolved insights layout into the tab strip via the layout shell. A pill now shows iff its metric has data AND its slug is visible in the saved layout; data availability stays the floor, so a layout-visible metric with no readings still gets no pill. Pills and group children order by the saved layout order, falling back to the natural slug order. While the layout query is in flight the strip keeps the data-only gate, so first paint is unchanged and a slow or failed layout fetch never suppresses a pill the user has data for. Add a total slug to manager-group mapping in sub-page-metric so every routed sub-page resolves to a category, a superset of the tab-strip nav grouping that also covers the flat pills and the sleep / mood / events categories the strip never collapses.