Conversation
…vePageTitle Fixes NousResearch#80891. resolvePageTitle() special-cased the root path ("/") and returned the hardcoded "Sessions" title before it ever consulted pluginTabs. A dashboard plugin declaring tab: { path: "/example", override: "/" } correctly renders at the root once manifests load, but the shell's page header still showed "Sessions" instead of the plugin's own label -- the caller already builds pluginTabs as { path: manifest.tab.override ?? manifest.tab.path, label: manifest.label }, so an overriding plugin's label was already present under the "/" key; the helper simply checked the wrong thing first. Swapped the two blocks: check pluginTabs first, fall back to the hardcoded "Sessions" title only when nothing overrides "/". Behavior for everyone else is unchanged -- "/" still resolves to "Sessions" when no plugin claims it. Added the requested regression test (a plugin overriding "/" gets its own label) plus a sanity test (a plugin registered at a different path does not affect the root title). Verified as a genuine regression by reverting the fix and confirming the new test fails with "Sessions" instead of the plugin's label. 7/7 pass in resolve-page-title.test.ts; 167/167 across the broader web/src/lib test suite (no regression).
|
This was generated by AI during triage. Summary: Problems:
Solution: Checked against |
Follow-up per review of NousResearch#80897. pluginTabMeta (web/src/App.tsx:479) keys each entry by m.tab.override ?? m.tab.path -- for tab: { path: '/example', override: '/' }, the '/' entry's key comes from the OVERRIDE target, not the plugin's own path. The test comment stated the inverse. Comment-only fix; no logic or assertion changed. 7/7 pass in resolve-page-title.test.ts (no regression).
|
Confirmed, fixed in 972a870. pluginTabMeta keys each entry by m.tab.override ?? m.tab.path, so the "/" entry comes from the override target, not the plugins own path -- the comment had it backwards. Comment-only change, no logic or assertion touched. 7/7 pass. |
Fixes #80891.
Problem
resolvePageTitle()special-cased the root path ("/") and returned the hardcoded"Sessions"title before it ever consultedpluginTabs. A dashboard plugin declaringtab: { path: "/example", override: "/" }correctly renders at the root once manifests load, but the shell's page header still showed "Sessions" instead of the plugin's own label.Fix
Swapped the two blocks: check
pluginTabsfirst, fall back to the hardcoded "Sessions" title only when nothing overrides"/". Behavior for everyone else is unchanged.Verification
Added the requested regression test plus a sanity test. Verified as a genuine regression by reverting the fix and confirming the new test fails with "Sessions" instead of the plugin's label.
7/7 pass in
resolve-page-title.test.ts; 167/167 across the broaderweb/src/libtest suite (no regression).