feat(dashboard): show event name in page title and social meta#289
Draft
harshtandiya wants to merge 1 commit into
Draft
feat(dashboard): show event name in page title and social meta#289harshtandiya wants to merge 1 commit into
harshtandiya wants to merge 1 commit into
Conversation
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
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.
Closes #286
Problem
Every dashboard route ships the static
Buzz Dashboardtitle, so search results and link previews say nothing about the event.As @NagariaHussain pointed out on the issue,
usePageMetaalone 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 tobuzz/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 inlms/www/_lms.py; no page is converted to Jinja.usePageMetais layered on top for client-side navigation, where there's no new server response./b/register/<event><Event> - Register/b/<event>/<form><Event> - Talk Proposal/b/event-proposalPropose an EventBuzz Dashboardshort_descriptionandmeta_imageon Buzz Event feed the description and og:image —meta_imagehas existed on the doctype for a while and was rendered nowhere until now.Scope note
The issue lists
/event-proposalas 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
frappe.dbreads bypass permissions and this runs for Guests, so without that filter an unpublished event would leak its title.<title>only. The Vite dev server servesindex.htmlraw, 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.RESERVED_EVENT_ROUTESfrombuzz_event.pyrather than re-listing prefixes, so it stays correct when a new top-level route is added.bench migrateneeded.Tests
buzz/test_page_meta.pycovers 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 ornode_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