Skip to content

chore: expand a2ui catalog extractor guide#2531

Merged
PupilTong merged 5 commits intolynx-family:mainfrom
PupilTong:codex/a2ui-catalog-docs
Apr 28, 2026
Merged

chore: expand a2ui catalog extractor guide#2531
PupilTong merged 5 commits intolynx-family:mainfrom
PupilTong:codex/a2ui-catalog-docs

Conversation

@PupilTong
Copy link
Copy Markdown
Collaborator

@PupilTong PupilTong commented Apr 27, 2026

Summary

  • Expand the A2UI catalog extractor README into a step-by-step English guide for external npm users only.
  • Add a matching Simplified Chinese readme.zh_cn.md and package-local AGENTS guidance for keeping the two docs synchronized.
  • Add a README-backed QuickStartCard fixture and extend tests for schema generation, full catalog wrapping, and CLI --typedoc-json output.
  • Add a Guide-level GenUI section that exposes the bilingual README content by generating Rspress docs pages under /guide/genui/a2ui-catalog-extractor and /zh/guide/genui/a2ui-catalog-extractor.

Validation

  • fnm exec --using v24.15.0 -- pnpm install --frozen-lockfile
  • fnm exec --using v24.15.0 -- pnpm -C packages/genui/a2ui-catalog-extractor test
  • fnm exec --using v24.15.0 -- pnpm dprint check -- packages/genui/a2ui-catalog-extractor/README.md packages/genui/a2ui-catalog-extractor/readme.zh_cn.md packages/genui/a2ui-catalog-extractor/AGENTS.md packages/genui/a2ui-catalog-extractor/test/extractor.test.ts packages/genui/a2ui-catalog-extractor/test/fixtures/catalog/QuickStartCard.tsx packages/genui/a2ui-catalog-extractor/test/fixtures/expected-catalog/QuickStartCard/catalog.json
  • fnm exec --using v24.15.0 -- pnpm eslint packages/genui/a2ui-catalog-extractor/test/extractor.test.ts packages/genui/a2ui-catalog-extractor/test/fixtures/catalog/QuickStartCard.tsx
  • fnm exec --using v24.15.0 -- node --input-type=module -e "const { createGenUIGuideReadmeDocs } = await import('./website/sidebars/genui.ts?guide=' + Date.now()); console.log(JSON.stringify(createGenUIGuideReadmeDocs({ repositoryRoot: process.cwd(), websiteRoot: process.cwd() + '/website' })));"
  • fnm exec --using v24.15.0 -- pnpm dprint check --incremental=false -- website/.gitignore website/rspress.config.ts website/sidebars/genui.ts
  • fnm exec --using v24.15.0 -- pnpm eslint website/rspress.config.ts website/sidebars/index.ts website/sidebars/genui.ts
  • fnm exec --using v24.15.0 -- pnpm -C website docs
  • fnm exec --using v24.15.0 -- pnpm -C website build:docs

Summary by CodeRabbit

  • Documentation
    • Expanded README with Quick Start guide, CLI options reference, programming API examples, and troubleshooting guidance
    • Added Simplified Chinese documentation for the A2UI Catalog Extractor tool
    • Documentation integrated into the website with language-specific guides

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 27, 2026

⚠️ No Changeset found

Latest commit: 2deb133

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 Apr 27, 2026

📝 Walkthrough

Walkthrough

This PR adds comprehensive documentation and website integration for the a2ui-catalog-extractor package, including English and Chinese READMEs with quick start guides and API references, a documentation policy file, expanded test fixtures with a new QuickStartCard component, and a utility to synchronize and generate website sidebar entries from package READMEs.

Changes

Cohort / File(s) Summary
Documentation Policy & English Reference
packages/genui/a2ui-catalog-extractor/AGENTS.md, packages/genui/a2ui-catalog-extractor/README.md
Added documentation policy guidelines and expanded README from concise guide into comprehensive documentation including quick start, authoring guide, CLI options reference table, programmatic API with examples, and troubleshooting section.
Chinese Documentation
packages/genui/a2ui-catalog-extractor/readme.zh_cn.md
Added complete Simplified Chinese translation of package documentation covering tool functionality, authoring constraints, CLI usage, programming API, and troubleshooting.
Test Suite & Fixtures
packages/genui/a2ui-catalog-extractor/test/extractor.test.ts, packages/genui/a2ui-catalog-extractor/test/fixtures/catalog/QuickStartCard.tsx, packages/genui/a2ui-catalog-extractor/test/fixtures/expected-catalog/QuickStartCard/catalog.json
Expanded test suite with CLI end-to-end testing and added new QuickStartCard component fixture with typed props and expected JSON catalog schema output.
Website Build & Configuration
website/.gitignore, website/rspress.config.ts, website/sidebars/genui.ts, website/sidebars/index.ts
Integrated GenUI documentation into website build system with a new createGenUIGuideReadmeDocs utility for synchronizing READMEs, generating sidebar entries, and managing localized documentation output directories.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • Sherry-hue
  • colinaaa
  • HuJean

Poem

🐰 A rabbit hops through docs so bright,
English words and Chinese right,
Tests and fixtures all aligned,
Quick starts guide with cards designed,
Websites now show genui's way,
Documentation saves the day! 📚

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: expand a2ui catalog extractor guide' directly reflects the main change—expanding documentation and guides for the a2ui catalog extractor tool with new README versions, fixture tests, and Rspress website integration.
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.

✏️ 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 Apr 27, 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!

@PupilTong PupilTong self-assigned this Apr 27, 2026
@PupilTong PupilTong changed the title [codex] expand a2ui catalog extractor guide chore: expand a2ui catalog extractor guide Apr 27, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 27, 2026

Merging this PR will improve performance by 9.06%

⚠️ 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 improved benchmark
✅ 80 untouched benchmarks
⏩ 26 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
002-hello-reactLynx-destroyBackground 893.7 µs 819.4 µs +9.06%

Comparing PupilTong:codex/a2ui-catalog-docs (2deb133) with main (b1809ef)

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.

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 27, 2026

React Example

#7678 Bundle Size — 225.38KiB (0%).

2deb133(current) vs b1809ef main#7667(baseline)

Bundle metrics  no changes
                 Current
#7678
     Baseline
#7667
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 179 179
No change  Duplicate Modules 69 69
No change  Duplicate Code 44.57% 44.57%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#7678
     Baseline
#7667
No change  IMG 145.76KiB 145.76KiB
No change  Other 79.63KiB 79.63KiB

Bundle analysis reportBranch PupilTong:codex/a2ui-catalog-doc...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 27, 2026

React External

#794 Bundle Size — 680.27KiB (0%).

2deb133(current) vs b1809ef main#783(baseline)

Bundle metrics  no changes
                 Current
#794
     Baseline
#783
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 8.59% 8.59%
No change  Packages 0 0
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#794
     Baseline
#783
No change  Other 680.27KiB 680.27KiB

Bundle analysis reportBranch PupilTong:codex/a2ui-catalog-doc...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 27, 2026

Web Explorer

#9251 Bundle Size — 900.02KiB (0%).

2deb133(current) vs b1809ef main#9240(baseline)

Bundle metrics  Change 2 changes
                 Current
#9251
     Baseline
#9240
No change  Initial JS 44.46KiB 44.46KiB
No change  Initial CSS 2.22KiB 2.22KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 9 9
No change  Assets 11 11
Change  Modules 229(+0.88%) 227
No change  Duplicate Modules 11 11
Change  Duplicate Code 27.28%(-0.04%) 27.29%
No change  Packages 10 10
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#9251
     Baseline
#9240
No change  JS 495.88KiB 495.88KiB
No change  Other 401.92KiB 401.92KiB
No change  CSS 2.22KiB 2.22KiB

Bundle analysis reportBranch PupilTong:codex/a2ui-catalog-doc...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 27, 2026

React MTF Example

#810 Bundle Size — 196.54KiB (0%).

2deb133(current) vs b1809ef main#799(baseline)

Bundle metrics  no changes
                 Current
#810
     Baseline
#799
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 173 173
No change  Duplicate Modules 66 66
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
#810
     Baseline
#799
No change  IMG 111.23KiB 111.23KiB
No change  Other 85.31KiB 85.31KiB

Bundle analysis reportBranch PupilTong:codex/a2ui-catalog-doc...Project dashboard


Generated by RelativeCIDocumentationReport issue

@PupilTong PupilTong marked this pull request as ready for review April 28, 2026 05:44
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

🧹 Nitpick comments (1)
packages/genui/a2ui-catalog-extractor/README.md (1)

35-40: Optional readability polish for repeated bullet openings.

The five consecutive bullets starting with “It does not …” are clear, but varying one or two openings would make the section read smoother.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/genui/a2ui-catalog-extractor/README.md` around lines 35 - 40, The
repeated bullets all start with the same phrase "It does not …"; update the five
list items so openings vary for readability while keeping meaning — e.g., change
some to "Doesn't render A2UI UI.", "Does not parse TypeScript source text by
hand.", "Avoids using the TypeScript compiler API directly.", "Doesn't require
JSON Schema in comments.", "Does not expand arbitrary imported type aliases or
external interfaces."; ensure the unique repeated token "It does not" is removed
or varied across items and preserve the original negated semantics and order.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@website/sidebars/genui.ts`:
- Around line 29-30: The regexes used for language switching (notably the
switchPattern variable and its sibling pattern around line 40) are too strict
and fail on CRLF or altered spacing; update both patterns to allow optional CRLF
and flexible spacing (`\r?` and `\s*` around the pipe and link parts) so they
match both LF and CRLF files and variations like "English |
[简体中文](./readme.zh_cn.md)" with extra spaces; this will ensure the replacement
code around the block that modifies lines 72–75 no longer fails and prevents the
subsequent throw around lines 77–80.

---

Nitpick comments:
In `@packages/genui/a2ui-catalog-extractor/README.md`:
- Around line 35-40: The repeated bullets all start with the same phrase "It
does not …"; update the five list items so openings vary for readability while
keeping meaning — e.g., change some to "Doesn't render A2UI UI.", "Does not
parse TypeScript source text by hand.", "Avoids using the TypeScript compiler
API directly.", "Doesn't require JSON Schema in comments.", "Does not expand
arbitrary imported type aliases or external interfaces."; ensure the unique
repeated token "It does not" is removed or varied across items and preserve the
original negated semantics and order.
🪄 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: ab1cd7fd-2fff-4d88-a94a-b8ca6afcf9a4

📥 Commits

Reviewing files that changed from the base of the PR and between 43353c6 and 2deb133.

📒 Files selected for processing (10)
  • packages/genui/a2ui-catalog-extractor/AGENTS.md
  • packages/genui/a2ui-catalog-extractor/README.md
  • packages/genui/a2ui-catalog-extractor/readme.zh_cn.md
  • packages/genui/a2ui-catalog-extractor/test/extractor.test.ts
  • packages/genui/a2ui-catalog-extractor/test/fixtures/catalog/QuickStartCard.tsx
  • packages/genui/a2ui-catalog-extractor/test/fixtures/expected-catalog/QuickStartCard/catalog.json
  • website/.gitignore
  • website/rspress.config.ts
  • website/sidebars/genui.ts
  • website/sidebars/index.ts

Comment thread website/sidebars/genui.ts
@PupilTong PupilTong merged commit e15852f into lynx-family:main Apr 28, 2026
128 of 134 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.

2 participants