Add an in-app docs section - #15
Merged
Merged
Conversation
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.
Adds a Docs surface to the local web UI: five tabs explaining how valcore works, reachable without leaving the app.
What lands
Docsin the sidebar, directly under Overview as the second ungrouped entry — it is what you read before you have anything to author or measure./docs/:slug, driven by one registry: Keys, Evals, Datasets, Runs, CLI.runvs.experiment,--min-accuracyrunflags, which command group to reach for,--dbDesign decisions
The spec lives at
docs/superpowers/specs/2026-08-11-web-docs-section-design.md(untracked —docs/superpowers/*is gitignored).ui.tsxcommits to no component library; a markdown parser dependency for static prose would violate that. TSX also lets docs link straight into live pages.SECTIONSarray inLayout.tsx./docsand unknown slugs resolve in-component, not by redirect: a stale link degrades to the first tab with its URL intact and no history entry spent./docslands on — nothing that calls a model runs until the gateway key exists. Reordering is one line in the registry; the tests assert againstDOCS[0], not a hardcoded title.Bug caught during review
The first implementation used
NavLinkfor the tabs, which derives active state by matching the URL. On the bare/docsroute — and on any unknown slug — the first tab's body rendered under an entirely unlit tab strip, because/docs/keysdoes not match/docs. Tests passed, because they only asserted active state on a slug route; a screenshot caught it. Fixed by deriving the selected tab from the resolved entry (the tab whose body renders is the selected one), with two regression tests for the fallback paths.Testing
registry.test.tsx(order, unique slugs,resolveDocfallbacks, every body smoke-renders),primitives.test.tsx(clipboard copy, external link target/rel, heading level),DocsPage.test.tsx(tab strip, slug selection, fallbacks, single h1), andApp.test.tsxfor the route table.Layout.test.tsxasserted exactly five nav links and now asserts six plus their full order;icons.test.tsxis table-driven over every icon, soDocsIconjoins the table and satisfies all eight shared assertions.styles.test.tsneeded no edit — it reads every component from disk and fails on any class rendered but not defined, which is what forced thedocs-*family to be complete.586 tests passing across 43 files (up from 579 on main).
tsc --noEmitclean, Vite build succeeds, and both/docsand/docs/cliwere rendered in headless Chrome to confirm the dark-theme styling.httpx,pydantic, andvalcoreitself are missing, and this sandbox has no network to sync it. This diff contains no Python, so nothing in it can affect that suite, but it is unverified here rather than verified-passing. CI will be the real check.🤖 Generated with Claude Code