Repository navigation
Store API documentation with short type names - #313
Merged
Merged
Conversation
Extracted type names carry module paths, such as import("./src/api").Issue.
The reference page shortened them for display, but describe returned them in
full: about a fifth of a describe result, and callers had to copy the
qualified names to describe a type. Documentation is now stored with each
name shortened where it stays unambiguous, in names, definitions, signatures
and uses alike, so every reader shows and accepts the same short names.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | 613bbcc | Nov 22 2026, 10:08 PM |
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.
Why
Extracted type names carry module paths, such as
import("./src/api").Issue. The reference page shortens them for display, but MCPdescribe, the API and the CLI return them in full. In a generated API the prefix is about a fifth of every describe result, and callers must copy the qualified name to describe a type: in a usability test, an agent's natural first try wasWorkflowStateFilter, while onlyimport("./src/api").WorkflowStateFilterworked.What changes
shortenTypeNamesin contracts: removes the module path of each documented type reference where the short name is unambiguous among the documented types, and keeps the qualified name otherwise. It rewrites names, definitions, type parameters, signatures andusestogether, so every reference still names its declaration. It is idempotent. The logic is the reference page's existing display shortening, moved unchanged.Documentation stored before this change keeps its qualified names until the app is deployed again.
On the Linear template, the stored document shrinks from 1.80 MB to 1.53 MB; describing
viewerwithissuesfrom 38 KB to 31 KB, andissueCreatefrom 16 KB to 14 KB.Verification
pnpm checkpnpm exec vitest run apps/control-plane packagesuseschange together, ambiguous names stay qualified, and a second pass changes nothing.RUN_CLI_TESTS=1documentation extraction, app-services CLI and integration tests;RUN_SERVICE_TESTS=1runtime service tests (workerd and celld);playwright test tests/e2e/auth.spec.ts

Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Moves type-name shortening from page rendering to publication, so stored documentation uses the same names across the reference page, API, CLI and MCP.
tnkuehne explicitly acknowledges that existing documentation keeps qualified names until the app is deployed again.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[CLI upload] --> C[uploads.publish] B[App builder] --> C C --> D[shortenTypeNames] D --> E[Encode and store documentation] E --> F[Reference page] E --> G[API and CLI describe] E --> H[Agent package and MCP]Reviews (1) · Last reviewed commit: "Store API documentation with short type ..." · Reviewed by Greptile