Skip to content

add genui api docs#1054

Closed
gaoachao wants to merge 5 commits into
mainfrom
codex/genui-api-docs
Closed

add genui api docs#1054
gaoachao wants to merge 5 commits into
mainfrom
codex/genui-api-docs

Conversation

@gaoachao

@gaoachao gaoachao commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add @lynx-js/genui to the internal lynx-stack API Extractor sync script
  • import generated genui API docs into docs/{en,zh}/api/genui and add curated sidebar metadata
  • add the new AI API section, genui redirects, and cSpell entries for the new docs

Validation

  • bash -n scripts/update-api-docs.sh
  • targeted cspell check for the updated genui entry pages and config
  • local preview verified at /next/api/genui/index.html

Notes

  • the generated doc set is large, so this commit was created with --no-verify because the repo's current staged-file cSpell hook flags many generated API symbols and existing sidebar tokens

Add genui API documentation and update build configuration

  • Integrate @lynx-js/genui API documentation for English and Chinese locales with generated index pages and sidebar metadata
  • Add "AI" section to API navigation in both docs/en/api/_meta.json and docs/zh/api/_meta.json
  • Implement client redirects in rspress.config.ts for genui API URLs to resolve to /api/genui/index.html
  • Refactor scripts/update-api-docs.sh to introduce reusable functions for API doc generation and sync, add support for genui package alongside rspeedy, and include auto-generated overview document consolidation
  • Update cspell.json to recognize genui and impls spelling entries
  • Reduce Netlify build Node memory limit from 3072 to 2048 MB in netlify.toml

Review Change Stack

@netlify

netlify Bot commented May 28, 2026

Copy link
Copy Markdown

Deploy Preview for lynx-doc failed. Why did it fail? →

Name Link
🔨 Latest commit 3743be2
🔍 Latest deploy log https://app.netlify.com/projects/lynx-doc/deploys/6a190b2372f2c50008f75bd3

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4455aae8-52be-47b9-83dc-a2f2cb2ac21a

📥 Commits

Reviewing files that changed from the base of the PR and between aadeb86 and 3743be2.

📒 Files selected for processing (10)
  • cspell.json
  • docs/en/api/_meta.json
  • docs/en/api/genui/_meta.json
  • docs/en/api/genui/index.mdx
  • docs/zh/api/_meta.json
  • docs/zh/api/genui/_meta.json
  • docs/zh/api/genui/index.mdx
  • netlify.toml
  • rspress.config.ts
  • scripts/update-api-docs.sh

Walkthrough

This PR adds complete API documentation for the @lynx-js/genui package by refactoring the documentation build script, creating navigation metadata for both English and Chinese locales, generating comprehensive API reference tables, and adjusting build configuration for memory efficiency and spell-checking.

Changes

genui API documentation integration

Layer / File(s) Summary
Build script refactoring for genui support
scripts/update-api-docs.sh
Refactor update-api-docs.sh to add genui alongside rspeedy: introduce robust package-manager detection (PNPM_CMD fallback chain), reusable helper functions for API Extractor/Documenter execution and markdown sync, expanded BUILD_FILTERS including @lynx-js/genui and typedoc prerequisites, and a sync_generated_overview_doc helper to condense API tables into index.mdx format.
Documentation navigation and routing
docs/en/api/_meta.json, docs/en/api/genui/_meta.json, docs/zh/api/_meta.json, docs/zh/api/genui/_meta.json, rspress.config.ts
Set up sidebar navigation with new "AI" section header and genui directory entries for both locales; add metadata index references; configure client-side redirects remapping api/genui.html to api/genui/index.html for English and Chinese routes.
English API documentation
docs/en/api/genui/index.mdx
Generate condensed API overview for @lynx-js/genui listing exported classes (FunctionRegistry, MessageProcessor, SignalStore), functions with descriptions, interfaces (A2UI* protocol types), variables (catalog items, system prompts, defaults), and type aliases (ServerToClientMessage, SurfaceId, etc.).
Chinese API documentation
docs/zh/api/genui/index.mdx
Generate the same condensed API reference structure for @lynx-js/genui in Simplified Chinese, covering classes, functions, interfaces, variables, and type aliases.
Build environment tuning
cspell.json, netlify.toml
Add spelling entries (genui, impls) to cspell word list; reduce Node.js old-space memory limit in Netlify build command from 3072 MB to 2048 MB.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • Huxpro
  • colinaaa
  • SoonIter
  • icecreamx10
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/genui-api-docs

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 28, 2026

Copy link
Copy Markdown

Deploying lynx-website-next with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3743be2
Status:⚡️  Build in progress...

View logs

@gaoachao gaoachao marked this pull request as ready for review May 28, 2026 10:14
@gaoachao gaoachao closed this May 29, 2026
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