chore: expand a2ui catalog extractor guide#2531
Conversation
|
📝 WalkthroughWalkthroughThis 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will improve performance by 9.06%
|
| 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)
Footnotes
-
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. ↩
React Example#7678 Bundle Size — 225.38KiB (0%).2deb133(current) vs b1809ef main#7667(baseline) Bundle metrics
|
| Current #7678 |
Baseline #7667 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
4 |
4 |
|
179 |
179 |
|
69 |
69 |
|
44.57% |
44.57% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #7678 |
Baseline #7667 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
79.63KiB |
79.63KiB |
Bundle analysis report Branch PupilTong:codex/a2ui-catalog-doc... Project dashboard
Generated by RelativeCI Documentation Report issue
React External#794 Bundle Size — 680.27KiB (0%).2deb133(current) vs b1809ef main#783(baseline) Bundle metrics
|
| Current #794 |
Baseline #783 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
17 |
17 |
|
5 |
5 |
|
8.59% |
8.59% |
|
0 |
0 |
|
0 |
0 |
Bundle analysis report Branch PupilTong:codex/a2ui-catalog-doc... Project dashboard
Generated by RelativeCI Documentation Report issue
Web Explorer#9251 Bundle Size — 900.02KiB (0%).2deb133(current) vs b1809ef main#9240(baseline) Bundle metrics
Bundle size by type
|
| Current #9251 |
Baseline #9240 |
|
|---|---|---|
495.88KiB |
495.88KiB |
|
401.92KiB |
401.92KiB |
|
2.22KiB |
2.22KiB |
Bundle analysis report Branch PupilTong:codex/a2ui-catalog-doc... Project dashboard
Generated by RelativeCI Documentation Report issue
React MTF Example#810 Bundle Size — 196.54KiB (0%).2deb133(current) vs b1809ef main#799(baseline) Bundle metrics
|
| Current #810 |
Baseline #799 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
173 |
173 |
|
66 |
66 |
|
44.08% |
44.08% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #810 |
Baseline #799 |
|
|---|---|---|
111.23KiB |
111.23KiB |
|
85.31KiB |
85.31KiB |
Bundle analysis report Branch PupilTong:codex/a2ui-catalog-doc... Project dashboard
Generated by RelativeCI Documentation Report issue
There was a problem hiding this comment.
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
📒 Files selected for processing (10)
packages/genui/a2ui-catalog-extractor/AGENTS.mdpackages/genui/a2ui-catalog-extractor/README.mdpackages/genui/a2ui-catalog-extractor/readme.zh_cn.mdpackages/genui/a2ui-catalog-extractor/test/extractor.test.tspackages/genui/a2ui-catalog-extractor/test/fixtures/catalog/QuickStartCard.tsxpackages/genui/a2ui-catalog-extractor/test/fixtures/expected-catalog/QuickStartCard/catalog.jsonwebsite/.gitignorewebsite/rspress.config.tswebsite/sidebars/genui.tswebsite/sidebars/index.ts
Summary
readme.zh_cn.mdand package-local AGENTS guidance for keeping the two docs synchronized.QuickStartCardfixture and extend tests for schema generation, full catalog wrapping, and CLI--typedoc-jsonoutput.GenUIsection that exposes the bilingual README content by generating Rspress docs pages under/guide/genui/a2ui-catalog-extractorand/zh/guide/genui/a2ui-catalog-extractor.Validation
fnm exec --using v24.15.0 -- pnpm install --frozen-lockfilefnm exec --using v24.15.0 -- pnpm -C packages/genui/a2ui-catalog-extractor testfnm 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.jsonfnm 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.tsxfnm 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.tsfnm exec --using v24.15.0 -- pnpm eslint website/rspress.config.ts website/sidebars/index.ts website/sidebars/genui.tsfnm exec --using v24.15.0 -- pnpm -C website docsfnm exec --using v24.15.0 -- pnpm -C website build:docsSummary by CodeRabbit