Skip to content

feat(vue): add @modular-vue/cli scaffolder (PR-50) - #82

Merged
kibertoad merged 3 commits into
mainfrom
claude/vuejs-support-next-phase-buv0ab
Jul 17, 2026
Merged

feat(vue): add @modular-vue/cli scaffolder (PR-50)#82
kibertoad merged 3 commits into
mainfrom
claude/vuejs-support-next-phase-buv0ab

Conversation

@kibertoad

@kibertoad kibertoad commented Jul 17, 2026

Copy link
Copy Markdown
Owner

What & why

Ships PR-50 from the Vue support tracker: @modular-vue/cli (binary modular-vue), the Vue 3 + vue-router scaffolder, completing the tooling phase of the Vue initiative. It's a preset over the shared cli-core engine — the Vue counterpart of @react-router-modules/cli / @tanstack-react-modules/cli. With this, all three families scaffold through the same commands (init, create module|store|journey|catalog) and only the emitted code differs.

New package packages/vue-cli (@modular-vue/cli, 1.0.0). The preset supplies:

  • Vue <script setup> SFC template bodies: shell layout components (RootLayout root, ShellLayout chrome with command slots + a useZones detail panel, Sidebar, Home), module pages, a route-zone detail panel.
  • A core-createStore storeFile (decision D3) and auth/config stores.
  • @modular-vue/journeys journey definition + createWebStoragePersistence bodies.
  • The createSharedComposables app-shared contract, including the global RouteMeta augmentation for typed meta.
  • The vue / vue-router / vue-tsc package.json + tsconfig bodies and a root vitest.config.ts (with @vitejs/plugin-vue).

The generated shell owns the vue-router router and grafts module routes under a named root layout route via createModularApp.

Enabling cli-core change (the PR-04 follow-through). The preset gained a scaffold block carrying the entry/view file extensions (main.ts + .vue vs main.tsx + .tsx) and optional overrides for the framework-neutral package.json / tsconfig / root-vitest.config.ts bodies. init.ts, create-module.ts, and transform.ts now read the entry filename and the journeys binding name from the preset instead of hardcoding main.tsx / @modular-react/journeys. React presets set only entryMain / viewExt, so cli-core still emits its React-family defaults byte-identically.

Two framework-forced choices (documented inline + in the tracker):

  • Module route paths are absolute (/dashboard): vue-router rejects relative top-level paths, and @modular-vue/testing's renderModule mounts a module's createRoutes() output in isolation. An absolute child still renders inside the shell's <router-view> when grafted under the named root route.
  • AppZones values are typed UiComponent, not vue's Component: useZones<AppZones>()'s ZoneMapOf constraint requires the neutral UiComponent, which an SFC default export satisfies but vue's broader Component union does not. docs/shell-patterns-vue-router.md is corrected to match.

How it was verified

  • React byte-identical guard: react-router (16) and tanstack (11) full-tree snapshot suites stay green after the cli-core changes.
  • Vue CLI suite: 13 cli-testlab tests including a full generated-tree snapshot (init + create module/store/journey --persistence).
  • Generated app typechecks + tests, end-to-end: scaffolded a project inside the workspace and confirmed all five packages pass vue-tsc --noEmit and the generated module tests pass through renderModule (with @vitejs/plugin-vue in the generated root vitest.config.ts).
  • oxlint clean on the new/changed files; affected packages typecheck.
  • Tracker + READMEs + getting-started/shell-patterns docs updated in this PR.

Checklist

  • pnpm lint passes (typecheck + oxfmt + oxlint) for the changed packages.
  • Tests cover the change and pass (pnpm test — react 16, tanstack 11, vue 13).
  • Docs / READMEs / tracker updated in the same PR.
  • Vue impact stated. This is a Vue-family + cli-core change. The cli-core edits are framework-neutral (guarded by the byte-identical React snapshots); the Vue work is delivered here, closing PR-50 in the tracker. No further Vue follow-up needed.

🤖 Generated with Claude Code

https://claude.ai/code/session_0185QobcTYoTHWKLhwA3T1fV


Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Added the modular-vue CLI for scaffolding Vue 3 and Vue Router workspaces.
    • Added commands to initialize projects and generate modules, stores, journeys, and catalogs.
    • Generated projects now include Vue layouts, routing, shared services, tests, and optional journey persistence.
    • Added framework-aware scaffolding for configurable file extensions and project templates.
  • Documentation

    • Updated Vue quickstarts, CLI usage guidance, and support tracking.
    • Clarified type-safe route metadata patterns using framework-neutral component types.

Adds `@modular-vue/cli` (binary `modular-vue`), the Vue 3 + vue-router
scaffolder, as a preset over the shared `cli-core` engine — the Vue
counterpart of the React CLIs.

The preset supplies Vue SFC template bodies (shell layout components,
module pages, a route-zone detail panel, Home), a core-`createStore`
`storeFile`, `@modular-vue/journeys` journey definition + persistence
bodies, the `createSharedComposables` app-shared contract with the
`RouteMeta` augmentation, and the `vue` / `vue-router` / `vue-tsc`
package.json + tsconfig bodies. `init`, `create module`, `create store`,
`create journey`, and `create catalog` all work; the generated shell
owns the router via `createModularApp` with module routes grafted under
a named `root` layout route.

cli-core is now framework-pluggable at the package.json/entry-file layer:
the preset gained a `scaffold` block carrying the entry/view extensions
(`main.ts` + `.vue` vs `main.tsx` + `.tsx`) and optional overrides for
the neutral package.json / tsconfig / root vitest.config bodies.
`init.ts`, `create-module.ts`, and `transform.ts` read the entry
filename and journeys binding name from the preset instead of
hardcoding `main.tsx` / `@modular-react/journeys`. React presets set
only `entryMain` / `viewExt`, so cli-core still emits its React-family
defaults byte-identically — guarded by the existing react-router (16)
and tanstack (11) snapshot tests, which stay green.

Verified end-to-end in the workspace: a generated project typechecks
clean across all five packages (`vue-tsc --noEmit`) and its module tests
pass through `renderModule`. The CLI's own suite is 13 tests including a
full-tree snapshot.

Two framework-forced choices: module route paths are absolute
(vue-router rejects relative top-level paths, and `renderModule` mounts
`createRoutes()` output in isolation), and `AppZones` values are typed
`UiComponent` (vue's broader `Component` fails `useZones`'s `ZoneMapOf`
constraint). The shell-patterns doc is corrected accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185QobcTYoTHWKLhwA3T1fV
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kibertoad, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 30 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 990a97c4-ea8f-45e1-ac45-b8f5e82130f3

📥 Commits

Reviewing files that changed from the base of the PR and between efb5094 and 9c031a5.

📒 Files selected for processing (8)
  • README.md
  • docs/vue-support-tracker.md
  • packages/cli-core/src/commands/create-journey.ts
  • packages/cli-core/src/preset.ts
  • packages/cli-core/src/utils/transform.ts
  • packages/vue-cli/src/preset.ts
  • packages/vue-cli/src/templates/scaffold.ts
  • packages/vue-cli/test/cli.test.ts
📝 Walkthrough

Walkthrough

This PR adds the shipped @modular-vue/cli, introduces preset-driven scaffolding contracts in cli-core, generates Vue workspace templates, updates journey and entry-file wiring, adds end-to-end CLI coverage, and refreshes Vue documentation.

Changes

Vue CLI scaffolding

Layer / File(s) Summary
Preset scaffold contract
packages/cli-core/src/preset.ts, packages/cli-core/src/index.ts, packages/react-router-cli/src/preset.ts, packages/tanstack-router-cli/src/preset.ts
Presets now define scaffold entry files, view extensions, and optional framework-specific template overrides.
Configurable cli-core generation
packages/cli-core/src/commands/*, packages/cli-core/src/utils/transform.ts
Initialization and create commands use preset overrides, configurable filenames, entry files, and journeys package identifiers.
Vue CLI package and templates
packages/vue-cli/package.json, packages/vue-cli/src/*, packages/vue-cli/tsconfig.json
Adds the modular-vue executable, Vue preset, workspace package templates, shared contracts, shell, module, store, and journey generators.
CLI validation
packages/vue-cli/test/cli.test.ts
Adds end-to-end coverage for initialization, generated artifacts, wiring, guards, naming, catalog setup, and deterministic output.
Documentation and status
README.md, docs/getting-started-vue-router.md, docs/shell-patterns-vue-router.md, docs/vue-support-tracker.md, packages/vue-cli/README.md
Documents Vue CLI usage, generated structures, framework-neutral zone typing, and completed tooling status.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant modular-vue
  participant vuePreset
  participant GeneratedWorkspace
  Developer->>modular-vue: run init or create command
  modular-vue->>vuePreset: load scaffold configuration and templates
  vuePreset->>GeneratedWorkspace: write Vue workspace files
  modular-vue->>GeneratedWorkspace: wire modules, stores, and journeys
  GeneratedWorkspace-->>Developer: generated project tree
Loading

Possibly related PRs

Suggested labels: major

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.79% 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 clearly summarizes the main change: adding the @modular-vue/cli scaffolder for Vue.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/vuejs-support-next-phase-buv0ab

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 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/vue-cli/package.json`:
- Around line 22-24: Update the test script in packages/vue-cli/package.json so
it builds the CLI before running Vitest, ensuring dist/cli.js exists for
cli.test.ts during a clean pnpm test. Reuse the existing build script and
preserve the current Vitest invocation.
- Around line 37-38: Update the node engine constraint in the packages/vue-cli
package.json engines configuration from >=22.0.0 to >=22.12.0, ensuring Vue CLI
users meet Vite 8.1.3’s supported runtime requirement.

In `@README.md`:
- Line 52: The Vue parity status in README.md should match the tracker’s
full-parity status. Update the `@modular-vue/`* description to remove the claim
that two follow-ups remain, while preserving the existing version and setup
guidance. Keep docs/vue-support-tracker.md:3-3 as the authoritative full-parity
status; no direct change is required there.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 82d6af98-bbe9-4e88-b2b1-350f9aee6fce

📥 Commits

Reviewing files that changed from the base of the PR and between 1e05a99 and efb5094.

⛔ Files ignored due to path filters (2)
  • packages/vue-cli/test/__snapshots__/cli.test.ts.snap is excluded by !**/*.snap
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (25)
  • README.md
  • docs/getting-started-vue-router.md
  • docs/shell-patterns-vue-router.md
  • docs/vue-support-tracker.md
  • packages/cli-core/src/commands/create-journey.ts
  • packages/cli-core/src/commands/create-module.ts
  • packages/cli-core/src/commands/create-store.ts
  • packages/cli-core/src/commands/init.ts
  • packages/cli-core/src/index.ts
  • packages/cli-core/src/preset.ts
  • packages/cli-core/src/utils/transform.ts
  • packages/react-router-cli/src/preset.ts
  • packages/tanstack-router-cli/src/preset.ts
  • packages/vue-cli/README.md
  • packages/vue-cli/package.json
  • packages/vue-cli/src/cli.ts
  • packages/vue-cli/src/preset.ts
  • packages/vue-cli/src/templates/app-shared.ts
  • packages/vue-cli/src/templates/journey.ts
  • packages/vue-cli/src/templates/module.ts
  • packages/vue-cli/src/templates/scaffold.ts
  • packages/vue-cli/src/templates/shell.ts
  • packages/vue-cli/src/templates/store.ts
  • packages/vue-cli/test/cli.test.ts
  • packages/vue-cli/tsconfig.json

Comment thread packages/vue-cli/package.json
Comment thread packages/vue-cli/package.json
Comment thread README.md Outdated
kibertoad and others added 2 commits July 17, 2026 18:19
…next-phase-buv0ab

# Conflicts:
#	docs/vue-support-tracker.md
…, sync docs

- cli-core: add optional PresetPackages.journeysVersion so the shell's direct
  journeys dep can track the preset's own family version instead of falling
  back to the React RUNTIME_VERSIONS.journeys constant. React presets omit it
  and stay byte-identical (snapshot tests unchanged).
- vue-cli: pin the shell's @modular-vue/journeys dep to the Vue family range
  (MODULAR_VUE_VERSION) via the new preset field, keeping it in sync with the
  generated journey packages from one source.
- vue-cli: add standalone `create catalog` tests (wire into existing workspace
  + reject when already configured).
- README: mark @modular-vue/* at full parity (both follow-ups PR-43/PR-44 have
  landed per the tracker).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018YU4kALmunKmR8YxLaqAz8
@kibertoad kibertoad added the skip-release label Jul 17, 2026 — with Claude
@kibertoad
kibertoad merged commit 4458c7b into main Jul 17, 2026
21 of 22 checks passed
@kibertoad
kibertoad deleted the claude/vuejs-support-next-phase-buv0ab branch July 17, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants