Skip to content

docs: improve gRPC schema table readability - #1842

Merged
samuv merged 5 commits into
mainfrom
t3code/improve-docs-table-readability
Sep 25, 2026
Merged

samuv merged 5 commits into
mainfrom
t3code/improve-docs-table-readability

Conversation

@samuv

@samuv samuv commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Group each RPC, request, and response in one cell so service tables are easier to scan.
  • Render service rows as labeled cards on screens up to 640 px wide, with streaming flags side by side and the description below.
  • Fit the desktop service table to the content width with proportional columns and wrapping for long RPC types.
  • Collapse RPC descriptions only when they exceed three rendered lines, recalculating on resize. Read more expands the text; Read less stays below it.
  • Hide the table of contents on the schema reference page.
  • Regenerate the schema reference from the current protobufs and updated template.
gRPC schema reference desktop preview

Reader need and owner

Readers looking up gRPC method signatures and descriptions use user-docs/reference/grpc-schema.md. The source for the service tables is scripts/grpc-schema.md.tmpl.

Verification

  • task docs:grpc-ref regenerated the page from the template.
  • task site:build passed.
  • At 390 px and 320 px, a browser check found no document overflow. It also confirmed the mobile labels, empty-description collapse, and Read less placement. At desktop width, rows retain their table layout.
  • At 1024, 1280, 1440, and 1920 px, the desktop service table has no horizontal overflow.

samuv and others added 5 commits September 25, 2026 12:22
Co-Authored-By: Codex <codex@openai.com>

Signed-off-by: Samuele Verzi <samu@stacklok.com>
Co-Authored-By: Codex <codex@openai.com>

Signed-off-by: Samuele Verzi <samu@stacklok.com>
Signed-off-by: Samuele Verzi <samu@stacklok.com>
Co-Authored-By: Codex <codex@openai.com>
Signed-off-by: Samuele Verzi <samu@stacklok.com>
Co-Authored-By: Codex <codex@openai.com>
Signed-off-by: Samuele Verzi <samu@stacklok.com>
Co-Authored-By: Codex <codex@openai.com>

@peppescg peppescg 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.

Approving: none of the points below are blocking.

The source change is in scripts/grpc-schema.md.tmpl, and the page was regenerated from it rather than edited by hand. Descriptions still pass through table-safe, which HTML-escapes them, so no markup can reach the MDX JSX. The toggle's ARIA wiring is correct (aria-controls, aria-expanded, and a per-RPC label). The page also degrades well without JavaScript: the full text stays visible.

Optional follow-ups

  1. Descriptions are duplicated in the DOM. GrpcDescription renders each description twice: once in the hidden measure span and once in the visible span. Browser find-in-page skips visibility:hidden text, but @easyops-cn/docusaurus-search-local indexes the built HTML. It probably indexes all ~70 descriptions twice, which would give doubled search hits (not verified on a built site). Measuring the visible span directly, with the clamp temporarily removed, would avoid the second copy.
  2. Layout shifts on hydration. overflows starts false, so the static HTML shows full descriptions and they collapse after mount. On a page of about 4.3k lines, the content shifts visibly on load. This is an acceptable trade-off for no-JS readability; just noting it.
  3. Table semantics on mobile. At 640 px and below, display: block/grid on table, tr and td drops the table roles in several browsers. The grpc-mobile-label spans mostly compensate. Explicit role="table"/role="row" attributes are optional.
  4. Generated-file conflicts. #1891 and #1909 also touch grpc-schema.md. Whichever PR lands later only needs to run task docs:grpc-ref again.

@samuv
samuv merged commit 0e75a77 into main Sep 25, 2026
36 checks passed
@samuv
samuv deleted the t3code/improve-docs-table-readability branch September 25, 2026 12:58
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Sep 25, 2026
2 tasks
jbeda added a commit that referenced this pull request Sep 25, 2026
…mit-coauthor-guidance

* origin/main: (32 commits)
  docs: plan optional native Kubernetes execution provider (#1579)
  feat(mecatui): restore session status metrics (#1891)
  docs(plan): bound agent inventory viewport (#1946)
  docs: include user-docs in matlatl and use local documentation links (#1934)
  feat(mecatui): bound sessions inventory (#1944)
  feat(studio): show session delegation activity (#1907)
  docs(plan): define Studio session activity (#1885)
  Release TypeScript SDK v0.4.0 (#1940)
  Release v0.0.41 (#1941)
  docs(mecatui): plan bounded sessions inventory (#1906)
  feat(studio): add exact plan control and authorization review prerequisite (#1909)
  test(app): eliminate real ToolHive probe deadline wait (#1937)
  docs(plan): define Studio chat approvals and exact plan control (#1888)
  test(sdk): enforce SDK/TUI high-level parity (#1471) (#1917)
  docs(plan): propose SDK high-level parity coverage (#1471) (#1916)
  docs: improve gRPC schema table readability (#1842)
  test(app): eliminate real waits in durable learning tests (#1933)
  feat(studio): align chat transcript and composer (#1886)
  docs(plan): define Studio chat transcript and composer (#1880)
  feat: correlate provider requests with the root session (#1883)
  ...

This branch was successfully deployed

1 active deployment
Preview — c88227b1 Deployed Sep 25, 2026 by vercel[bot]
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.

2 participants