Skip to content

docs: restructure A2UI readmes#2742

Merged
PupilTong merged 8 commits into
lynx-family:mainfrom
PupilTong:hw/codex/a2ui-docs
May 28, 2026
Merged

docs: restructure A2UI readmes#2742
PupilTong merged 8 commits into
lynx-family:mainfrom
PupilTong:hw/codex/a2ui-docs

Conversation

@PupilTong
Copy link
Copy Markdown
Collaborator

@PupilTong PupilTong commented May 28, 2026

Summary

  • Keep the A2UI entry READMEs focused on first-time developer onboarding and move deeper architecture/catalog/custom-component material into topic docs with Chinese counterparts.
  • Update catalog composition docs to include basicFunctions, ChoicePicker, and DateTimeInput, and record the README maintenance guidance.
  • Add an A2UI dropdown in the website toolbar, keep the original A2UI playground route at /a2ui, and generate website routes for the A2UI root/topic/catalog README docs.
  • Revert package changes under packages/genui/a2ui-playground; the playground entry now links directly to /a2ui instead of adding playground README docs.
  • Update the published GenUI package files whitelist with A2UI markdown globs so the split README/docs files are included in npm packs.

Validation

  • ./node_modules/.bin/dprint check --incremental=false ...
  • ./node_modules/.bin/eslint --no-warn-ignored website/rspress.config.ts website/sidebars/genui.ts
  • git diff --check --cached
  • npm pack --dry-run --json for packages/genui with a temp npm cache, filtered to confirm A2UI markdown files are included.
  • Generated A2UI website docs locally through createGenUIGuideReadmeDocs(...) and confirmed rewritten links.
  • Confirmed git diff --name-status upstream/main...HEAD -- packages/genui/a2ui-playground is empty after the revert.
  • website typecheck is still blocked by the existing website/src/components/Columns.tsx exact optional property error.
  • rspress build is still blocked until API temp files such as website/temp/react.api.json are generated.

Summary by CodeRabbit

  • Documentation

    • Rewrote A2UI README into a concise, A2UI-focused quick start with ownership checklist and bilingual sync guidance
    • Added English/Chinese architecture, catalogs, and custom-components guides plus catalog composition/manifest pairing and lifecycle notes
    • Updated playground maintenance and link-rewrite guidance to keep generated docs consistent
  • Website

    • Improved A2UI navigation with route-aware highlighting and integrated bilingual sidebar generation
  • Chores

    • Expanded published docs whitelist to include additional A2UI documentation files

Review Change Stack

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 28, 2026

⚠️ No Changeset found

Latest commit: 3f1ff98

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 01f590fc-aa52-4e3f-9788-d39b45f331a2

📥 Commits

Reviewing files that changed from the base of the PR and between 939fbde and 3f1ff98.

📒 Files selected for processing (3)
  • .github/a2ui-catalog.instructions.md
  • packages/genui/scripts/run-api-extractor.mjs
  • website/sidebars/genui.ts
✅ Files skipped from review due to trivial changes (1)
  • .github/a2ui-catalog.instructions.md

📝 Walkthrough

Walkthrough

Condenses A2UI package READMEs into v0.9 quick-starts, adds EN/ZH architecture, catalogs, and custom-component docs, updates catalog recipes to include basicFunctions, revises playground/build guidance, integrates generated docs into the website sidebar, expands package publish globs, and adds api-extractor entry-point wait logic.

Changes

A2UI Documentation and Website Integration

Layer / File(s) Summary
Build instruction and governance update
.github/a2ui-catalog.instructions.md
Playground/build verification, example preview and interactive example guidance, DateTimeInput note, and rules for keeping EN/ZH READMEs and website link rewrites synchronized.
A2UI package README consolidation
packages/genui/a2ui/README.md, packages/genui/a2ui/README_zh.md
Both READMEs rewritten into concise v0.9 quick-starts: Install, Quick Start (MessageStore, allowed catalogs, <A2UI> rendering, message normalization, onAction forwarding), ownership checklist, and trimmed docs links.
A2UI architecture documentation (EN and ZH)
packages/genui/a2ui/docs/architecture.md, packages/genui/a2ui/docs/architecture_zh.md
New architecture pages describing A2UI stack responsibilities, package contents, export subpaths, and <A2UI> lifecycle/configuration notes.
Catalog and custom-components documentation (EN and ZH)
packages/genui/a2ui/docs/catalogs.md, packages/genui/a2ui/docs/catalogs_zh.md, packages/genui/a2ui/docs/custom-components.md, packages/genui/a2ui/docs/custom-components_zh.md
New docs explaining catalog definitions (renderer-only components, manifest pairing, Agent handshake schema emission, include basicFunctions when needed) and custom-component patterns (function/displayName protocol names, schema introspection via manifest and @a2uiCatalog).
Catalog recipes and comprehensive Chinese catalog guide
packages/genui/a2ui/src/catalog/README.md, packages/genui/a2ui/src/catalog/readme_zh.md
Catalog recipe examples updated to import/spread ...basicFunctions; extensive Chinese catalog doc added with allBuiltins assembly recipe, manifest pairing, displayName guidance, and API surface notes.
Website navigation and doc generation integration
website/rspress.config.ts, website/sidebars/genui.ts
Exports per-language navigation constants and link-replacement tables; refactors README/doc generation to compute output roots, remove stale docs, apply link replacements, and write rewritten pages via syncReadme/syncDoc; rspress config now uses sidebar-exported nav items and adds activeMatch/items.
Package publish whitelist
packages/genui/package.json
Expands package files whitelist to include a2ui/docs/*.md and a2ui/src/catalog/*.md so docs are published with the package.
API Extractor startup robustness
packages/genui/scripts/run-api-extractor.mjs
Adds entry-point timeout and polling to ensure the api-extractor main entry exists, runs build if missing, and throws a clear error when the entry point cannot be found.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • Sherry-hue
  • HuJean
  • gaoachao

"I’m a rabbit with a doc in paw,
I hopped through READMEs near and far,
Trimmed guides to quick-start glow,
Paired catalogs so schemas show,
Hooray — docs ready, ship the A2UI star!" 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: restructure A2UI readmes' directly and concisely describes the main change: reorganizing A2UI documentation files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 28, 2026

Merging this PR will degrade performance by 14.98%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 80 untouched benchmarks
⏩ 26 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
transform 1000 view elements 40.2 ms 47.3 ms -14.98%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing PupilTong:hw/codex/a2ui-docs (3f1ff98) with main (076fc63)

Open in CodSpeed

Footnotes

  1. 26 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@PupilTong PupilTong changed the title [codex] restructure A2UI readmes docs: restructure A2UI readmes May 28, 2026
@PupilTong PupilTong marked this pull request as ready for review May 28, 2026 08:57
@PupilTong PupilTong self-assigned this May 28, 2026
@PupilTong PupilTong changed the title docs: restructure A2UI readmes [codex] restructure A2UI readmes May 28, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/a2ui-catalog.instructions.md:
- Line 35: Update the guidance sentence to accurately state that the package
build script runs TypeScript compilation before regenerating the catalog:
replace the current claim that `pnpm -F `@lynx-js/genui-a2ui` build` only
regenerates catalog JSON with a sentence noting that the `build` script runs
`tsc --project tsconfig.build.json` (or `exec tsc -p tsconfig.build.json`)
before `build:catalog`, so you normally don't need to run a separate `tsc`
unless you specifically skip the package's `build` step.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 30a54be4-c115-409e-82dd-2c5854721c20

📥 Commits

Reviewing files that changed from the base of the PR and between 7a5c7b0 and 1b01d56.

📒 Files selected for processing (13)
  • .github/a2ui-catalog.instructions.md
  • packages/genui/a2ui/README.md
  • packages/genui/a2ui/README_zh.md
  • packages/genui/a2ui/docs/architecture.md
  • packages/genui/a2ui/docs/architecture_zh.md
  • packages/genui/a2ui/docs/catalogs.md
  • packages/genui/a2ui/docs/catalogs_zh.md
  • packages/genui/a2ui/docs/custom-components.md
  • packages/genui/a2ui/docs/custom-components_zh.md
  • packages/genui/a2ui/src/catalog/README.md
  • packages/genui/a2ui/src/catalog/readme_zh.md
  • website/rspress.config.ts
  • website/sidebars/genui.ts

Comment thread .github/a2ui-catalog.instructions.md Outdated
@PupilTong PupilTong force-pushed the hw/codex/a2ui-docs branch from 93b6488 to aed6715 Compare May 28, 2026 09:09
@PupilTong PupilTong changed the title [codex] restructure A2UI readmes docs: restructure A2UI readmes May 28, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@website/rspress.config.ts`:
- Around line 758-759: The activeMatch regex for the A2UI nav (property
activeMatch) currently only matches English routes and misses Chinese pages;
update the regex used in the activeMatch for A2UI so it also accepts the
optional "/zh/" prefix (so it will match both "/a2ui" and "/zh/a2ui" and
similarly for "/guide/genui/a2ui"), leaving the items reference
(A2UI_EN_NAV_ITEMS) unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 55ad1305-47e7-40a2-94fe-ea66d1a15663

📥 Commits

Reviewing files that changed from the base of the PR and between 93b6488 and 939fbde.

📒 Files selected for processing (14)
  • .github/a2ui-catalog.instructions.md
  • packages/genui/a2ui/README.md
  • packages/genui/a2ui/README_zh.md
  • packages/genui/a2ui/docs/architecture.md
  • packages/genui/a2ui/docs/architecture_zh.md
  • packages/genui/a2ui/docs/catalogs.md
  • packages/genui/a2ui/docs/catalogs_zh.md
  • packages/genui/a2ui/docs/custom-components.md
  • packages/genui/a2ui/docs/custom-components_zh.md
  • packages/genui/a2ui/src/catalog/README.md
  • packages/genui/a2ui/src/catalog/readme_zh.md
  • packages/genui/package.json
  • website/rspress.config.ts
  • website/sidebars/genui.ts
✅ Files skipped from review due to trivial changes (10)
  • packages/genui/a2ui/docs/catalogs_zh.md
  • packages/genui/a2ui/README_zh.md
  • packages/genui/a2ui/docs/custom-components_zh.md
  • packages/genui/a2ui/docs/custom-components.md
  • packages/genui/a2ui/docs/architecture.md
  • packages/genui/a2ui/docs/catalogs.md
  • packages/genui/a2ui/README.md
  • packages/genui/a2ui/src/catalog/readme_zh.md
  • .github/a2ui-catalog.instructions.md
  • packages/genui/a2ui/src/catalog/README.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/genui/package.json
  • website/sidebars/genui.ts

Comment thread website/rspress.config.ts
HuJean
HuJean previously approved these changes May 28, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

@PupilTong PupilTong merged commit f60716d into lynx-family:main May 28, 2026
92 of 104 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.

3 participants