Skip to content

feat(website): docs site generated from docs/guide, deployed to GitHub Pages (OB12) - #156

Merged
lg2m merged 6 commits into
mainfrom
feat/eng-896-docs-website
Sep 24, 2026
Merged

lg2m merged 6 commits into
mainfrom
feat/eng-896-docs-website

Conversation

@lg2m

@lg2m lg2m commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Plan slice OB12 of docs/plans/onboarding-ux.md. Linear: ENG-896. Supersedes OB11 (wiki mirror).

What ships

The v0-designed Astro 5 + Starlight site, under website/, deployed to https://retsu-ai.github.io/qq/ (Pages is enabled with source = GitHub Actions; the first deploy happens when this merges).

  • Landing page: hero with the install tabs and a terminal mock; sections for the three surfaces, approval verdicts, sessions, providers. Every claim was checked against docs/guide/ (Alt-A/Alt-D, verdict examples, NEEDS YOU/WORKING/IDLE/DONE, 12% ctx $0.04, SQLite, Windows, MIT). The fake — star count is gone.
  • Docs: the 11 guides, in four sidebar groups, with search (Pagefind), an outline, light/dark, and an "Edit page" link to the guide file on GitHub.
  • /install.sh: the reviewed installer, so curl -fsSL https://retsu-ai.github.io/qq/install.sh | sh is real. README and the install guide now use that URL.

Single source of truth

Nothing under website/ holds guide text. scripts/sync-docs.mjs runs before every build and:

  • generates src/content/docs/docs/<name>.md from docs/guide/<name>.md (README.md → the /docs/ index; title from the H1; description from sidebar.json; editUrl back to the guide);
  • rewrites relative links — siblings become relative routes (base-independent), anything leaving docs/guide/ (design notes, runbooks) points at GitHub;
  • copies install.sh to public/, records the workspace version from Cargo.toml;
  • fails on a guide with no sidebar entry, a sidebar entry with no guide, or a link to a missing guide.

Generated files are gitignored. scripts/check-links.mjs walks dist/ after the build and fails on any unresolved internal href or #fragment — 447 checked today, so renaming a heading another page links to breaks the build until the link follows.

Decisions

  • GitHub Pages over Vercel/custom domain (per discussion): no new account or secret; PR previews aren't needed for docs; moving to a domain is two lines in site.config.mjs plus public/CNAME (runbook has the steps).
  • Dropped the 8 stub routes v0 had generated without a guide behind them (agents, sessions, skills, environment, keybindings, protocol, enterprise, changelog). The two landing links that pointed at them now go to tui#sessions and headless#qq-serve. Those topics are candidate guides, not site work.
  • Removed from the v0 output: dist/, .astro/, the Vite plugin that patched Starlight's print.css import for the v0 preview proxy, the root pnpm-workspace wrapper (the site is one package now), the fixed lastUpdated date default, and two unused components (StatusPill, ErrorCard).
  • No client framework, analytics, or third-party scripts. Fonts are self-hosted.

The landing mocks are the real TUI

The v0 mocks were a generic terminal window (title-bar dots, a shell prompt typing qq, a rounded approval card, a two-panel session "board"). They now reproduce the frame from crates/qq-tui/tests/goldens and docs/guide/tui.md § Layout:

  • top row qq my-project › add dry-run … anthropic/claude-sonnet-5 12% ctx $0.04
  • ▌ YOU / QQ message headers on the sky rail; tool rows in the TUI's columns (glyph · verb · argument · detail · elapsed)
  • an awaiting ◇ Edit expanded inline to ◇ approval needed, the path, the @@ hunk with line numbers, and y once a session w workspace n deny
  • the rule ◐ preparing tool call 6.2s ttft 0.8s turn 1 ──── ? help ^K commands ^O detail and the ✎ Answer the approval above / › Ask QQ... composer
  • the sessions mock is the real 27-column sidebar (NEEDS YOU / WORKING / IDLE / DONE, children indented, 1 new, truncated status lines) beside a transcript with its related sessions ↳ cell

Glyphs and colors follow view/tools.rs and view/sidebar.rs (● muted done, ◐ sky running — cycling ◐◓◑◒ like TOOL_SPINNER, off under reduced motion — ◇ gold awaiting, ○ idle, ✕ rose failed). Verified by measuring the DOM through CDP: every row is one line-height, columns align across rows, nothing clips at 1400px or 420px.

Toolchain: nub, no Nix in CI

Install and build with nub (nub ci, nub run build), which is already in the Nix dev shell and reads the pnpm-format lockfile and pnpm-workspace.yaml (the esbuild/sharp build-script allow-list) as they are. CI uses nubjs/setup-nub — a ~1s archive install that provisions the Node pinned in package.json engines and caches the store — so the job takes ~30s with no Nix evaluation. tsconfig.json inlines Astro's strict preset because nub 0.9.3 mis-resolves extends through package exports wildcards (nubjs/nub#804, fixed upstream, not yet released); one comment marks it for reverting.

CI / deploy

.github/workflows/website.yml: build on every PR touching website/**, docs/guide/**, install.sh, or Cargo.toml; deploy (via actions/deploy-pages, github-pages environment) only on push to main or manual dispatch.

Docs

website/README.md (maintainer doc), docs/runbooks/website.md (change/add a page, build, deploy, custom domain), docs/README.md, AGENTS.md repository map, docs/guide/install.md + README.md (site URL), plan and ledger (OB12 in review, OB11 superseded, OB5/8/9 → Shipped).

Verification

  • nub ci && nub run build — sync 12 pages, astro check 0 errors, 14 pages built, 13 indexed, 447 links resolve
  • nub run preview: /qq/, /qq/docs/…, /qq/install.sh, /qq/pagefind/pagefind.js, sitemap → 200; /qq/nope/ → 404; landing shows v0.1.4 and the site install URL
  • nix flake check --no-build, bash tests/install_sh.sh
  • No Rust changes.

Follow-ups

  • OB10 (docs-truth test) now also protects the site: a CLI flag or config key missing from the guide is missing from the site.
  • The eight dropped topics as future guides.
  • Lighthouse on the deployed site once live (v0 targeted ≥95; not measured locally).
  • Revert the inlined tsconfig to extends: "astro/tsconfigs/strict" once a nub release carries the #804 fix.
  • I could not view screenshots while working on this (no image input); the mocks were verified structurally. Worth one look at nub run preview for type size and light-mode contrast before merging.

…b Pages (OB12)

An Astro 5 + Starlight site under website/: a landing page and the user
guide at https://retsu-ai.github.io/qq/. The documentation pages are not
copied; scripts/sync-docs.mjs generates them from docs/guide/*.md before
each build (title from the H1, description from sidebar.json, editUrl back
to the guide, sibling links rewritten to routes, links leaving docs/guide
pointed at GitHub) and fails when the guide and the sidebar disagree. It
also serves the reviewed install.sh so the landing page's one-line install
is real, and reads the workspace version from Cargo.toml.
scripts/check-links.mjs fails the build on any unresolved internal link or
fragment.

The eight v0 routes without a guide are dropped rather than shipped as
stubs; landing claims were checked against the guide; the placeholder star
count is removed. .github/workflows/website.yml builds on PRs touching the
site, the guide, install.sh, or Cargo.toml and deploys from main. The Nix
shell gains pnpm. OB11 (wiki mirror) is superseded.

Closes ENG-896.
@lg2m
lg2m force-pushed the feat/eng-896-docs-website branch from ec73699 to cd9e760 Compare September 24, 2026 06:06
nub reads the pnpm-format lockfile and pnpm-workspace.yaml unchanged and is
already in the Nix dev shell. CI uses nubjs/setup-nub (a one-second archive
install that provisions the Node pinned in package.json engines and caches
the store) rather than Nix, so the site job stays fast.
nub 0.9.3 refuses to run lifecycle scripts when the project tsconfig
extends a preset reached through a package exports wildcard
(nubjs/nub#804, fixed upstream after 0.9.3), which failed esbuild's
postinstall in CI. The preset's options are inlined until a release
carries the fix.
The hero and sessions mocks were a generic "terminal window" (title-bar
dots, a shell prompt typing `qq`, rounded approval card, a two-panel
session board). They now reproduce the real frame from
crates/qq-tui/tests/goldens and docs/guide/tui.md § Layout: the top row
(`qq  workspace › session … model  12% ctx  $0.04`), `▌ YOU` / `QQ`
message headers, tool rows in the TUI's columns (glyph, verb, argument,
detail, elapsed), an awaiting `◇ Edit` expanded to its `◇ approval needed`
header, path, hunk with line numbers, and the `y once  a session  w
workspace  n deny` key line, the rule (`◐ activity  elapsed  ttft  turn
──── ? help  ^K commands  ^O detail`), and the `✎ Answer the approval
above` / `› Ask QQ...` composer. The sessions mock is the real right-hand
sidebar (NEEDS YOU / WORKING / IDLE / DONE, children indented, `N new`,
truncated status lines) beside a transcript with its `related sessions`
cell. Glyphs and colors follow view/tools.rs and view/sidebar.rs; the
spinner cycles ◐◓◑◒ like TOOL_SPINNER and stops under reduced motion.

Copy fixes against the guide: config layering order, `qq serve` default
port, endpoint compatibility. Removes the unused ApprovalPrompt component.
Landing copy now says what the guide says and no more: the hero names the
durable event log and its consequences (sessions survive restarts, many
agents at once); the approval section explains once / session / workspace
grants and that nothing overrides `forbidden`; the verdict table header
names `auto` as the TUI default and uses the TUI's `✕`; surfaces name
`qq run`'s read-only default and exit codes; providers explain that config
holds names, never secrets. The landing and 404 pages opt out of edit
links (every generated page carries its own into docs/guide), the 404 is
excluded from search, and the sessions mock's two QQ lines no longer
repeat each other. docs/README.md and AGENTS.md point at the site.
@lg2m
lg2m merged commit b406882 into main Sep 24, 2026
6 checks passed
@lg2m
lg2m deleted the feat/eng-896-docs-website branch September 24, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant