Skip to content

fix(api-docs): document const/InjectionToken exports (Variable kind)#683

Merged
blove merged 1 commit into
mainfrom
fix/api-docs-const-exports
Jun 18, 2026
Merged

fix(api-docs): document const/InjectionToken exports (Variable kind)#683
blove merged 1 commit into
mainfrom
fix/api-docs-const-exports

Conversation

@blove

@blove blove commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

The api-docs generator (generate-api-docs.ts) only handled Function/Class/Interface/TypeAlias reflections and silently dropped Variable-kind exports — so public InjectionTokens and other export consts were undocumented (LANGGRAPH_CLIENT_OPTIONS, LANGGRAPH_CLIENT, LANGGRAPH_THREADS_CONFIG, VIEW_REGISTRY, RENDER_CONFIG, CHAT_CONFIG, …).

Changes

  • generator: add a ReflectionKind.Variablekind: 'const' branch (emits name + type signature + description); extend the ApiDocEntry.kind union.
  • renderer (ApiDocRenderer.tsx): extend the consumer kind union with 'const'. KindBadge/signature already render generically — no other consumer (page.tsx, llms-full.txt/route.ts) needed changes.
  • regenerated api-docs.json for langgraph (+5), chat (+17), render (+6), licensing (+1), telemetry (+1) — 30 newly-documented consts.

Verification

  • nx build website passes (249 static pages) — the new kind: 'const' entries render without breaking the build.
  • No copilotkit references in the diff.

Note: chat's REASONING_FIXTURE_* come from @threadplane/chat/testing (public testing utils) — documenting them is correct but may read as surprising in the main API docs; left in for a minimal, consistent fix.

Discovered while shipping #681 (the LANGGRAPH_CLIENT_OPTIONS token), intentionally split out to keep that PR scoped.

🤖 Generated with Claude Code

Add ReflectionKind.Variable handling to reflectionToEntry so export
const declarations (InjectionTokens, config objects, icon constants,
fixture helpers) are included in generated api-docs.json files.  The
ApiDocEntry kind union gains 'const' in both the generator and the
website renderer; no exhaustive switch touched.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 18, 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, Comment Jun 18, 2026 5:28pm

Request Review

@blove blove enabled auto-merge (squash) June 18, 2026 17:26
@blove blove merged commit 8c06875 into main Jun 18, 2026
20 checks passed
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