Skip to content

Derive Calendar/Goals/Insights/Privacy/Messages/Wiki tabs from the nav manifest - #6385

Merged
atomantic merged 1 commit into
mainfrom
claim/issue-6365
Sep 6, 2026
Merged

Derive Calendar/Goals/Insights/Privacy/Messages/Wiki tabs from the nav manifest#6385
atomantic merged 1 commit into
mainfrom
claim/issue-6365

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • Extends the tabGroup/getPageNavTabs(group) mechanism Settings and Models already use (3c8799a) to six more pages: Calendar, Goals, Insights, Privacy, Messages, Wiki. Each now derives its TABS from the nav manifest plus a small local presentation map (icon, fullBleed, needsAccounts), instead of hand-maintaining a duplicate { id, label } array kept in sync only by a source-scraping drift test.
  • Adds tabLabel for the four page-local labels that differ from the sidebar/⌘K label (Goals' List/Tree, Insights' and Privacy's Overview, Wiki's Overview) — those render unchanged in the page tab bars and unchanged in the sidebar/⌘K.
  • tabId uniqueness is now scoped to tabGroup when present (falling back to the existing per-section scope for Settings/Models), since Insights and Privacy both use the id overview while sharing the "Identity" sidebar section. getSectionNavTabs/getNavSectionForPath explicitly exclude tabGroup entries so Settings/Models section child-nav is unaffected.
  • navManifest.test.js drops these six pages' TABBED_PAGES rows and their source-scraping; each page's own test now asserts its TABS match getPageNavTabs(group) in id, label and declaration order.

Remaining

Brain, CoS, Digital Twin, MeatSpace, Media Gen, Music, Sharing and System Resources still use the old scraper mechanism — filed as #6383. Two things that mechanical conversion needs to handle there: Brain's spotify/youtube tabs currently have no manifest entry at all (a pre-existing gap, unrelated to this PR), and Sharing's tab list is a different source shape ({ to/path, label } links mixed with cross-links) than the flat { id, label } arrays the other pages use.

Refs #6365

Test plan

  • cd server && npx vitest run lib/navManifest.test.js — 77 passed
  • cd client && npx vitest run src/pages/Calendar.test.jsx src/pages/Goals.test.jsx src/pages/Insights.test.jsx src/pages/Privacy.test.jsx src/pages/Messages.test.jsx src/pages/Wiki.test.jsx — 32 passed
  • cd server && npm test — full suite green (2007 files, 39902 tests)
  • cd client && npm test — full suite green aside from one pre-existing flake in StartStory.test.jsx (unrelated page, passes in isolation)

…v manifest (#6365)

These six pages each hand-maintained a local TABS array that duplicated the
same destinations already declared in server/lib/navManifest.js, kept in
sync only by a source-scraping drift test. Extend the tabGroup/getPageNavTabs
mechanism Settings and Models already use (3c8799a) so the manifest is the
one registry: each manifest entry now carries `tabGroup` (+ an optional
`tabLabel` for the four short page-local labels that differ from the
sidebar/⌘K label — Goals' List/Tree, Insights' and Privacy's Overview, and
Wiki's Overview), and each page derives its TABS from
`getPageNavTabs(group)` merged with a small local presentation map (icon,
fullBleed, needsAccounts) that throws at import time if a manifest tab has
no matching presentation entry.

`tabId` uniqueness is now scoped to `tabGroup` when present (falling back to
the existing per-section scope for Settings/Models), since Insights and
Privacy both use the id "overview" while sharing the "Identity" section.
`getSectionNavTabs`/`getNavSectionForPath` explicitly exclude tabGroup
entries so the existing Settings/Models section child-nav is unaffected.

navManifest.test.js drops these six pages' TABBED_PAGES rows (and their
source-scraping); each page's own test file now asserts its TABS match
`getPageNavTabs(group)` in id, label and declaration order instead.

Brain, CoS, Digital Twin, MeatSpace, Media Gen, Music, Sharing and System
Resources still use the old scraper — converting them needs either new
manifest entries for tabs the two registries had already lost sync on
(Brain's Spotify/YouTube tabs have no manifest entry at all) or handling a
different source shape (Sharing's link list, POST's switch dispatch).
Follow-up: #6383.
@atomantic
atomantic merged commit 33632fa into main Sep 6, 2026
7 checks passed
@atomantic
atomantic deleted the claim/issue-6365 branch September 6, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant