Skip to content

improvement(seo): list the v2 API as a catalog item and answer markdown 404s - #9088

Merged
waleedlatif1 merged 2 commits into
stagingfrom
improvement/api-catalog-item-markdown-404
Oct 15, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
improvement/api-catalog-item-markdown-404

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • API catalog (/.well-known/api-catalog) now opens with a context anchored at the catalog itself that lists the v2 API as an item (RFC 9727 §3.1, Appendix A.2 shape); the existing service-desc / service-doc / status context is unchanged
  • Unknown pages answer Accept: text/markdown with a Markdown 404 (text/markdown, Vary: Accept, no-store) linking home, docs, llms.txt, and the sitemap
  • Done with a fallback rewrite in next.config.ts gated on the Accept header, so it only runs after every page and dynamic route fails to match: browsers keep the HTML not-found page, real pages and RSC requests are untouched, and /api/* keeps its JSON 404
  • Existing rewrites move to afterFiles, which is what the plain array form already meant

Type of Change

  • Improvement

Testing

  • apps/sim/scripts/test-mcp-host-e2e.ts against a local dev server: 18/18, with new checks for the catalog item context, the Markdown 404 (flat and nested paths), the browser HTML 404, a real page with a Markdown Accept, and /api/* keeping JSON
  • Reverted each fix and watched its checks fail (catalog checks without the item context, Markdown 404 checks without the fallback rewrite)
  • bun run lint, check:source-conventions, check:api-validation:strict, check:comment-hygiene, check:unused-exports, check:file-names

Checklist

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

@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 15, 2026 8:15pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/app/markdown-not-found/route.ts Outdated
Comment thread apps/sim/scripts/test-mcp-host-e2e.ts
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issue was found.

Summary

Adds the v2 API as a catalog item and serves Markdown 404s through a fallback rewrite.

  • The API catalog lists the v2 API as an item.
  • Unknown pages return Markdown 404s to Markdown clients.

Reviews (2) · Last reviewed commit: "fix(seo): keep the HTML 404 for clients ..." · Reviewed by Greptile

Comment thread apps/sim/next.config.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/next.config.ts
@waleedlatif1
waleedlatif1 merged commit 6a9a79d into staging Oct 15, 2026
53 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/api-catalog-item-markdown-404 branch October 15, 2026 22:13

This branch was previously deployed

1 inactive deployment
Preview — 3e2e44c2 Deployed Oct 15, 2026 by vercel[bot]
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