← Back to Pull requests

Per-route SEO meta and build-time sitemap.xml #242

Open
unknown opened this pull request with 336 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 29, 2026 04:38 UTC
Author

<!-- CURSOR_AGENT_PR_BODY_BEGIN -->

Summary

  • Adds client-side RouteSeo so each route gets its own <title>, meta description, canonical URL, and OG/Twitter tags (collectible detail pages use catalog name, set, and finish).

  • Removes the hard-coded homepage canonical from index.html (canonical is set per route after navigation).

  • Generates sitemap.xml at the end of npm run build from bundled catalog JSON (6 public static routes + 591 SKU detail URLs).

  • Updates robots.txt with Sitemap: and disallows /admin and /t/; private routes stay out of the sitemap.
  • How to verify (local)

    cd frontend && npm run build
    # Expect: dist/sitemap.xml with 597 URLs
    npm run test -- src/seo
    PLAYWRIGHT_SKIP_BUILD=1 npm run test:e2e -- e2e/smoke.spec.js e2e/public-routes.spec.js
    

    From repo root: npm run test:scripts (sitemap SKU count assertions).

    How to verify (after deploy)

    1. Open https://shardstash.web.app/sitemap.xml — XML, not the SPA HTML shell.
    2. Open https://shardstash.web.app/robots.txt — includes Sitemap: https://shardstash.web.app/sitemap.xml.
    3. Open a card finish URL such as https://shardstash.web.app/collectibles/LT24-ELS-01/LT24-ELS-01-DUN — browser tab title includes card name, finish, and set; View Source or devtools shows matching link[rel=canonical] and meta[name=description].

    Deploy steps

    Use the existing Hosting deploy workflow (npm run deploy:hosting or GitHub Actions Front end only deploy). The production build already runs generate-sitemap.js after Vite; no Firebase config change is required because static files in frontend/dist are served before the SPA rewrite.
    <!-- CURSOR_AGENT_PR_BODY_END -->

    <div><a href="https://cursor.com/agents/bc-e38791ae-55a9-5c60-9dbe-6b3e2e5af317?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/background-agent?bcId=bc-e38791ae-55a9-5c60-9dbe-6b3e2e5af317&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

    Diff: 336 lines (+252 / -84) across 4 files Reviewer: chatgpt-codex-connector[bot] Review duration: 6m
    All Vouch review confidence checks passed
    Residual risk 0.29 = Change Risk (0.47) × (1 − Review Confidence (0.38)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 336 lines diff across 4 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 78% · Reviewer familiarity: 35%
    37%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.348
    Shallow Review Depth shallow_review_depth
    0.344
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #242"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 37.6% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.2% (MEDIUM) · Higher = larger blast radius
    47.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 37.6% · Lower = rushed or shallow review
    37.6%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 29.4% · Safe to merge
    29.4%