Skip to content

Fix/cli wizzard fixes#774

Merged
michnowak merged 11 commits intomainfrom
fix/cli-wizzard-fixes
Mar 12, 2026
Merged

Fix/cli wizzard fixes#774
michnowak merged 11 commits intomainfrom
fix/cli-wizzard-fixes

Conversation

@michnowak
Copy link
Copy Markdown
Contributor

@michnowak michnowak commented Mar 11, 2026

What does this PR do?

  • My bugfix

Related Ticket(s)

  • Notion Ticket

Key Changes

  • How does the code change address the issue? Describe, at a high level, what was done to affect change.
  • What side effects does this change have? This is the most important question to answer, as it can point out problems where you are making too many changes in one commit or branch. One or two bullet points for related changes may be okay, but five or six are likely indicators of a commit that is doing too many things.

How to test

  • Create a detailed description of what you need to do to set this PR up. ie: Does it need migrations? Do you need to install something?
  • Create a step by step list of what the engineer needs to do to test.

Media (Loom or gif)

  • Insert media here (if applicable)

Summary by CodeRabbit

  • Documentation

    • Removed @latest from create-o2s-app examples across starters, installation, and integrations; improved README formatting and non-interactive examples (added --skip-install flow).
  • New Features

    • Scaffolder now omits workspace-only packages and better manages integration versions for generated projects.
    • Added optional skip-install flag to the CLI and improved post-create guidance recommending separate watch commands.
  • Bug Fixes

    • Fixed compatibility issue between the DXP starter and mocked data.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 11, 2026

Warning

Rate limit exceeded

@michnowak has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 7 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a4ac03da-6b2a-4ada-80e2-c4a698b6a2ac

📥 Commits

Reviewing files that changed from the base of the PR and between 847570f and 4b8fcb5.

📒 Files selected for processing (3)
  • .changeset/breezy-sites-wish.md
  • apps/docs/src/components/HomepageStartersSection/index.tsx
  • packages/cli/create-o2s-app/src/scaffold/index.ts

Walkthrough

Removed @latest from CLI examples, expanded scaffolder's ALWAYS_REMOVE_DIRS, moved selective removal of blocks/integrations into package.json transforms, simplified cleanupProject signature, added integration version capture and propagation, enhanced package-lock cleanup, and updated logger next-step guidance to use watch scripts.

Changes

Cohort / File(s) Summary
Docs / CLI examples
apps/docs/blog/releases/dxp/1.0.0.md, apps/docs/docs/app-starters/dxp/overview.md, apps/docs/docs/app-starters/o2s/overview.md, apps/docs/docs/getting-started/installation.md, apps/docs/docs/integrations/mocked/mocked.md, apps/docs/src/pages/product/starters.tsx
Removed @latest from npx create-o2s-app examples and adjusted one non-interactive example to include --skip-install; updated starter CLI strings.
Changesets / Releases
.changeset/afraid-cooks-battle.md, .changeset/heavy-ties-drop.md, .changeset/rich-friends-travel.md
Added/updated changeset entries documenting releases and CLI/logger fixes.
CLI README
packages/cli/create-o2s-app/README.md
Formatting and alignment improvements in README tables and examples (doc-only).
Constants
packages/cli/create-o2s-app/src/constants.ts
Appended 'packages/blocks' and 'packages/integrations' to ALWAYS_REMOVE_DIRS.
Scaffold: cleanup & flow
packages/cli/create-o2s-app/src/scaffold/cleanup.ts, packages/cli/create-o2s-app/src/scaffold/index.ts
Simplified cleanupProject(projectDir) signature; removed BLOCKS_PATH/INTEGRATIONS_PATH imports and helpers that deleted unselected blocks/integrations; capture integration versions before cleanup and adjust scaffold steps and signature (adds skipInstall, directory).
Transform apps package.json
packages/cli/create-o2s-app/src/scaffold/transform-apps-package-json.ts
Added PRIVATE_PACKAGES; process both dependencies and devDependencies; remove workspace-only/private packages; delete unselected blocks/integrations from correct sections; signature extended to accept selected integrations.
Transform integration configs
packages/cli/create-o2s-app/src/scaffold/transform-integration-configs.ts
updateConfigsPackageJson now uses integrationVersions (not integrationModules); transformIntegrationConfigs reordered to update package.json first and add missing selected integrations using captured versions; signatures updated.
Install / package-lock cleanup
packages/cli/create-o2s-app/src/scaffold/install.ts
installDependencies and cleanPackageLock now accept selectedIntegrations; remove workspace symlink entries, stale ALWAYS_REMOVE_DIRS subpaths, and unselected integrations from nested deps; added helpers isUnselectedIntegration and isRemovedDir.
Logger
packages/cli/create-o2s-app/src/utils/logger.ts
Replaced single npm run dev guidance with multi-line watch-based instructions (npm run watch:deps and npm run watch:apps) and expanded next-step messaging.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Scaffolder
  participant FS as "filesystem / package.json"
  participant Versions as "integration package.jsons"
  participant Cleanup as "cleanupProject"
  participant TransformApps as "transformAppsPackageJson"
  participant TransformConfigs as "transformIntegrationConfigs"
  participant Installer as "installDependencies / package-lock"

  User->>Scaffolder: npx create-o2s-app ...
  Scaffolder->>FS: copy template files to temp/target
  Scaffolder->>Versions: read integration package.jsons (capture integrationVersions)
  Scaffolder->>Cleanup: cleanupProject(targetDir)
  Cleanup->>FS: remove ALWAYS_REMOVE_DIRS & ALWAYS_REMOVE_FILES
  Scaffolder->>TransformApps: transformAppsPackageJson(targetDir, selectedBlocks, selectedIntegrations)
  TransformApps->>FS: read/modify apps package.json (deps & devDeps)
  TransformApps->>FS: write updated package.json
  Scaffolder->>TransformConfigs: transformIntegrationConfigs(targetDir, selectedIntegrations, integrationVersions)
  TransformConfigs->>FS: update configs package.jsons and add missing selected integration deps using integrationVersions
  Scaffolder->>Installer: installDependencies(targetDir, selectedIntegrations)
  Installer->>FS: clean package-lock (remove symlinks, removed dirs, unselected integrations)
  Installer->>FS: run npm install (unless skipInstall)
  Scaffolder->>User: printSummary (watch scripts guidance)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • lukasz-hycom
  • marcinkrasowski
  • tomaszpacior

Poem

🐰 Hopping through the repo with delight,
I unpin the versions and tidy the site,
I prune the packages, capture each version true,
Watch scripts to start — now dev's in view. 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description consists entirely of unfilled template placeholders with no actual content describing the changes, their rationale, testing approach, or side effects. Complete all sections with concrete information: describe the bugfix and its purpose, specify side effects, provide clear setup and testing steps, and indicate any related tickets or media.
Title check ❓ Inconclusive The title 'Fix/cli wizzard fixes' is vague and generic, using non-descriptive language that doesn't clearly convey the specific changes made in the changeset. Revise the title to be more specific about the actual changes, such as 'Remove @latest version specifier from CLI commands' or 'Simplify project scaffolding and integration management'.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/cli-wizzard-fixes
📝 Coding Plan for PR comments
  • Generate coding plan

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 11, 2026

Coverage Report for packages/configs/vitest-config

Status Category Percentage Covered / Total
🔵 Lines 78.68% 1687 / 2144
🔵 Statements 77.64% 1774 / 2285
🔵 Functions 76% 513 / 675
🔵 Branches 65.46% 1107 / 1691
File CoverageNo changed files found.
Generated in workflow #470 for commit 4b8fcb5 by the Vitest Coverage Report Action

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.

Caution

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

⚠️ Outside diff range comments (1)
packages/cli/create-o2s-app/src/constants.ts (1)

9-10: ⚠️ Potential issue | 🟡 Minor

Use the defined constants in ALWAYS_REMOVE_DIRS to avoid string duplication.

The BLOCKS_PATH and INTEGRATIONS_PATH constants (lines 9–10) are actively used in block-discovery.ts and integration-discovery.ts, so they are not dead code. However, the same paths are hardcoded as strings in ALWAYS_REMOVE_DIRS (lines 18, 20), creating unnecessary duplication. Replace the hardcoded strings with references to these constants instead.

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

In `@packages/cli/create-o2s-app/src/constants.ts` around lines 9 - 10, Replace
the hardcoded directory strings in ALWAYS_REMOVE_DIRS with the exported
constants to remove duplication: use BLOCKS_PATH and INTEGRATIONS_PATH (from
constants.ts) instead of repeating 'packages/blocks' and 'packages/integrations'
so ALWAYS_REMOVE_DIRS references those constants directly (update the array
where ALWAYS_REMOVE_DIRS is defined).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/cli/create-o2s-app/src/constants.ts`:
- Around line 9-10: Replace the hardcoded directory strings in
ALWAYS_REMOVE_DIRS with the exported constants to remove duplication: use
BLOCKS_PATH and INTEGRATIONS_PATH (from constants.ts) instead of repeating
'packages/blocks' and 'packages/integrations' so ALWAYS_REMOVE_DIRS references
those constants directly (update the array where ALWAYS_REMOVE_DIRS is defined).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6492bc7b-c81e-408b-95a2-c29dbde80205

📥 Commits

Reviewing files that changed from the base of the PR and between b5c9ee9 and 340b4bb.

📒 Files selected for processing (13)
  • .changeset/afraid-cooks-battle.md
  • apps/docs/blog/releases/dxp/1.0.0.md
  • apps/docs/docs/app-starters/dxp/overview.md
  • apps/docs/docs/app-starters/o2s/overview.md
  • apps/docs/docs/getting-started/installation.md
  • apps/docs/docs/integrations/mocked/mocked.md
  • apps/docs/src/pages/product/starters.tsx
  • packages/cli/create-o2s-app/README.md
  • packages/cli/create-o2s-app/src/constants.ts
  • packages/cli/create-o2s-app/src/scaffold/cleanup.ts
  • packages/cli/create-o2s-app/src/scaffold/index.ts
  • packages/cli/create-o2s-app/src/scaffold/transform-apps-package-json.ts
  • packages/cli/create-o2s-app/src/scaffold/transform-integration-configs.ts

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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/heavy-ties-drop.md:
- Line 2: The changeset is incorrectly marked as a minor release; update the
changeset in ".changeset/heavy-ties-drop.md" so the package entry for
'create-o2s-app' uses the patch release level instead of minor (replace
'create-o2s-app': minor with 'create-o2s-app': patch or otherwise mark the
changeset as a patch), commit the updated changeset file so the package will be
released as a patch.

In `@packages/cli/create-o2s-app/src/utils/logger.ts`:
- Line 41: Replace the shell-dependent combined command string emitted by
console.log (the line printing "npm run watch:deps & npm run watch:apps") with a
platform-agnostic instruction: update the message in
packages/cli/create-o2s-app/src/utils/logger.ts so it tells users to run the two
commands in separate terminals (e.g., show two separate instructions or lines:
"npm run watch:deps" and "npm run watch:apps"), or alternatively mention
providing a cross-platform wrapper script; locate the console.log call that
prints "npm run watch:deps & npm run watch:apps" and change the text to guide
running them separately (or reference the wrapper) so Windows shells are not
broken.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 30fbe8e0-6b2a-4ce2-91d7-2c927730fe37

📥 Commits

Reviewing files that changed from the base of the PR and between 340b4bb and 464b1a1.

📒 Files selected for processing (2)
  • .changeset/heavy-ties-drop.md
  • packages/cli/create-o2s-app/src/utils/logger.ts

Comment thread .changeset/heavy-ties-drop.md
Comment thread packages/cli/create-o2s-app/src/utils/logger.ts Outdated
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
o2s-docs Skipped Skipped Mar 12, 2026 2:18pm

Request Review

@vercel vercel Bot temporarily deployed to Preview – o2s-docs March 12, 2026 13:58 Inactive
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/cli/create-o2s-app/src/scaffold/index.ts (1)

85-89: Avoid cleaning package-lock.json twice on the install path.

installDependencies() already calls cleanPackageLock(), so the normal path reparses and rewrites the lockfile twice. Keep the explicit cleanup only for skipInstall, or delegate it entirely to installDependencies().

Possible simplification
-    await cleanPackageLock(targetDir, selectedIntegrations);
-    if (!skipInstall) {
-        await installDependencies(targetDir, selectedIntegrations);
-    }
+    if (skipInstall) {
+        await cleanPackageLock(targetDir, selectedIntegrations);
+    } else {
+        await installDependencies(targetDir, selectedIntegrations);
+    }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/create-o2s-app/src/scaffold/index.ts` around lines 85 - 89, The
code currently calls cleanPackageLock(targetDir, selectedIntegrations)
unconditionally and then calls installDependencies(...) which itself calls
cleanPackageLock(), causing duplicate work; modify the scaffold sequence so
cleanPackageLock is only invoked when skipInstall is true (i.e., keep the
explicit cleanPackageLock call inside an if (skipInstall) branch) and remove the
unconditional pre-install call, or alternatively remove the call here entirely
and rely on installDependencies(targetDir, selectedIntegrations) to perform the
cleanup; update references to cleanPackageLock, installDependencies, targetDir,
selectedIntegrations, and skipInstall accordingly.
🤖 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/cli/create-o2s-app/src/scaffold/index.ts`:
- Around line 22-28: The loop over selectedIntegrations currently skips missing
integration metadata and falls back to '0.0.0'; instead, in the block using
selectedIntegrations, INTEGRATIONS_PATH, path.join and pkgPath, fail fast: if
fs.pathExists(pkgPath) returns false throw a descriptive Error mentioning the
integration name and expected pkgPath, and after reading the JSON with
fs.readJson ensure pkg.version exists (not null/undefined) and throw if missing;
this guarantees versions[name] only gets valid versions and prevents silently
omitted or pinned-to-0.0.0 integrations.

---

Nitpick comments:
In `@packages/cli/create-o2s-app/src/scaffold/index.ts`:
- Around line 85-89: The code currently calls cleanPackageLock(targetDir,
selectedIntegrations) unconditionally and then calls installDependencies(...)
which itself calls cleanPackageLock(), causing duplicate work; modify the
scaffold sequence so cleanPackageLock is only invoked when skipInstall is true
(i.e., keep the explicit cleanPackageLock call inside an if (skipInstall)
branch) and remove the unconditional pre-install call, or alternatively remove
the call here entirely and rely on installDependencies(targetDir,
selectedIntegrations) to perform the cleanup; update references to
cleanPackageLock, installDependencies, targetDir, selectedIntegrations, and
skipInstall accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f26efa50-1d9c-4ae9-b02a-5e89afa7bac6

📥 Commits

Reviewing files that changed from the base of the PR and between ebb9ef7 and 847570f.

📒 Files selected for processing (4)
  • .changeset/rich-friends-travel.md
  • packages/cli/create-o2s-app/src/scaffold/index.ts
  • packages/cli/create-o2s-app/src/scaffold/install.ts
  • packages/cli/create-o2s-app/src/scaffold/transform-integration-configs.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/cli/create-o2s-app/src/scaffold/transform-integration-configs.ts

Comment thread packages/cli/create-o2s-app/src/scaffold/index.ts
@vercel vercel Bot temporarily deployed to Preview – o2s-docs March 12, 2026 14:18 Inactive
@michnowak michnowak merged commit a1659cf into main Mar 12, 2026
14 checks passed
@michnowak michnowak deleted the fix/cli-wizzard-fixes branch March 12, 2026 14:37
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