Skip to content

fix(website): docs polish 2/3 — breadcrumb, tables, rails, mdx details - #863

Merged
blove merged 1 commit into
mainfrom
blove/docs-polish-2-details
Aug 30, 2026
Merged

fix(website): docs polish 2/3 — breadcrumb, tables, rails, mdx details#863
blove merged 1 commit into
mainfrom
blove/docs-polish-2-details

Conversation

@blove

@blove blove commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

What

PR 2 of 3 of the docs polish arc (plan · findings) — the reading-detail fixes. Every row is a measured defect → measured fix:

defect (measured before) measured after
Breadcrumb separators 16px at top 106 vs links 13px at top 109 one font size (13px), every separator and link at the same top
Props table: agent as ag/en/t in a 49px column, 227px rows, scroller with nothing to scroll (343/343) table floors at 560px, wrapper scrolls (560 in 343), agent renders as one line box; edge fades signal it; tabIndex=0 role=region makes it keyboard-reachable
@threadplane/langgraph split into two backgrounded pills one line box — whole-token wrapping
8px rail mismatch (breadcrumb at 24, H1 at 16, below 640px) all rails at 16
Steps' connector dangling below the final step display:none on :last-child, others untouched
2 dead CSS rule groups (.shiki, code titles — zero matching elements) deleted, with comments for the future

A trap caught mid-implementation

First attempt used overflow-wrap: anywhere for chip wrapping — and the table's agent chip started wrapping as agen/t despite fitting. anywhere also shrinks min-content to one character, so table column sizing squeezed the column below the chip's width. break-word breaks identically at overflow but leaves min-content honest. Documented in the CSS.

Gates

nx test website fully green, 0 lint errors, prod build green. Scope is docs-only (docs.css + 4 docs components/routes) — marketing surfaces untouched by construction.

PR 3 (a11y + interaction: search dialog semantics + mobile entry, tabs keyboard nav, focus rings, touch targets, reduced-motion) follows.

🤖 Generated with Claude Code

…tails

The detail third of the docs polish arc (findings §3, §4, §6-rail, §7, §9).

- Breadcrumb typography moves to the list so the separators inherit it -
  they were siblings of the links and rendered 3px larger and 3px higher on
  the first two crumbs. Measured after: one font size, one baseline.
- Tables get a 560px floor inside .docs-table-scroll so the scroller finally
  scrolls instead of crushing (375px rendered `agent` across three lines in a
  49px column, rows 227px tall). Edge fades signal scrollability; the wrapper
  is tabIndex=0 role=region so keyboard users can reach the clipped columns
  (WCAG 2.1.1). ApiDocRenderer and ApiRefTable tables gain the same wrapper.
- Inline code chips: word-break normal + overflow-wrap break-word - chips
  wrap whole instead of splitting @threadplane/langgraph into two pills.
  break-word, not anywhere: `anywhere` shrinks min-content to one character,
  which let table columns squeeze below chip width and wrap `agent` as agen/t
  (caught by measurement mid-implementation).
- One horizontal rail: header, API block, and prev/next align down to the
  article's padding scale, ending the 8px left-edge mismatch below 640px.
- Steps' dangling connector below the last step is gone (:last-child - the
  selector inline styles could never express).
- The dead .shiki and [data-rehype-pretty-code-title] rules are deleted
  (findings §9: zero matching elements site-wide), with breadcrumb comments
  pointing at what to do if either ever comes back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@blove
blove enabled auto-merge (squash) August 30, 2026 01:39
@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview Aug 30, 2026 1:44am

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit c52c083 into main Aug 30, 2026
27 checks passed
blove added a commit that referenced this pull request Sep 1, 2026
PR #863 deleted the global `.shiki` rules from docs.css on the finding that
zero elements matched. That was true of docs and blog — rehype-pretty-code
writes its background inline and never emits a `.shiki` class — but two TSX
call sites highlight with Shiki's `codeToHtml` directly, which does:

  - components/landing/HighlightedCode.tsx  (homepage Code tabs, /langgraph,
    /render, /chat)
  - components/solutions/SolutionCodeBlock.tsx  (every /solutions/* page)

Those <pre> elements lost their padding. The dark theme background rides
inline on the <pre>, while the landing override put its 16px 20px on the
wrapper <div> (which carries `shiki` too) — outside the dark box. The result
was a light gutter with the code flush against the dark edges.

Restores the padding as a `pre.shiki` base rule in global.css, and moves the
landing override's padding off the wrapper onto `> pre.shiki`. The selector is
pre-scoped deliberately: both call sites also put the class on a wrapper div,
where padding lands outside the surface. SolutionCodeBlock's comment claimed
Shiki emits its own padding — that wrong premise is what made the deletion
look safe, so it is corrected too.

Guarded by HighlightedCode.spec.tsx, which asserts the markup that needs the
rule and the rule's presence together; either half alone passes vacuously.
Mutation-tested by stripping the padding declaration.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blove added a commit that referenced this pull request Sep 1, 2026
PR #863 deleted the global `.shiki` rules from docs.css on the finding that
zero elements matched. That was true of docs and blog — rehype-pretty-code
writes its background inline and never emits a `.shiki` class — but two TSX
call sites highlight with Shiki's `codeToHtml` directly, which does:

  - components/landing/HighlightedCode.tsx  (homepage Code tabs, /langgraph,
    /render, /chat)
  - components/solutions/SolutionCodeBlock.tsx  (every /solutions/* page)

Those <pre> elements lost their padding. The dark theme background rides
inline on the <pre>, while the landing override put its 16px 20px on the
wrapper <div> (which carries `shiki` too) — outside the dark box. The result
was a light gutter with the code flush against the dark edges.

Restores the padding as a `pre.shiki` base rule in global.css, and moves the
landing override's padding off the wrapper onto `> pre.shiki`. The selector is
pre-scoped deliberately: both call sites also put the class on a wrapper div,
where padding lands outside the surface. SolutionCodeBlock's comment claimed
Shiki emits its own padding — that wrong premise is what made the deletion
look safe, so it is corrected too.

Guarded in two halves, since neither is sufficient alone. The CSS half is a
style contract (#926's registry — this is precisely the "comment explaining
why a declaration must not be removed" that it asks for), mutation-tested by
deleting the declaration and by renaming the selector. The markup half lives
in HighlightedCode.spec.tsx: that Shiki still emits a `pre.shiki` carrying an
inline background and no padding of its own, so the contract keeps guarding a
rule something actually matches.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blove added a commit that referenced this pull request Sep 1, 2026
PR #863 deleted the global `.shiki` rules from docs.css on the finding that
zero elements matched. That was true of docs and blog — rehype-pretty-code
writes its background inline and never emits a `.shiki` class — but two TSX
call sites highlight with Shiki's `codeToHtml` directly, which does:

  - components/landing/HighlightedCode.tsx  (homepage Code tabs, /langgraph,
    /render, /chat)
  - components/solutions/SolutionCodeBlock.tsx  (every /solutions/* page)

Those <pre> elements lost their padding. The dark theme background rides
inline on the <pre>, while the landing override put its 16px 20px on the
wrapper <div> (which carries `shiki` too) — outside the dark box. The result
was a light gutter with the code flush against the dark edges.

Restores the padding as a `pre.shiki` base rule in global.css, and moves the
landing override's padding off the wrapper onto `> pre.shiki`. The selector is
pre-scoped deliberately: both call sites also put the class on a wrapper div,
where padding lands outside the surface. SolutionCodeBlock's comment claimed
Shiki emits its own padding — that wrong premise is what made the deletion
look safe, so it is corrected too.

Guarded in two halves, since neither is sufficient alone. The CSS half is a
style contract (#926's registry — this is precisely the "comment explaining
why a declaration must not be removed" that it asks for), mutation-tested by
deleting the declaration and by renaming the selector. The markup half lives
in HighlightedCode.spec.tsx: that Shiki still emits a `pre.shiki` carrying an
inline background and no padding of its own, so the contract keeps guarding a
rule something actually matches.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@blove
blove deleted the blove/docs-polish-2-details branch September 3, 2026 22:30
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