docs(site): wrap long table tokens and list host capabilities by group - #490
Conversation
The host capability matrix scrolled up to 709px sideways at 1440px: its per-host 'Plugin components' tables had 154 rows whose Detail column held stringified JSON objects as single tokens, and Rspress's auto table layout widens a column to its longest unbreakable token. - Render each host's plugin components as Rspack-style reference sections: one heading per top-level capability group and one list entry per capability, with anchors and outline navigation instead of a three-column grid. - Emit object-valued details as one `key.member: value` line each. - Add a rehype plugin that inserts <wbr> into long code and link text inside table cells (after ./@,_- and at camelCase boundaries), so the remaining matrices (events, install surface, path tokens) fit the content column. The Markdown source, search index, llms-full.txt, and clipboard keep the plain token.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
…n-dir load check; doctor reads enabled (AB7327) (#475, #476) (#504) * fix(validate,build,doctor): run the Claude host validator and --plugin-dir load check from build and validate; doctor validates installed copies and reads enabled (#475, #476) * test(packed-native): accept other hosts' informational reports in the packed Claude validation document * docs(site): add the missing lineage-detail table header the generated reference plugin renders (#490 follow-up) * chore(changeset): reference #504
Follow-up to the desktop screenshot audit of every docsite page (1,534 routes at 1440×900). The only layout defects were tables scrolling sideways: the host capability matrix up to 709px, the event matrix 152px, and small (~50–70px) overflows on project structure and runtime environment.
Root cause. Rspress tables use
table-layout: auto, so one unbreakable token — a stringified JSON object in a Detail cell, a dotted capability key, a URL — widens its column to the token's full length.overflow-wrap: anywherewas tried first and rejected: it shrinks the columns instead, breaking short identifiers mid-word (TeammateIdl|e) once five columns share the content width.Changes
website/plugins/generated-reference.ts: the per-host "Plugin components" tables (154 rows for Claude) become Rspack-style reference sections —####per top-level group (agents,distributionPolicy, …) with one list entry per capability (`path` **state** — detail). Anchors and the on-page outline replace a three-column grid. Object-valued details render as onekey.member: valueline each.website/plugins/rehype-table-cell-breaks.ts(new, wired viamarkdown.rehypePlugins): inserts<wbr>intocodeand link text inside table cells after./@,_-and at camelCase boundaries, only for tokens ≥16 chars. Render-time only, so the Markdown source, search index,llms-full.txt, and clipboard keep the plain token.@types/hastdev dependency for the plugin's node types.Result (Playwright, 1440×900, every table on the site)
pnpm docs:site:buildpasses (typecheck, dead-link/anchor/image, language parity). No publishable package changes, so no changeset.