feat(layout): dynamic top-bar title across dashboard / admin pages #94
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/bunyip!94
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/bunyip-upgrade-03-topbar-title"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Every authenticated page (Applications, Downloads, Membership, Billing, Settings, Two-factor setup, etc.) rendered "Dashboard" in the top bar, even though the browser tab title and the page H1 were correct. Root cause:
dashboard_shellandadmin_shellhardcoded(app_topbar("Dashboard", user))/(app_topbar("Admin", user))regardless of which page was rendering inside the shell.Fix is plumbing, no behavioural change beyond the visible title:
dashboard_shellandadmin_shellgrow atopbar_title: &strparameter that flows straight intoapp_topbar.dashboard_responseandadmin_response(the helpers every authed handler already calls) derive the top-bar title from the existing page-title argument by stripping the· Bunyipsuffix. The browser<title>keeps the suffix; the in-page top bar drops it because the brand is right there in the sidebar.topbar_title(title)does the strip with a sensible fall-through (a title without the suffix passes unchanged), so any handler that diverges from the brand convention still gets a reasonable top bar.No per-handler call site changes. Every existing
dashboard_response(c, user, "/path", "Foo · Bunyip", content)now renders "Foo" in the top bar and "Foo · Bunyip" in the browser tab.Closes finding 5 (top-bar title stuck on "Dashboard") from the Claude-for-Chrome audit. See
docs/bunyip-upgrade/03-topbar-dynamic-title.mdfor the full spec.Every authenticated page (Applications, Downloads, Membership, Billing, Settings, Two-factor setup, etc.) rendered "Dashboard" in the top bar, even though the browser tab title and the page H1 were correct. Root cause: `dashboard_shell` and `admin_shell` hardcoded `(app_topbar("Dashboard", user))` / `(app_topbar("Admin", user))` regardless of which page was rendering inside the shell. Fix is plumbing, no behavioural change beyond the visible title: - `dashboard_shell` and `admin_shell` grow a `topbar_title: &str` parameter that flows straight into `app_topbar`. - `dashboard_response` and `admin_response` (the helpers every authed handler already calls) derive the top-bar title from the existing page-title argument by stripping the ` · Bunyip` suffix. The browser `<title>` keeps the suffix; the in-page top bar drops it because the brand is right there in the sidebar. - Single helper `topbar_title(title)` does the strip with a sensible fall-through (a title without the suffix passes unchanged), so any handler that diverges from the brand convention still gets a reasonable top bar. No per-handler call site changes. Every existing `dashboard_response(c, user, "/path", "Foo · Bunyip", content)` now renders "Foo" in the top bar and "Foo · Bunyip" in the browser tab. Closes finding 5 (top-bar title stuck on "Dashboard") from the Claude-for-Chrome audit. See `docs/bunyip-upgrade/03-topbar-dynamic-title.md` for the full spec.