refactor(landing): DRY page metadata via buildLandingMetadata + derive pricing credits#5299
Conversation
…t cells - Add lib/landing/seo.ts buildLandingMetadata(), the single source of truth for the shared landing OpenGraph/Twitter/robots/canonical chrome; migrate 13 static landing pages to it (drop ~470 lines of duplicated literals). Output is identical per page (verified: rendered head tags unchanged, render mode unchanged); partners additionally gains the standard authors/creator/publisher it was missing. - Drop the now-dead PAGE_URL const + SITE_URL import from the 12 migrated pages that no longer reference them (partners keeps both for its JSON-LD). - comparison-data.ts: derive monthly/daily credit cells from CREDIT_TIERS, DEFAULT_FREE_CREDITS, DAILY_REFRESH_RATE and a new CREDITS_PER_DOLLAR constant instead of hardcoding, so they can't drift (values byte-identical).
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Separately, the workspace upgrade comparison table no longer hardcodes monthly credits and daily refresh strings—it derives them from Reviewed by Cursor Bugbot for commit 6fa6703. Configure here. |
Greptile SummaryThis PR reduces duplicated landing metadata and derives pricing credits from shared billing constants.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "refactor(billing): bind comparison colum..." | Re-trigger Greptile |
Look up Pro/Max tiers by name instead of array position so the comparison table can't silently bind to the wrong tier if CREDIT_TIERS is reordered or a tier is inserted (addresses Greptile P2). Values unchanged.
|
@greptile review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6fa6703. Configure here.
Summary
Two DRY follow-ups on the landing surface (after #5181 / #5298). Quality-only — no behavior, SEO, or render-mode change (verified empirically below).
buildLandingMetadatahelper (DRY ~470 duplicated lines)apps/sim/lib/landing/seo.ts— single source of truth for the shared landing OpenGraph / Twitter / robots / canonical chrome (mirrors the existingbuildPostMetadatainlib/blog/seo.ts).PAGE_URL/SITE_URLfrom the 12 pages that no longer reference them (partners keeps them for its JSON-LD).partnersadditionally gains the standardauthors/creator/publisherit was previously missing (a normalization).(landing)/page.tsx, extraformatDetection/classification/referrerfields), integrations/models (resolve their card from siblingopengraph-image), and the blog family (buildPostMetadata).Pricing comparison data derived from billing constants
comparison-table/comparison-data.tsnow derives the Monthly-credits and Daily-refresh cells fromCREDIT_TIERS,DEFAULT_FREE_CREDITS,DAILY_REFRESH_RATE, and a newCREDITS_PER_DOLLARconstant instead of hardcoding6,000 / 25,000 / +50 / +200— so they can't drift from billing. Values are byte-identical.Testing
tsc --noEmit— 0 errors;biome check— clean (16 files)next build— compiled successfully, 712 pages, 0 errorsƒ Dynamicrender mode (unchanged vs baseline), and the rendered<head>OpenGraph/Twitter/canonical/alt tags are unchanged (curled the built server)Type of Change