Skip to content

chore: document GenUI for React developers#2702

Merged
PupilTong merged 9 commits into
mainfrom
hw/codex/genui-readme-docs
May 26, 2026
Merged

chore: document GenUI for React developers#2702
PupilTong merged 9 commits into
mainfrom
hw/codex/genui-readme-docs

Conversation

@PupilTong
Copy link
Copy Markdown
Collaborator

@PupilTong PupilTong commented May 25, 2026

Summary

  • Rebased the branch onto the latest origin/main (7468b479).
  • Moved the external A2UI README pair into packages/genui/a2ui/ as README.md and README_zh.md.
  • Wired the website GenUI sidebar to generate English and Chinese A2UI guide pages from those package READMEs.
  • Folded the user-facing catalog extraction details into the A2UI README, including @a2uiCatalog, TypeDoc metadata mapping, supported/unsupported prop types, scanner behavior, and CLI options.
  • Removed the separate website A2UI Catalog Extractor guide entry and cleanup stale generated extractor docs from the sidebar sync helper.
  • Added website workspace dev dependencies on @lynx-js/a2ui-cli and @lynx-js/a2ui-reactlynx, with the lockfile updated.
  • Kept the public docs oriented toward external React/ReactLynx app developers: CLI examples use npx @lynx-js/a2ui-cli, the playground points only to https://lynx-stack.dev/a2ui/, and local/internal playground usage stays out of the docs.

Validation

  • ./node_modules/.bin/dprint check .github/genui-website.instructions.md packages/genui/a2ui/README.md packages/genui/a2ui/README_zh.md website/sidebars/genui.ts
  • git diff --check
  • git diff --cached --check
  • Ran the GenUI sidebar sync helper directly with jiti and confirmed it returns only /guide/genui/a2ui and /zh/guide/genui/a2ui entries.
  • Confirmed stale generated website/docs/**/guide/genui/a2ui-catalog-extractor.md files are removed after sync.
  • ./node_modules/.bin/rspress build still stops before site build because the existing API sidebar expects website/temp/react.api.json, which is not present in this checkout.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 25, 2026

⚠️ No Changeset found

Latest commit: d881a8a

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 25, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds comprehensive GenUI documentation (English and Chinese), introduces documentation instructions for GenUI workflows and transports, and standardizes CLI usage by making npx @lynx-js/a2ui-cli generate catalog the public entry point while marking the extractor as internal.

Changes

GenUI Documentation and CLI Realignment

Layer / File(s) Summary
Documentation standards and guidelines
.github/genui-docs.instructions.md
New instruction file specifying how to document GenUI workflows (Catalog→Agent→Client), clarify A2UI payload distinctions, describe transport behaviors (REST/SSE/AbortController), and standardize a2ui-cli command naming and wording.
Core GenUI user documentation (English)
packages/genui/Readme.md
Complete user guide covering GenUI/A2UI mental model, quickstart commands, endpoints and payload shapes, client rendering via MessageStore and <A2UI>, REST/SSE transport guidance, operational best practices, glossary, and product direction.
Core GenUI user documentation (Chinese)
packages/genui/Readme_zh.md
Parallel Chinese documentation covering concepts, quickstart, Catalog/CLI/Agent/Client workflows, transport layer examples (REST/SSE), event handling conventions, Playground usage, and glossary.
CLI entry point restructuring
packages/genui/a2ui-catalog-extractor/README.md, packages/genui/a2ui-catalog-extractor/readme.zh_cn.md, packages/genui/a2ui-cli/README.md, packages/genui/a2ui-prompt/README.md
Updated package READMEs (English and Chinese) to position @lynx-js/a2ui-catalog-extractor as an internal extraction engine. Redirected users to npx @lynx-js/a2ui-cli generate catalog as the public entry point for catalog generation and added repository-internal API notes; normalized command references across CLI docs.

🎯 2 (Simple) | ⏱️ ~8 minutes


Suggested reviewers:

  • HuJean
  • Sherry-hue

I’m a rabbit with a tiny pen,
I hop through docs and tidy then.
CLI doors set straight and clear,
GenUI whispers in the ear.
Hooray — the guides are here! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: document GenUI for React developers' clearly and concisely summarizes the main purpose of the PR—adding documentation to orient React developers to GenUI/A2UI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ 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 hw/codex/genui-readme-docs

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.

@PupilTong PupilTong changed the title [codex] document GenUI for React developers chore: document GenUI for React developers May 25, 2026
Sherry-hue
Sherry-hue previously approved these changes May 25, 2026
@PupilTong PupilTong force-pushed the hw/codex/genui-readme-docs branch from 3394819 to 67e6a49 Compare May 25, 2026 07:34
@PupilTong PupilTong marked this pull request as ready for review May 25, 2026 07:56
@PupilTong PupilTong self-assigned this May 25, 2026
@PupilTong PupilTong requested review from HuJean and Sherry-hue May 25, 2026 13:28
@PupilTong PupilTong force-pushed the hw/codex/genui-readme-docs branch from d2f91e0 to 40123ef Compare May 26, 2026 05:22
@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 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 26, 2026

Merging this PR will not alter performance

✅ 81 untouched benchmarks
⏩ 26 skipped benchmarks1


Comparing hw/codex/genui-readme-docs (d881a8a) with main (0d8a8b1)2

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.

  2. No successful run was found on main (7468b47) during the generation of this report, so 0d8a8b1 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 26, 2026

React External

#1791 Bundle Size — 699.5KiB (0%).

d881a8a(current) vs 7468b47 main#1787(baseline)

Bundle metrics  no changes
                 Current
#1791
     Baseline
#1787
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 17 17
No change  Duplicate Modules 5 5
No change  Duplicate Code 7.13% 7.13%
No change  Packages 0 0
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#1791
     Baseline
#1787
No change  Other 699.5KiB 699.5KiB

Bundle analysis reportBranch hw/codex/genui-readme-docsProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 26, 2026

React Example

#8675 Bundle Size — 238KiB (0%).

d881a8a(current) vs 7468b47 main#8671(baseline)

Bundle metrics  no changes
                 Current
#8675
     Baseline
#8671
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 204 204
No change  Duplicate Modules 81 81
No change  Duplicate Code 44.59% 44.59%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#8675
     Baseline
#8671
No change  IMG 145.76KiB 145.76KiB
No change  Other 92.24KiB 92.24KiB

Bundle analysis reportBranch hw/codex/genui-readme-docsProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 26, 2026

Web Explorer

#10252 Bundle Size — 903.53KiB (0%).

d881a8a(current) vs 7468b47 main#10248(baseline)

Bundle metrics  no changes
                 Current
#10252
     Baseline
#10248
No change  Initial JS 45.06KiB 45.06KiB
No change  Initial CSS 2.22KiB 2.22KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 9 9
No change  Assets 11 11
No change  Modules 231 231
No change  Duplicate Modules 11 11
No change  Duplicate Code 27.12% 27.12%
No change  Packages 10 10
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#10252
     Baseline
#10248
No change  JS 499.15KiB 499.15KiB
No change  Other 402.16KiB 402.16KiB
No change  CSS 2.22KiB 2.22KiB

Bundle analysis reportBranch hw/codex/genui-readme-docsProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 26, 2026

React Example with Element Template

#944 Bundle Size — 204.36KiB (0%).

d881a8a(current) vs 7468b47 main#940(baseline)

Bundle metrics  no changes
                 Current
#944
     Baseline
#940
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 124 124
No change  Duplicate Modules 50 50
No change  Duplicate Code 45.19% 45.19%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#944
     Baseline
#940
No change  IMG 145.76KiB 145.76KiB
No change  Other 58.61KiB 58.61KiB

Bundle analysis reportBranch hw/codex/genui-readme-docsProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 26, 2026

React MTF Example

#1809 Bundle Size — 208.94KiB (0%).

d881a8a(current) vs 7468b47 main#1805(baseline)

Bundle metrics  no changes
                 Current
#1809
     Baseline
#1805
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 199 199
No change  Duplicate Modules 78 78
No change  Duplicate Code 44.08% 44.08%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#1809
     Baseline
#1805
No change  IMG 111.23KiB 111.23KiB
No change  Other 97.71KiB 97.71KiB

Bundle analysis reportBranch hw/codex/genui-readme-docsProject dashboard


Generated by RelativeCIDocumentationReport issue

@github-actions
Copy link
Copy Markdown
Contributor

UI Judge

GEQI weighted score: 64.1 / 100 across 8 examples.
Average visual-correctness score: 3.3 / 5.

Dimension Weight Average Results Status
Usability & Interaction 30% 3.3 / 5 8 OK
Visual & Aesthetics 25% 3.4 / 5 8 OK
Consistency & Standards 15% 3.3 / 5 8 OK
Architecture & UX Writing 15% 3.1 / 5 8 OK
Accessibility & Performance 15% 2.9 / 5 8 OK
# Example Visual Correctness Usability & Interaction (30%) Visual & Aesthetics (25%) Consistency & Standards (15%) Architecture & UX Writing (15%) Accessibility & Performance (15%) GEQI Page Status
1 recs 2 / 5 2 / 5 4 / 5 3 / 5 2 / 5 2 / 5 53 / 100 preview OK
2 cast-grid 5 / 5 5 / 5 4 / 5 5 / 5 5 / 5 4 / 5 92 / 100 preview OK
3 citywalk-list 2 / 5 2 / 5 3 / 5 2 / 5 2 / 5 2 / 5 45 / 100 preview OK
4 fridge-search 3 / 5 3 / 5 3 / 5 4 / 5 4 / 5 3 / 5 66 / 100 preview OK
5 trip-planner 2 / 5 2 / 5 3 / 5 2 / 5 2 / 5 2 / 5 45 / 100 preview OK
6 weather-current 5 / 5 5 / 5 4 / 5 4 / 5 4 / 5 4 / 5 86 / 100 preview OK
7 product-card 5 / 5 5 / 5 4 / 5 4 / 5 4 / 5 4 / 5 86 / 100 preview OK
8 workout-plan 2 / 5 2 / 5 2 / 5 2 / 5 2 / 5 2 / 5 40 / 100 preview OK
Details

Result 1

  • Example: recs
  • Dimension: visual-correctness
  • Visual correctness: 2 / 5
  • GEQI dimensions:
    • Usability & Interaction: 2 / 5 (30%)
    • Visual & Aesthetics: 4 / 5 (25%)
    • Consistency & Standards: 3 / 5 (15%)
    • Architecture & UX Writing: 2 / 5 (15%)
    • Accessibility & Performance: 2 / 5 (15%)
  • Task: The A2UI playground preview should show date-night dining recommendations for Moonlight Terrace, Pinewood Bistro, and Sea Breeze Kitchen.

Result 2

  • Example: cast-grid
  • Dimension: visual-correctness
  • Visual correctness: 5 / 5
  • GEQI dimensions:
    • Usability & Interaction: 5 / 5 (30%)
    • Visual & Aesthetics: 4 / 5 (25%)
    • Consistency & Standards: 5 / 5 (15%)
    • Architecture & UX Writing: 5 / 5 (15%)
    • Accessibility & Performance: 4 / 5 (15%)
  • Task: The A2UI playground preview should show a cast grid for the short film Night Notes, including Lin Xia and Zhou Ning cast cards.

Result 3

  • Example: citywalk-list
  • Dimension: visual-correctness
  • Visual correctness: 2 / 5
  • GEQI dimensions:
    • Usability & Interaction: 2 / 5 (30%)
    • Visual & Aesthetics: 3 / 5 (25%)
    • Consistency & Standards: 2 / 5 (15%)
    • Architecture & UX Writing: 2 / 5 (15%)
    • Accessibility & Performance: 2 / 5 (15%)
  • Task: The A2UI playground preview should show weekend citywalk coffee picks with Rooftop Brew Room, Corner Canvas Lab, and Late Sun Roastery.

Result 4

  • Example: fridge-search
  • Dimension: visual-correctness
  • Visual correctness: 3 / 5
  • GEQI dimensions:
    • Usability & Interaction: 3 / 5 (30%)
    • Visual & Aesthetics: 3 / 5 (25%)
    • Consistency & Standards: 4 / 5 (15%)
    • Architecture & UX Writing: 4 / 5 (15%)
    • Accessibility & Performance: 3 / 5 (15%)
  • Task: The A2UI playground preview should show refrigerator search results with Siemens, Hualing, Haier, and Midea product cards.

Result 5

  • Example: trip-planner
  • Dimension: visual-correctness
  • Visual correctness: 2 / 5
  • GEQI dimensions:
    • Usability & Interaction: 2 / 5 (30%)
    • Visual & Aesthetics: 3 / 5 (25%)
    • Consistency & Standards: 2 / 5 (15%)
    • Architecture & UX Writing: 2 / 5 (15%)
    • Accessibility & Performance: 2 / 5 (15%)
  • Task: The A2UI playground preview should show a Kyoto 48-hour trip planner with Day 1 and Day 2 itinerary sections, including Monkey Park Viewpoint.

Result 6

  • Example: weather-current
  • Dimension: visual-correctness
  • Visual correctness: 5 / 5
  • GEQI dimensions:
    • Usability & Interaction: 5 / 5 (30%)
    • Visual & Aesthetics: 4 / 5 (25%)
    • Consistency & Standards: 4 / 5 (15%)
    • Architecture & UX Writing: 4 / 5 (15%)
    • Accessibility & Performance: 4 / 5 (15%)
  • Task: The A2UI playground preview should show the current weather for Austin, TX, including clear skies with light breeze.

Result 7

  • Example: product-card
  • Dimension: visual-correctness
  • Visual correctness: 5 / 5
  • GEQI dimensions:
    • Usability & Interaction: 5 / 5 (30%)
    • Visual & Aesthetics: 4 / 5 (25%)
    • Consistency & Standards: 4 / 5 (15%)
    • Architecture & UX Writing: 4 / 5 (15%)
    • Accessibility & Performance: 4 / 5 (15%)
  • Task: The A2UI playground preview should show a Wireless Headphones Pro product card with a visible Add to Cart action.

Result 8

  • Example: workout-plan
  • Dimension: visual-correctness
  • Visual correctness: 2 / 5
  • GEQI dimensions:
    • Usability & Interaction: 2 / 5 (30%)
    • Visual & Aesthetics: 2 / 5 (25%)
    • Consistency & Standards: 2 / 5 (15%)
    • Architecture & UX Writing: 2 / 5 (15%)
    • Accessibility & Performance: 2 / 5 (15%)
  • Task: The A2UI playground preview should show a weekly workout plan with five days from Monday Ramp-Up through Friday Conditioning.

Workflow run

@PupilTong PupilTong enabled auto-merge (squash) May 26, 2026 06:58
@PupilTong PupilTong merged commit c19a419 into main May 26, 2026
88 of 90 checks passed
@PupilTong PupilTong deleted the hw/codex/genui-readme-docs branch May 26, 2026 06:59
@coderabbitai coderabbitai Bot mentioned this pull request May 26, 2026
3 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Jun 3, 2026
3 tasks
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