feat(layout): dynamic top-bar title across dashboard / admin pages #94

Merged
YousifShkara merged 1 commit from feat/bunyip-upgrade-03-topbar-title into main 2026-06-10 07:30:31 +02:00
Owner

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.

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.
feat(layout): dynamic top-bar title across dashboard / admin pages
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / fmt / clippy / build / test (pull_request) Successful in 1m8s
91a1396b3a
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.
YousifShkara deleted branch feat/bunyip-upgrade-03-topbar-title 2026-06-10 07:30:31 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!94
No description provided.