Skip to content

feat: implement Android reference generator + regenerate pages#1187

Merged
sybohy merged 2 commits into
mainfrom
feat/android-reference-generator
Jun 18, 2026
Merged

feat: implement Android reference generator + regenerate pages#1187
sybohy merged 2 commits into
mainfrom
feat/android-reference-generator

Conversation

@sybohy

@sybohy sybohy commented Jun 18, 2026

Copy link
Copy Markdown
Member

What

Replaces the no-op stub (#1186) with a working Kotlin→MDX generator for the Android SDK reference — the counterpart of ios-reference/generate.ts. It parses the Seam Android SDK's public Kotlin sources (KDoc) and owns the reference pages, regenerating all 8 wholesale.

Per the chosen model (iOS-style, generator owns the page), this regenerates the pages from KDoc — accepting that curated extras in the hand-authored versions (friendly provider-name tables, conceptual sections, bespoke examples) are not reproduced.

How it works

  • Parses sources directly, not Dokka. Dokka 1.9 has no clean structured output (only fragile HTML); the public surface is small and well-KDoc'd, so the generator reads the .kt files — no Gradle/Dokka build needed in CI. A PAGES manifest maps each public type → source file → slug.
  • Handles data classes, sealed hierarchies, enums, and the SeamSDK API class (companion methods, StateFlow properties, suspend/non-suspend methods).
  • Comment/string- and nesting-aware Kotlin scanning so KDoc that embeds /* */ and { }/( ) code examples parses correctly (this is what makes credentials/unlock and defaulted properties parse).
  • Renders frontmatter + ## Overview + per-member sections (signatures, KDoc prose, @param/@return/@throws tables) + a <CardGroup> index. KDoc [Ref] links → inline code.

Validation

eslint, tsc, mintlify validate, and broken-links all pass. Sample output verified for the data class (SeamCredential), sealed hierarchies (SeamError), enum (UnlockProximity), and the SeamSDK API class.

Known limitation (by design)

Output fidelity is bounded by the KDoc. Stale KDoc examples (e.g. the unlock example references SeamUnlockEvent.Connecting / SeamCredentialError.Invalid, which don't exist) are emitted verbatim — fix those upstream in the SDK's KDoc and the next sync corrects the docs.

Companion: seamapi/phone (workflow switches to --source + enables the push trigger).

🤖 Generated with Claude Code

Replace the no-op stub with a working Kotlin→MDX generator that parses the
Seam Android SDK's public sources (KDoc) into the reference pages — the Android
counterpart of ios-reference/generate.ts. The generator owns these pages and
the SDK's public KDoc is the source of truth.

- parse data classes, sealed hierarchies, enums, and the SeamSDK API class
  (companion methods, StateFlow properties, suspend/non-suspend methods)
- nesting-aware, comment/string-aware Kotlin scanning so KDoc that embeds
  `/* */` and code examples parses correctly
- render frontmatter + Overview + per-member sections (signatures, KDoc prose,
  @param/@return/@throws), and a CardGroup index; KDoc [Ref] links → inline code
- parses sources directly (no Gradle/Dokka build): Dokka 1.9 has no clean
  structured output, and the public surface is small and well-KDoc'd

Regenerates all 8 pages (these now match generator output, replacing the
hand-authored seed). Output is bounded by KDoc fidelity — curated tables/prose
aren't reproduced and stale KDoc examples are emitted verbatim (fix upstream).

Validates: eslint, tsc, mintlify validate, and broken-links all pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sybohy sybohy requested a review from a team as a code owner June 18, 2026 19:57
@mintlify

mintlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
seam 🟢 Ready View Preview Jun 18, 2026, 8:00 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@sybohy sybohy merged commit bfb9d52 into main Jun 18, 2026
12 checks passed
@sybohy sybohy deleted the feat/android-reference-generator branch June 18, 2026 20:05
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