mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
The ToS/Privacy links on join surfaces opened an in-app dialog that rendered the policy Markdown with the message Markdown component, which requires the router. During onboarding the router is not mounted, so clicking either link tore down the whole React tree (blank app). Fix the class, not the symptom: - Relay: new public GET /api/join-policy/terms and /privacy routes render the operator-configured Markdown as minimal standalone HTML pages (pulldown-cmark; raw HTML in the Markdown is escaped to text; 404 when unconfigured, matching the JSON policy endpoint). - Desktop: JoinPolicyNotice links now openUrl() those pages in the system browser via the Tauri opener; the in-app dialog is deleted. Every call site threads relayWsUrl so links resolve against the relay that served the policy. The web invite page keeps its in-page dialog — it already runs in a browser and does not crash. Tests: render/escape unit test + Postgres-gated route test on the relay; joinPolicyDocumentUrl unit test on desktop. Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz>