docs: restructure into a handbook and match the reference to the package - #61
Merged
Merged
Conversation
|
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.
Builds on #60. Base is
feature/docs-portable-demos; GitHub will retarget this tomainwhen #60 merges.Why
Two problems, found by auditing rather than reading.
The reference pages documented an API that doesn't exist. Resolving every documented part, prop and attribute against the package turned up contradictions on four of seven primitive pages — including
message.mdx, which documented seven parts (Markdown,Copy,Action,Source,Attachment,Selection, plus a "structural parts" list) when the namespace exports three. This is the same root cause as #60: the docs described the playground's styled layer as if it were the package.Pages existed because a reference site had them. The Accessibility page had a "Color contrast" section whose content was that the package renders no colour. The Animation page cited
ShimmerPrimitiveand--shimmer-duration, neither of which exist anywhere in the repo.Corrections
message.mdxstickyprop onTurnRoot,Text,Turn;MessageTurnPropsis a barePrimitiveProps<"div">composer.mdxComposer.AskUser*,data-composer-ask-user-*data-ask-user-*thread.mdxThread.ScrollButtonuseThread()reasoning.mdxTrigger.label,Trigger.getThinkingMessageattachments.mdxRoot.show,Item.item,Dropzone.variant,data-media-typevisible,keepMounted,portalSelectorThe Anatomy examples on
attachments.mdxused three of those props, so they would not have compiled.Structure
Seventeen pages down to thirteen. Removed: Releases, Streaming performance, Two layers, Animation, TypeScript, Composer state — each either duplicated a primitive page or asserted nothing. Added: Styling (data attributes, the
className/stylestate callbacks, previously undocumented, and therenderprop), Composition, Accessibility.The group is now
/docs/handbook/*rather than/docs/headless/*, matching its sidebar label.Agent surface
.mdappended to any docs URL now serves that page astext/markdown, the convention agents expect and can guess from a page URL./llms.txtuses it, is linked from the sidebar and from Quick start, and its header carries two operating instructions — how to fetch a page, and that the demos assume Tailwind v4.The gate
scripts/audit-docs.mjsresolves each part's props and state through the TypeScript compiler — not regex, which cannot see multi-line types or inherited props — and fails CI on any contradiction. My first three regex attempts at this both over- and under-reported; the compiler version does not.Verified it fails on a real contradiction, not just passes on a clean tree.
Known gap
@intentface/chat/typesis now undocumented — 16 exports including five part type guards (isTextPart,isToolPart, …). Deliberate call to delete rather than rewrite; worth revisiting.