derive the last eight hand-maintained page tab lists from the nav manifest - #6389
Merged
Conversation
…ifest (#6383) Brain, CoS, Digital Twin, MeatSpace, Media Gen, Music, Sharing and System Resources each still hand-maintained a local tab array that duplicated destinations already declared in server/lib/navManifest.js, kept in sync only by a source-scraping drift test. They now carry `tabGroup` + `tabId` on their manifest entries and build their tab bar from `getPageNavTabs(group)`, finishing the conversion #6365 started for the other six. Manifest entries in each new group were reordered so file order is the page's deliberate tab order (getPageNavTabs returns declaration order), and eleven tabs gained a `tabLabel` where the page's short label differs from the label ⌘K and voice need to be unambiguous — "Health" vs "Body Health", "Goals" vs "Twin Goals", "Legacy" vs "Legacy Bundle", "Generate"/"Artists"/"Albums"/"Tracks" vs the "Music …" pages, "History"/"Three.js" vs "Media History"/"Three.js Models", and "Overview"/"Storage"/"Queues" vs the "System Resources …" rows. Brain's Spotify and YouTube tabs turned out to already have manifest entries (under the ids nav.settings.spotify/youtube, kept stable because they're persisted palette-history values), so both were already reachable from ⌘K and voice and only needed the tabGroup tag. Sharing's SECTIONS list fits getPageNavTabs unchanged once `path` is read as `to`, so all eight ship together rather than carving Sharing into a follow-up. The 14 converted pages were each repeating the same five-line merge-and-throw, so that moves to `buildPageNavTabs` (client/src/lib/pageNavTabs.js), and the per-page parity test moves to a shared `expectPageNavTabs` assertion. The old per-page test compared the derived array back against its own source and so could not fail; each page now pins the literal id/label/order it means to render, which is what catches a manifest reorder or relabel. navManifest.test.js's TABBED_PAGES drops all eight rows along with the now-dead `kind: 'ids'`/`kind: 'links'` parsers and `allowBasePrefix`. It keeps extractConstArrayBlock/extractConstIds/extractSwitchCases and nestedIdSources, which are still load-bearing for Models' LLM_NAV_SUBROUTES and the Settings header ↔ `switch (activeTab)` parity test, so three rows remain: Settings, Models and POST.
atomantic
force-pushed
the
claim/issue-6383
branch
from
September 6, 2026 15:53
c218baf to
65ed58d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getPageNavTabs(group)+ a page-local presentation map, finishing thetabGroupconversion [code-quality-page-tabs-from-manifest] Derive the fourteen hand-maintained page tab lists from the nav manifest #6365 started for the other six. Each page keeps only the icon (andfullBleed) it owns; the nav manifest owns id, label and order.tabLabelwhere the page's short label differs from the qualified label ⌘K and voice need (HealthvsBody Health,GoalsvsTwin Goals,GeneratevsMusic Designer,QueuesvsActive Queues, …).TABBED_PAGESinnavManifest.test.jsdrops all eight rows plus the now-deadkind: 'ids'/kind: 'links'parsers andallowBasePrefix. Three rows remain — Settings, Models, POST — becauseextractConstArrayBlock/extractConstIds/extractSwitchCases/nestedIdSourcesare still load-bearing for Models'LLM_NAV_SUBROUTESand the Settings header ↔switch (activeTab)parity test.buildPageNavTabs(client/src/lib/pageNavTabs.js) for the merge-and-throw, andexpectPageNavTabs(client/src/test/pageNavTabAssertions.js) for the per-page test. The old per-page assertion compared the derived array back against its own source and so could not fail; each page now pins the literal id/label/order it means to render.Two things the issue got slightly wrong
nav.settings.spotify/nav.settings.youtube, kept stable because they're persisted palette-history values. Both were already reachable from ⌘K and voice; they only needed thetabGrouptag, not new rows.getPageNavTabsunchanged oncepathis read asto, so all eight ship together instead of carving Sharing into a follow-up.Test plan
cd server && npx vitest run lib/navManifest.test.js— 61 passedcd server && npm test— 2010 files, 39943 passedcd client && npm test— 872 files, 10595 passedcd client && npm run lint— cleantabIdwith no matching presentation entry throws at module load.Closes #6383