Skip to content

fix(genui-cli): export dist files#2802

Merged
HuJean merged 1 commit into
mainfrom
p/fix-genuicli
Jun 5, 2026
Merged

fix(genui-cli): export dist files#2802
HuJean merged 1 commit into
mainfrom
p/fix-genuicli

Conversation

@HuJean
Copy link
Copy Markdown
Collaborator

@HuJean HuJean commented Jun 5, 2026

Summary by CodeRabbit

  • Chores

    • Package distribution updated to include CLI files and resources.
    • Build configuration updated to track CLI build artifacts during compilation.
    • Release metadata bumped noting the GenUI CLI TypeScript refactor.
  • Documentation

    • Added CLI instructions and expanded README documenting the new create workflow and options.
  • New Features

    • New "genui a2ui create" workflow for generating projects with improved dependency version resolution.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 5, 2026

🦋 Changeset detected

Latest commit: b9d0a4e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lynx-js/genui Patch

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

@HuJean HuJean marked this pull request as ready for review June 5, 2026 03:07
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 5, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

Adds CLI artifacts to package publishing and Turbo build caching, updates CLI docs and rstest config, removes workspace devDeps from the nested CLI manifest, and refactors the A2UI create flow to resolve workspace dependency versions from multiple loaded manifests.

Changes

GenUI CLI integration

Layer / File(s) Summary
Package publishing and changeset
packages/genui/package.json, .changeset/fruity-months-add.md
The files whitelist now includes cli/dist, cli/templates, and cli/README.md; a changeset bumps @lynx-js/genui (patch) and notes the CLI moved to TypeScript.
Turbo build inputs/outputs
packages/genui/turbo.json
Turbo build inputs now include CLI bin/src/package/tsconfig files and templates; outputs adds cli/dist/**.
Parent package devDependencies
packages/genui/package.json
Adds workspace-scoped devDependencies: @lynx-js/qrcode-rsbuild-plugin, @lynx-js/react, @lynx-js/react-rsbuild-plugin, @lynx-js/rspeedy.
CLI package manifest cleanup
packages/genui/cli/package.json
Remove workspace-scoped @lynx-js/* devDependencies from the nested CLI manifest.
CLI README and maintainer instructions
packages/genui/cli/README.md, .github/genui-cli.instructions.md
Document genui a2ui create usage and add guidance to resolve template dependency versions from the parent package manifest rather than the nested CLI manifest.
Include CLI tests in rstest runner
rstest.config.ts
Add packages/genui/cli/rstest.config.ts to the rstest projects array so CLI tests are included.
PackageManifest type for resolution
packages/genui/cli/src/a2ui/create.ts
Introduce PackageManifest interface representing loaded manifests for version resolution.
Resolve version map from manifests
packages/genui/cli/src/a2ui/create.ts
Construct versionMap by loading parent and CLI manifests and pass them into the resolver instead of only using CLI devDependencies.
Manifest-driven resolveVersionMap
packages/genui/cli/src/a2ui/create.ts
Replace dev-deps-only resolver with a manifest-aware implementation that walks dependencies, devDependencies, optionalDependencies, and peerDependencies, resolves workspace:* specifiers, and preserves non-catalog versions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • PupilTong
  • Sherry-hue
  • gaoachao

Poem

🐇
I hopped through manifests, near and far,
bundled templates, tucked in tar.
Resolved versions, careful and neat—
generated projects now have the right beat.
A tiny rabbit cheers the CLI star!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.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 'fix(genui-cli): export dist files' accurately describes the main change—expanding the npm files whitelist to include CLI dist artifacts, which enables proper export of the compiled CLI 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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch p/fix-genuicli

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 Jun 5, 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!

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 5, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@lynx-js/genui@2802

commit: b9d0a4e

gaoachao
gaoachao previously approved these changes Jun 5, 2026
@HuJean HuJean enabled auto-merge (squash) June 5, 2026 03:31
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 5, 2026

Merging this PR will not alter performance

✅ 87 untouched benchmarks
⏩ 26 skipped benchmarks1


Comparing p/fix-genuicli (b9d0a4e) with main (78e2966)

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

UI Judge

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

Dimension Weight Average Results Status
Usability & Interaction 30% 3 / 5 8 OK
Visual & Aesthetics 25% 3.3 / 5 8 OK
Consistency & Standards 15% 3.1 / 5 8 OK
Architecture & UX Writing 15% 3.1 / 5 8 OK
Accessibility & Performance 15% 2.8 / 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 3 / 5 2 / 5 2 / 5 2 / 5 45 / 100 preview OK
2 cast-grid 5 / 5 3 / 5 4 / 5 5 / 5 5 / 5 3 / 5 77 / 100 preview OK
3 citywalk-list 2 / 5 3 / 5 3 / 5 2 / 5 2 / 5 2 / 5 51 / 100 preview OK
4 fridge-search 3 / 5 3 / 5 3 / 5 4 / 5 3 / 5 3 / 5 63 / 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 5 / 5 4 / 5 89 / 100 preview OK
7 product-card 5 / 5 4 / 5 4 / 5 4 / 5 4 / 5 4 / 5 80 / 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: 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 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: 3 / 5 (30%)
    • Visual & Aesthetics: 4 / 5 (25%)
    • Consistency & Standards: 5 / 5 (15%)
    • Architecture & UX Writing: 5 / 5 (15%)
    • Accessibility & Performance: 3 / 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: 3 / 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: 3 / 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: 5 / 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: 4 / 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

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/genui/cli/src/a2ui/create.ts (1)

143-149: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Handle all workspace: forms during dependency rewrite

Only workspace:* is currently replaced. If a template uses workspace:^/workspace:~, the specifier is left behind and can leak into generated package.json.

Suggested fix
-      if (deps[name] === 'workspace:*') {
+      if (deps[name]?.startsWith('workspace:')) {
         const resolved = versionMap[name]
           ?? resolvePackageVersion(name, requireFn);
         if (resolved) {
           deps[name] = resolved;
         }
       }
🤖 Prompt for 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.

In `@packages/genui/cli/src/a2ui/create.ts` around lines 143 - 149, The current
check only matches the exact string 'workspace:*' and misses other workspace
specifiers like 'workspace:^' or 'workspace:~', so change the condition to
detect any workspace: prefix (e.g., use deps[name]?.startsWith('workspace:')) in
the dependency rewrite block where deps[name] is checked, then resolve the
version the same way (using versionMap[name] ?? resolvePackageVersion(name,
requireFn)) and replace deps[name] with the resolved version; references:
deps[name], versionMap, resolvePackageVersion, requireFn.
🤖 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 `@packages/genui/package.json`:
- Around line 116-119: Update the three new devDependency entries that use the
workspace:^ protocol to use workspace:* for consistency with the existing
manifest; specifically change the package specifiers for
"`@lynx-js/qrcode-rsbuild-plugin`", "`@lynx-js/react`", and
"`@lynx-js/react-rsbuild-plugin`" (and "`@lynx-js/rspeedy`") from "workspace:^" to
"workspace:*" in package.json so they match the other workspace dependencies.

---

Outside diff comments:
In `@packages/genui/cli/src/a2ui/create.ts`:
- Around line 143-149: The current check only matches the exact string
'workspace:*' and misses other workspace specifiers like 'workspace:^' or
'workspace:~', so change the condition to detect any workspace: prefix (e.g.,
use deps[name]?.startsWith('workspace:')) in the dependency rewrite block where
deps[name] is checked, then resolve the version the same way (using
versionMap[name] ?? resolvePackageVersion(name, requireFn)) and replace
deps[name] with the resolved version; references: deps[name], versionMap,
resolvePackageVersion, requireFn.
🪄 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: 61bc6ddc-22ee-4f91-8610-6552cfd23b57

📥 Commits

Reviewing files that changed from the base of the PR and between 1968c94 and b9d0a4e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • .changeset/fruity-months-add.md
  • .github/genui-cli.instructions.md
  • packages/genui/cli/README.md
  • packages/genui/cli/package.json
  • packages/genui/cli/src/a2ui/create.ts
  • packages/genui/package.json
  • packages/genui/turbo.json
  • rstest.config.ts
💤 Files with no reviewable changes (1)
  • packages/genui/cli/package.json
✅ Files skipped from review due to trivial changes (4)
  • rstest.config.ts
  • packages/genui/cli/README.md
  • .github/genui-cli.instructions.md
  • .changeset/fruity-months-add.md

Comment thread packages/genui/package.json
@HuJean HuJean merged commit d6eea41 into main Jun 5, 2026
107 of 112 checks passed
@HuJean HuJean deleted the p/fix-genuicli branch June 5, 2026 08:53
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