Repository navigation
docs(v2): open the RC site to AI fetchers, and add the AI tools, streaming, AI SDK and durable generation pages - #1654
Merged
Merged
Conversation
On a host other than docs.solidjs.com, robots.txt used to be
`User-agent: * / Disallow: /`, which blocked every crawler and AI fetcher
from the live Solid 2.0 docs, including /llms.txt, /llms-full.txt and the
per-page `.md` form.
The non-production rule now allows everything, and the site is kept out
of search results with an `X-Robots-Tag: noindex` response header set
through a Nitro route rule. The Netlify preset writes route-rule headers
into `_headers`, so prerendered pages served from the CDN carry it too.
The canonical-host rule is unchanged.
Deployed robots.txt on a non-canonical host (for example v2.solidjs.com):
User-agent: *
Allow: /
Sitemap: https://v2.solidjs.com/sitemap.xml
Deployed `_headers` on that host:
/*
X-Robots-Tag: noindex
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ka6h98478umeFadcRV1KLY
A guide that lists every AI-facing asset Solid 2.0 ships and tells the reader what to put in an assistant's instructions file: the installed cheatsheet, the four skills (the solid-2.0 primer, reactivity-diagnostics, agent-loops, server-components), the coded console diagnostics with their repair-guide footer, DEV and OBSERVE, the @solidjs/diagnostics assertions, the /__solid/diagnostics dev endpoint and its methods, the eslint-plugin-solid v2 and v2-strict configs, llms.txt, llms-full.txt and the per-page .md form, and the templates' AGENTS.md. Ends with a paste-ready rules block for AGENTS.md / CLAUDE.md / .cursor/rules: the three rules that matter most, the 1.x names that no longer exist with their replacements (checked against CHEATSHEET.md and MIGRATION.md), and the pointers above. Linked from the Overview page. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ka6h98478umeFadcRV1KLY
A guide that forwards a model's token stream through a "use server"
async generator into a store in the browser:
- the server function reads getRequestEvent()?.request.signal and hands
it to the model call, so a dropped connection stops generation;
- createProjection(async function* (draft) { ... }) commits one store
write per chunk, with seedLoadingValue so the seed is the first render;
- a new question supersedes the read, which closes the previous generator
through return() and aborts its request; an explicit Stop uses
invoke(fn, { signal }, ...args) and catches its own abort;
- an Errored boundary with reset for retry;
- Markdown rendered as completed blocks in a For keyed by id plus one
re-rendered trailing block;
- the cancellation contract, including when not to forward the signal
(a durable job exposes Stop as an action and progress as a live source).
Every API is checked against the solid checkout; the ts/tsx blocks
type-check against built types with scripts/check-examples.mjs.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ka6h98478umeFadcRV1KLY
A recipe for a store-backed ChatState adapter for the AI SDK's AbstractChat (ai 7.x; @ai-sdk/solid is deprecated): status and error in signals, messages in a store, push and pop on the draft, replaceMessage through reconcile so rows keep their identity, and snapshot as structuredClone(snapshot(thing)) because the stream processor keeps mutating the object it hands over. No throttle. A component that renders it with a keyed For, and the API route on the server. The ChatState interface is quoted from packages/ai/src/ui/chat.ts on vercel/ai main; the adapter, the component and the route type-check against ai@7.0.141 and the built Solid 2.0 types. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ka6h98478umeFadcRV1KLY
|
|
✅ Deploy Preview for solid-docs-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
A guide for an AI reply generated as a job that outlives the request: the store, the job registry and the start/stop actions, delivery as data through live(GET(async function*)) into a projection, the optimistic bubble held with until over the live thread's ids, the thread as a live server component (marked experimental), and what a reconnect resumes from (Last-Event-ID, the digest skip, and where a partial-replay log would sit). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ka6h98478umeFadcRV1KLY
One root file is what the assistants read; the per-tool copies are not needed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ka6h98478umeFadcRV1KLY
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.
Before: the release-candidate site serves
User-agent: * / Disallow: /on any host other than docs.solidjs.com, so robots-respecting AI fetchers (and Context7's crawler) refuse v2.solidjs.com, including/llms.txtand/llms-full.txt, and search engines index nothing. There is no page that tells a reader what Solid ships for coding agents, no guide for streaming a model's reply, no recipe for the AI SDK on 2.0 (@ai-sdk/solidis deprecated), and nothing on a generation that must outlive the request that started it.After: the non-canonical host answers
Allow: /with a sitemap, and de-indexing moves to anX-Robots-Tag: noindexheader written by the Netlify preset's_headers, so tools can read the docs while search engines still skip the RC host; the canonical-host rules are unchanged. Four new pages: "Solid for AI tools" (guides; every agent-facing asset with a paste-ready instructions block for AGENTS.md / CLAUDE.md / Cursor rules), "Streaming AI responses" (server functions; a"use server"async generator that forwardsrequest.signal, a projection that commits one write per chunk, stop by superseding the read or byinvoke(fn, { signal }),Erroredwith retry, keyed blocks for markdown, and the cancellation contract stated plainly), "Chat state for the AI SDK" (a store-backedChatStateforai7.x'sAbstractChat, about 60 lines, no throttle), and "Durable generation" (server functions; the reply as a job the server owns, delivered throughlive(GET(async function*))into a projection in the client-owned shape, or as a live server component in the server-owned shape, marked experimental;untilholding optimistic state until the stream confirms; reconnect throughLast-Event-IDand digest skip; where partial replay would come from).How:
vite.config.tsrobots rules plus a Nitro route rule for the header; the pages follow WRITING.md and cross-link the debugging, server-functions and stores pages. The primer skill the AI tools page names (solid-js/skills/solid-2.0/SKILL.md) lands with solidjs/solid#4098; the durable page's reference implementation is thechatexample in solidjs/solid, and every API it names was checked againstnext(live,GET,until, coreaction,createProjection,createOptimisticStore,liveQuery, theLast-Event-IDhandling in the server-functions runtime).Tested: solidbase's
buildRobotsTxtrun against the new config (output in the first commit message); the nine new ts/tsx blocks of the first three pages type-check clean underscripts/check-examples.mjsagainst built 2.0 types (the 62 pre-existing errors on the base are all in router/meta pages with v1 typings); the adapter, component and route blocks also type-check against a realai@7.0.141;lint-tone0 errors; eslint and prettier clean. Fullpnpm buildon the final head prerenders all 204 routes with no errors; the Netlify preview is up.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ka6h98478umeFadcRV1KLY