Agent discoverability and navigation fixes#30
Merged
Tranquil-Flow merged 2 commits intomainfrom Apr 1, 2026
Merged
Conversation
…on path Add `as` prop to Button component so it renders as <span> when wrapped in a Link, fixing the nested interactive elements anti-pattern (<button> inside <a>) that caused headless browser agents to fail navigation on all homepage CTAs. Updated all 17 Link-wrapped Button instances across 6 files. Add a prominent callout on /agents/register directing agents to /api/agent/bootstrap and /llms.txt before the manual form.
Remove Cache-Control from shared CORS_HEADERS constant — caching is not a CORS concern and was causing 404 catch-all responses to be cached for 60s. Each route now sets its own Cache-Control explicitly. Use environment variable for agent-registration meta tag URL so it works in dev/staging. Add PATCH and HEAD handlers to API catch-all route. Document as="span" limitation on Button component. Update tests to match.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<Link><Button>nested<button>inside<a>, causing headless browser agents to fail navigation. Button now supportsas="span"for Link-wrapped usage (17 instances fixed)<link rel="agent-api">,<link rel="agent-card">,<link rel="llms-txt">) in<head>/.well-known/agent-registrationredirect,/agents.jsondiscovery,/api/healthstatus check, and JSON 404 for unmatched API routestext/plainAccept headerContext
An AI agent tested app.ai.self.xyz twice and reported that all 3 homepage registration CTAs failed to navigate. Root cause was nested interactive elements (
<button>inside<a>). Additional feedback drove discoverability improvements for agent crawlers.Test plan
/robots.txtand/sitemap.xmlreturn valid content/agents.jsonreturns discovery JSON/api/healthreturns{"status":"ok"}/.well-known/agent-registrationredirects to/api/agent/bootstrap/api/nonexistentreturns JSON 404 with discovery links/nonexistentshows styled 404 page