Skip to content

feat(dashboard): show event name in page title and social meta#289

Draft
harshtandiya wants to merge 1 commit into
developfrom
claude/issue-286-context-eft1e9
Draft

feat(dashboard): show event name in page title and social meta#289
harshtandiya wants to merge 1 commit into
developfrom
claude/issue-286-context-eft1e9

Conversation

@harshtandiya

Copy link
Copy Markdown
Collaborator

Closes #286

Problem

Every dashboard route ships the static Buzz Dashboard title, so search results and link previews say nothing about the event.

As @NagariaHussain pointed out on the issue, usePageMeta alone can't fix this — a JS-set title never reaches non-rendering crawlers (Slack/WhatsApp/X previews, and Google's first-pass fetch). The title has to be in the HTML the server returns.

Approach

The dashboard is one SPA served from a single Jinja shell (dashboard/index.html → built to buzz/www/dashboard.html), so the route is resolved server-side and rendered into <title> and the og/twitter tags. This is the same pattern LMS uses in lms/www/_lms.py; no page is converted to Jinja.

usePageMeta is layered on top for client-side navigation, where there's no new server response.

Route Title
/b/register/<event> <Event> - Register
/b/<event>/<form> <Event> - Talk Proposal
/b/event-proposal Buzz Settings banner title, else Propose an Event
anything else Buzz Dashboard

short_description and meta_image on Buzz Event feed the description and og:image — meta_image has existed on the doctype for a while and was rendered nowhere until now.

Scope note

The issue lists /event-proposal as the "talk proposal page", but that route is the Event Proposal form — proposing a new event, global and not tied to any event, so it has no event name to show. It gets the Buzz Settings banner title.

The page speakers actually submit talks through is the per-event custom form route /b/<event>/<form>, which wasn't in the issue's scope. It's included here since it's the one that can carry an event name.

Notes

  • Only published events and published form rows resolve. frappe.db reads bypass permissions and this runs for Guests, so without that filter an unpublished event would leak its title.
  • Jinja is kept inside attributes and <title> only. The Vite dev server serves index.html raw, and a stray {{ }} or {% %} text node in <head> makes the HTML parser close head early and render the literal on the page. There's a comment in the file so this doesn't get undone.
  • Route matching reuses RESERVED_EVENT_ROUTES from buzz_event.py rather than re-listing prefixes, so it stays correct when a new top-level route is added.
  • Titles use a plain hyphen, not the en dash from the issue text — ruff's RUF001 flags ambiguous unicode and no Python file in the repo uses one. Server and client titles match exactly.
  • Resolution is wrapped so an unexpected error logs and falls back to the default instead of 500ing the whole dashboard.
  • No schema changes, so no bench migrate needed.

Tests

buzz/test_page_meta.py covers each route, both fallbacks, description/image resolution, and that an unpublished event doesn't leak its title.

Verification status

Ruff (format + check) and the frappe semgrep ruleset pass locally on the changed files.

Not yet run: the unit tests, yarn typecheck, and the build — this was written in an environment without a bench or node_modules. Draft until CI confirms, and someone should load a real /b/register/<event> and view-source to confirm the server-rendered title.


Generated by Claude Code

Registration and event form pages all shipped the static "Buzz Dashboard"
title, so search results and link previews showed nothing about the event.

The dashboard is one SPA served from a single jinja shell, so the route is
resolved server-side in page_meta.py and rendered into the title and
og/twitter tags. usePageMeta keeps the title correct on client-side
navigation. meta_image and short_description on Buzz Event are now used for
the first time.

Titles:
- /b/register/<event>      -> "<Event> - Register"
- /b/<event>/<form>        -> "<Event> - Talk Proposal"
- /b/event-proposal        -> Buzz Settings banner title
- everything else          -> "Buzz Dashboard"

Only published events and published form rows resolve, so an unpublished
event cannot leak its title to guests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01462VDacTH4karkuxhXboZf
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.

Show event name in browser/page title on registration and talk proposal pages

2 participants