feat(cro): keyless first-call docs block + deep-linkable playground try-buttons - #96
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Registry empty list enables auto-run
- init() now sets demoRegistryLoaded only when the registry response contains a non-empty tools array, so empty ok:true payloads use the fallback path with preselect-only behavior and no auto-run.
You can send follow-ups to the cloud agent here.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c602408. Configure here.
| if (demoRegistryLoaded) { | ||
| switchMode('demo'); | ||
| runDemo(); | ||
| } |
There was a problem hiding this comment.
Registry empty list enables auto-run
Low Severity
When /api/v1/x402/playground/tools returns ok: true with an empty tools array, demoRegistryLoaded stays true after the pricing fallback repopulates allTools. Deep links then auto-run the keyless demo even though the allowlist fetch did not actually supply tools—the case the PR treats like registry failure (preselect only, no auto-run).
Reviewed by Cursor Bugbot for commit c602408. Configure here.
…ry-buttons Proof before account — let visitors run something real before signup: - docs.html: new top-of-docs "First call in 10 seconds — no key" section with a copy-paste curl to the keyless demo endpoint (GET /api/v1/x402/playground/demo?tool=generate-hash — verified 200 keyless live) and its real (abridged) JSON response, plus the 25-free-credits signup line. Sidebar link added. - playground.html: ?tool=<name> deep-link parsing — preselects the tool in all modes (browse highlight, live JSON body, snippets) and, only when the tool came from the keyless demo registry (/api/v1/x402/playground/tools = the auto-run allowlist), switches to Demo Mode and auto-runs the simulated flow (free GET, no payment). Raw query value is never injected into the DOM. Registry-down fallback preselects without auto-running. - 8 SEO landers (mcp-server, x402, ai-agent-tools, mcp-tools-for-claude, web-data-tools, crypto-tools, ai-media-tools, utility-tools): hero "Try it live — no key" button -> /playground?tool=<relevant-tool>. - docs tool sections: all 60 existing try-buttons relabeled "Try it live — no key" (hrefs already /playground?tool=<name>; the deep link now makes them functional). Verification: every linked tool (60 docs + 8 lander picks) returns 200 keyless from the live demo endpoint; playground script node --check clean; deep-link behavior simulated in Node against the live registry payload (auto-run fires once for allowlisted tools, never for unknown or hostile ?tool= values); tag-balance check on all 10 edited pages; pages tests 31/31 green. No src touched — static pages only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0e6b778 to
829d14f
Compare


Plays #23 + #24 — proof before account
Let visitors run something real in 10 seconds, before they have an account.
#23 — Keyless first-call curl block (docs)
GET https://archtools.dev/api/v1/x402/playground/demo?tool=generate-hashreturns 200 with no key (simulated x402 flow,demo: true, nothing charged). Route:api/src/routes/playground.ts, mounted public/no-auth inapi/src/index.ts.#24 — Deep-linkable playground
playground.htmlnow parses?tool=<name>:/api/v1/x402/playground/tools— the allowlist). Running the demo is a free GET — no key, no wallet, no payment, no purchase (council checkout-from-GET constraint untouched: no checkout anywhere near this path).mcp-server,x402,ai-agent-tools,mcp-tools-for-claude,web-data-tools,crypto-tools,ai-media-tools,utility-tools): hero "Try it live — no key" button →/playground?tool=<relevant tool>(web-search, generate-hash, web-search, summarize, web-scrape, crypto-price, ai-generate, qr-code)./playground?tool=<name>buttons (previously inert); relabeled to "Try it live — no key" — the deep link now makes every one of them functional. All 60 docs tools are in the live demo allowlist, so none needed a plain fallback link.Verification
ok/toolfields (0 failures).node --checkclean; deep-link behavior simulated in Node with DOM stubs against the live registry payload — allowlisted tool fires exactly one demo fetch and preselects everywhere; unknown/hostile?tool=fires zero and keeps defaults; registry-down fallback preselects without auto-run.node api/tests/pages.test.js→ 31/31 green.api/srcchanges — static pages only, so no build required. No sitemap change (no new pages).🤖 Generated with Claude Code
Note
Low Risk
Static documentation and playground UI copy/JS only; no backend, auth, or payment logic changes.
Overview
This PR pushes proof before signup: visitors can try Arch Tools without an API key from docs, landers, and the playground.
Docs adds a "First call in 10 seconds — no key" section (sidebar link under Getting Started) with a copy-paste
curlto/api/v1/x402/playground/demo?tool=generate-hashand sample JSON for the simulated x402 flow, plus a link to the playground and signup.Playground now honors
?tool=<name>: it preselects the tool across browse, live, demo, and snippet modes. When the tool list came from the keyless demo registry, it also switches to Demo Mode and auto-runs the free simulated demo; unknown?tool=values are ignored (no DOM injection from the query string).Marketing pages (8 SEO landers) get a hero "Try it live — no key" button pointing at
/playground?tool=…with a category-relevant default tool. Docs renames every per-tool "Try It Free" button to "Try it live — no key" so those links use the new deep-link behavior.Static HTML/JS only — no API changes.
Reviewed by Cursor Bugbot for commit c602408. Configure here.