fix: catalog outputs should copy style css#2541
fix: catalog outputs should copy style css#2541Sherry-hue wants to merge 1 commit intolynx-family:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 4ec287b The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughRepository-wide build and packaging changes: new empty changeset added; a2ui package gains an index entry and copy-css script plus exports changes; a2ui-playground build/dev scripts now run Lynx build; catalog extractor CLI entrypoint changed to await and propagate exit codes; TS buildinfo path added. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/genui/a2ui-playground/package.json (1)
9-9: Consider adding a watch mode for Lynx rebuilds in the dev flow.Line 9 runs a one-time
build:lynxbeforersbuild dev. Changes tolynx-src/files during development won't be reflected until the dev server restarts. Add a parallelrspeedy build --watchtask to enable incremental rebuilds alongside the web dev server.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/genui/a2ui-playground/package.json` at line 9, The dev script currently runs the one-time "build:lynx" before "rsbuild dev", so changes under lynx-src/ aren't rebuilt live; update the "dev" NPM script to run a watch build for Lynx in parallel with the web dev server by invoking "rspeedy build --watch" alongside "rsbuild dev" (keep the existing "build:lynx" for initial build or replace it with the watch invocation), using a parallel runner (e.g., concurrently or npm-run-all) so the "dev" script runs both "rspeedy build --watch" and "rsbuild dev" concurrently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/genui/a2ui-playground/package.json`:
- Line 9: The dev script currently runs the one-time "build:lynx" before
"rsbuild dev", so changes under lynx-src/ aren't rebuilt live; update the "dev"
NPM script to run a watch build for Lynx in parallel with the web dev server by
invoking "rspeedy build --watch" alongside "rsbuild dev" (keep the existing
"build:lynx" for initial build or replace it with the watch invocation), using a
parallel runner (e.g., concurrently or npm-run-all) so the "dev" script runs
both "rspeedy build --watch" and "rsbuild dev" concurrently.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: eb21795c-1d8e-4b98-85fe-fe46d3eeef5d
📒 Files selected for processing (3)
.changeset/fruity-bats-divide.mdpackages/genui/a2ui-playground/package.jsonpackages/genui/a2ui/tools/catalog_generator.ts
f269809 to
2d86848
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
2d86848 to
4ec287b
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/genui/a2ui-catalog-extractor/bin/a2ui-catalog-extractor.js`:
- Around line 8-11: Add integration tests that execute the bin entry point and
assert propagation of runCli's return to process exit code: spawn a Node process
to run the built a2ui-catalog-extractor.js entry script and assert exit code 0
when runCli resolves 0 and a non-zero exit code when runCli resolves non-zero;
if unit-testing inside the same runtime, stub/mocking the exported runCli
function (used in the entry module) to return 0 and a non-zero value and require
the entry module in a fresh subprocess or via a module reset to exercise its
top-level await path that sets process.exitCode; include two focused test cases
(zero and non-zero), ensure you restore any stubs and isolate environment
variables so tests are deterministic, and assert process exit code rather than
only runCli behavior.
🪄 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: 1231d2b2-2d01-4bb8-9878-066dcf03f98d
📒 Files selected for processing (7)
.changeset/fruity-bats-divide.mdpackages/genui/a2ui-catalog-extractor/bin/a2ui-catalog-extractor.jspackages/genui/a2ui-playground/package.jsonpackages/genui/a2ui/package.jsonpackages/genui/a2ui/scripts/copy-css.mjspackages/genui/a2ui/src/index.tspackages/genui/a2ui/tsconfig.json
✅ Files skipped from review due to trivial changes (3)
- packages/genui/a2ui/tsconfig.json
- .changeset/fruity-bats-divide.md
- packages/genui/a2ui/src/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/genui/a2ui-playground/package.json
| const exitCode = await runCli(process.argv.slice(2)); | ||
| if (exitCode !== 0) { | ||
| process.exitCode = exitCode; | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify whether CLI entrypoint behavior is already covered by tests.
# Expected: at least one test asserting entrypoint/exit-code behavior.
rg -n -C3 --iglob '**/*.test.{js,ts,jsx,tsx}' \
'runCli|process\.exitCode|a2ui-catalog-extractor' \
packages/genui/a2ui-catalog-extractorRepository: lynx-family/lynx-stack
Length of output: 1306
🏁 Script executed:
# First, let's look at the test that uses runCli to understand what it validates
sed -n '160,200p' packages/genui/a2ui-catalog-extractor/test/extractor.test.tsRepository: lynx-family/lynx-stack
Length of output: 1332
🏁 Script executed:
# Also check if there are any tests specifically for the bin file
rg -n 'a2ui-catalog-extractor\.js|bin.*exit' packages/genui/a2ui-catalog-extractor/test/ -A 3Repository: lynx-family/lynx-stack
Length of output: 48
🏁 Script executed:
# Check the full test file structure to see all tests for runCli
grep -n "runCli" packages/genui/a2ui-catalog-extractor/test/extractor.test.tsRepository: lynx-family/lynx-stack
Length of output: 139
🏁 Script executed:
# Check for any integration tests or bin-level test coverage
find packages/genui/a2ui-catalog-extractor -name '*.test.*' -o -name '*.spec.*' | head -20Repository: lynx-family/lynx-stack
Length of output: 127
🏁 Script executed:
# Check if there are any tests that execute the bin file directly
rg -n 'spawn|execFile|execSync|bin/a2ui' packages/genui/a2ui-catalog-extractor/test/ -A 2Repository: lynx-family/lynx-stack
Length of output: 48
🏁 Script executed:
# Check the actual bin file to confirm the change
cat -n packages/genui/a2ui-catalog-extractor/bin/a2ui-catalog-extractor.jsRepository: lynx-family/lynx-stack
Length of output: 588
Add test coverage for bin entry point exit-code behavior.
The CLI flow changed at lines 8–11 (now uses top-level await and explicit process.exitCode mapping). Add a test to verify both zero and non-zero exit codes from runCli are properly propagated through the bin entry point.
Currently, tests only validate the runCli function directly; the bin entry point's contract is not covered. Consider adding a focused test case or integration test that executes the CLI and asserts exit code behavior.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/genui/a2ui-catalog-extractor/bin/a2ui-catalog-extractor.js` around
lines 8 - 11, Add integration tests that execute the bin entry point and assert
propagation of runCli's return to process exit code: spawn a Node process to run
the built a2ui-catalog-extractor.js entry script and assert exit code 0 when
runCli resolves 0 and a non-zero exit code when runCli resolves non-zero; if
unit-testing inside the same runtime, stub/mocking the exported runCli function
(used in the entry module) to return 0 and a non-zero value and require the
entry module in a fresh subprocess or via a module reset to exercise its
top-level await path that sets process.exitCode; include two focused test cases
(zero and non-zero), ensure you restore any stubs and isolate environment
variables so tests are deterministic, and assert process exit code rather than
only runCli behavior.
Merging this PR will improve performance by 17.27%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | 002-hello-reactLynx-destroyBackground |
893.7 µs | 819.7 µs | +9.03% |
| ⚡ | transform 1000 view elements |
46.9 ms | 40 ms | +17.27% |
Comparing Sherry-hue:fix/catalog-style (4ec287b) with main (e4ace87)
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 External#813 Bundle Size — 680.27KiB (0%).4ec287b(current) vs e4ace87 main#801(baseline) Bundle metrics
|
| Current #813 |
Baseline #801 |
|
|---|---|---|
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 Sherry-hue:fix/catalog-style Project dashboard
Generated by RelativeCI Documentation Report issue
React Example#7697 Bundle Size — 225.38KiB (0%).4ec287b(current) vs e4ace87 main#7685(baseline) Bundle metrics
|
| Current #7697 |
Baseline #7685 |
|
|---|---|---|
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 #7697 |
Baseline #7685 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
79.63KiB |
79.63KiB |
Bundle analysis report Branch Sherry-hue:fix/catalog-style Project dashboard
Generated by RelativeCI Documentation Report issue
React MTF Example#829 Bundle Size — 196.54KiB (0%).4ec287b(current) vs e4ace87 main#817(baseline) Bundle metrics
|
| Current #829 |
Baseline #817 |
|
|---|---|---|
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 #829 |
Baseline #817 |
|
|---|---|---|
111.23KiB |
111.23KiB |
|
85.31KiB |
85.31KiB |
Bundle analysis report Branch Sherry-hue:fix/catalog-style Project dashboard
Generated by RelativeCI Documentation Report issue
Web Explorer#9270 Bundle Size — 900.02KiB (0%).4ec287b(current) vs e4ace87 main#9258(baseline) Bundle metrics
Bundle size by type
|
| Current #9270 |
Baseline #9258 |
|
|---|---|---|
495.88KiB |
495.88KiB |
|
401.92KiB |
401.92KiB |
|
2.22KiB |
2.22KiB |
Bundle analysis report Branch Sherry-hue:fix/catalog-style Project dashboard
Generated by RelativeCI Documentation Report issue
Summary by CodeRabbit
New Features
Bug Fixes
Chores
Checklist