Skip to content

feat(landing): added models pages#3888

Merged
waleedlatif1 merged 5 commits intostagingfrom
feat/models-page
Apr 2, 2026
Merged

feat(landing): added models pages#3888
waleedlatif1 merged 5 commits intostagingfrom
feat/models-page

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • added models pages showcasing the metadata that we already capture for these models

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 1, 2026

PR Summary

Medium Risk
Adds a sizable new set of statically-generated /models routes plus sitemap entries and Edge OpenGraph image generation, which could impact build time, routing collisions, and SEO metadata correctness. Changes are mostly additive UI/SEO with no auth or sensitive data handling.

Overview
Adds a new landing Models section: a searchable /models directory plus statically-generated provider pages (/models/[provider]) and per-model pages (/models/[provider]/[model]) that surface pricing, context windows, and capability metadata.

Introduces shared UI primitives (ModelCard, ProviderCard, stats/details, breadcrumbs) and a reusable LandingFAQ component (also used to refactor the integrations FAQ).

Adds Edge OpenGraph image routes for the directory, providers, and models, and expands sitemap.ts to include /models plus all generated provider/model URLs (with model lastModified driven by pricing updates). Also links the new directory from the global footer.

Written by Cursor Bugbot for commit f6e882c. Configure here.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 2, 2026 1:16am

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 1, 2026

Greptile Summary

This PR introduces a full public AI Models Directory for the Sim landing site — a three-level hierarchy of pages (/models, /models/[provider], /models/[provider]/[model]) generated statically from the existing internal provider registry. It also extracts the FAQ accordion into a shared LandingFAQ component (reused by both the new pages and the existing integrations pages), adds every new route to the sitemap, and wires up per-level Open Graph images running on the edge runtime.

Key changes:

  • utils.ts computes the full catalog (display names, slugs, pricing bounds, capability tags, summaries, FAQs) at module initialisation time and exports typed constants used across all new pages. A startup-time assertUniqueGeneratedRoutes guard prevents slug collisions.
  • getPricingBounds correctly includes cachedInput in the lowPrice calculation (prior review concern is resolved).
  • Three levels of JSON-LD structured data (BreadcrumbList, Product/ItemList, FAQPage) are emitted on each page for SEO.
  • LandingFAQ replaces the duplicated accordion logic in IntegrationFAQ — clean refactor with no regressions.
  • Sitemap is extended with all provider and model URLs, using model.pricing.updatedAt as the per-model lastModified.

Findings:

  • The top-level itemListJsonLd on models/page.tsx embeds every tracked model inline — this can produce a large HTML payload and may be worth capping or splitting.
  • normalizedQuery is derived outside of useMemo in model-directory.tsx (minor style nit).
  • loadGoogleFont uses .match() which only captures the first font source URL; using .matchAll() with an explicit preference for woff2 would be more robust.

Confidence Score: 5/5

  • Safe to merge — all findings are P2 style or performance suggestions with no correctness or runtime impact.
  • All remaining comments are P2: the inline ItemList JSON-LD size is a page-weight concern not a bug, the normalizedQuery placement is a style nit, and the font regex is a robustness improvement. The previous P1 (cachedInput excluded from lowPrice) has been correctly fixed. The core catalog-generation logic, slug collision guard, structured data emission, and FAQ refactoring are all correct and well-implemented.
  • apps/sim/app/(landing)/models/page.tsx — the inline itemListJsonLd with all models is the only item worth a second look before merging.

Important Files Changed

Filename Overview
apps/sim/app/(landing)/models/utils.ts 790-line utility module that computes the full model catalog at module load time from PROVIDER_DEFINITIONS. Includes slug generation, display name formatting, pricing bound helpers, FAQ builders, and a startup-time duplicate-route assertion. Clean, well-structured, and the getPricingBounds correctly includes cachedInput in the low-price calculation.
apps/sim/app/(landing)/models/page.tsx Top-level models directory page. Embeds an ItemList JSON-LD blob that includes every tracked model inline in the HTML, which can produce a very large payload.
apps/sim/app/(landing)/models/components/model-directory.tsx Client-side searchable/filterable model directory with provider grouping. The normalizedQuery string is computed on every render outside useMemo, creating a minor redundancy in the dependency tracking.
apps/sim/app/(landing)/models/og-utils.tsx Edge-runtime OG image generator. Fetches Geist font from Google Fonts at request time and renders a consistent branded card. Font loading gracefully degrades to null on failure.
apps/sim/app/(landing)/models/[provider]/[model]/page.tsx Individual model detail page with BreadcrumbList, Product, and FAQPage structured data. Correctly uses getPricingBounds which includes cachedInput in lowPrice.
apps/sim/app/(landing)/models/[provider]/page.tsx Provider hub page with BreadcrumbList, ItemList, and FAQPage JSON-LD. Lists all provider models and renders related provider cards for cross-navigation.
apps/sim/app/(landing)/components/landing-faq.tsx New shared accordion FAQ component extracted from the former IntegrationFAQ. Clean refactoring — the old component now delegates to this one.
apps/sim/app/(landing)/integrations/[slug]/components/integration-faq.tsx Simplified to a thin wrapper that delegates to LandingFAQ. FAQItem is structurally compatible with LandingFAQItem since both have question: string and answer: string.
apps/sim/app/sitemap.ts Sitemap extended to include all provider and model pages. Model pages correctly use model.pricing.updatedAt as lastModified, which gives search engines accurate freshness signals.
apps/sim/app/(landing)/models/layout.tsx Layout for all model routes. Injects Organization and WebSite JSON-LD at the layout level, shared Navbar and Footer, dark theme applied via className.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[utils.ts module load] --> B[PROVIDER_DEFINITIONS]
    B --> C[Build rawProviders slug + display name + pricing]
    C --> D[assertUniqueGeneratedRoutes throws on collision]
    D --> E[Export catalog constants ALL_CATALOG_MODELS etc]

    E --> F[models page.tsx Directory index]
    E --> G[models provider page.tsx Provider hub]
    E --> H[models provider model page.tsx Model detail]
    E --> I[sitemap.ts All model + provider URLs]

    F --> J[ModelDirectory client search and filter]
    F --> K[BreadcrumbList JSON-LD]
    F --> L[ItemList JSON-LD ALL models embedded]

    G --> M[BreadcrumbList + ItemList + FAQPage JSON-LD]
    G --> N[LandingFAQ buildProviderFaqs]

    H --> O[BreadcrumbList + Product + FAQPage JSON-LD]
    H --> P[LandingFAQ buildModelFaqs]

    F --> Q[opengraph-image edge runtime OG card]
    G --> Q
    H --> Q
Loading

Reviews (4): Last reviewed commit: "fix(models): remove dead og-utils export..." | Re-trigger Greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Correct model structured-data price bounds, remove dead code in the models catalog helpers, and harden OG font loading with graceful fallbacks.

Made-with: Cursor
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@waleedlatif1 waleedlatif1 merged commit 2c174ca into staging Apr 2, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/models-page branch April 2, 2026 01:23
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.

1 participant