Skip to content

feat(seo): add robots.ts allowing all crawlers + AI bots (#233)#290

Merged
bntvllnt merged 1 commit into
mainfrom
feat/233-robots-allow-ai
May 10, 2026
Merged

feat(seo): add robots.ts allowing all crawlers + AI bots (#233)#290
bntvllnt merged 1 commit into
mainfrom
feat/233-robots-allow-ai

Conversation

@bntvllnt
Copy link
Copy Markdown
Collaborator

Summary

Adds apps/registry/app/robots.ts so crawlers get explicit directives instead of the empty default.

  • User-agent: *allow: /
  • Explicit allow for 11 AI crawlers: GPTBot, ClaudeBot, Claude-Web, anthropic-ai, PerplexityBot, Google-Extended, Applebot-Extended, CCBot, Bytespider, Amazonbot, cohere-ai.
  • sitemaphttps://ui.vllnt.ai/sitemap.xml (companion seo: add app/sitemap.ts enumerating routes + 225 component pages #234, in flight).
  • host pinned to canonical URL.
  • NEXT_PUBLIC_SITE_URL respected so preview deploys emit the right host.

Why explicit AI allows?

Per locked decision in epic #252, AI crawlers are allowed. Naming them explicitly:

  • Surfaces intent to anyone reading the file.
  • Future-proofs against bots changing their compliance to the wildcard rule.
  • Gives us a single audit point if we later want to disallow one.

Validation

  • TypeScript types come from next (MetadataRoute.Robots).
  • File is a Next.js metadata route — built into the framework, no extra deps.

Test plan

Closes #233

@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

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

Project Deployment Actions Updated (UTC)
storybook Ready Ready Preview, Comment May 10, 2026 1:59pm
ui.vllnt.ai Ready Ready Preview, Comment May 10, 2026 1:59pm

Request Review

bntvllnt added a commit that referenced this pull request May 10, 2026
## Problem
PR #288 (the #266 a11y fix) added \`aria-controls\`, \`aria-haspopup\`,
and a \`React.useId()\` hook to the combobox. Those additions pushed the
\`forwardRef\` arrow function from 70 → 71 lines, tripping the project's
\`max-lines-per-function\` rule (limit 70). Every PR branched from main
after #288 inherits the lint failure on \`Quality Gates → Lint\` —
currently blocking #290 (#233 robots) and #291 (#234 sitemap).

## Fix
Extract the \`<PopoverContent>\` + \`<Command>\` + \`<CommandList>\` JSX
into a local \`ComboboxListPanel\` component. Pure structural refactor —
no runtime behavior change. Both consumers (\`packages/ui\` source and
\`apps/registry/registry/default\` copy) kept aligned per #266 / #269.

| Metric | Before | After |
|---|---|---|
| forwardRef arrow body | 71 lines | **52 lines** |
| Block including signature + closing | 73 lines | 62 lines |

## Validation
- Refactor preserves all ARIA attributes, refs, and event wiring.
- Both files stay byte-identical in semantic structure.
- Local \`wc -l\`: forwardRef block now 62 lines.

## Test plan
- [ ] CI \`Quality Gates → Lint\` passes on this PR.
- [ ] After merge, #290 and #291 re-run and lint passes.
- [ ] Combobox visual stories unchanged.

Refs #266

Co-authored-by: bntvllnt <bntvllnt@users.noreply.github.com>
Next.js MetadataRoute.Robots emitted from app/robots.ts so crawlers
get explicit directives instead of an empty default.

- User-agent: * → allow /
- Explicit allow for AI crawlers: GPTBot, ClaudeBot, Claude-Web,
  anthropic-ai, PerplexityBot, Google-Extended, Applebot-Extended,
  CCBot, Bytespider, Amazonbot, cohere-ai
- sitemap → https://ui.vllnt.ai/sitemap.xml (sitemap.ts shipped in
  parallel under #234)
- host pinned to canonical site URL

Site URL respects NEXT_PUBLIC_SITE_URL when set so preview deploys
emit the right host.

Closes #233
@bntvllnt bntvllnt force-pushed the feat/233-robots-allow-ai branch from 823f9d1 to a1a4642 Compare May 10, 2026 13:57
@bntvllnt bntvllnt merged commit 4733000 into main May 10, 2026
5 of 6 checks passed
@bntvllnt bntvllnt deleted the feat/233-robots-allow-ai branch May 10, 2026 13:59
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.

seo: add app/robots.ts with AI crawler allowlist + sitemap link

1 participant