Skip to content

fix:cli-wizard-fixes#767

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

fix:cli-wizard-fixes#767
michnowak merged 2 commits intomainfrom
fix/cli-wizzard-fixes

Conversation

@michnowak
Copy link
Copy Markdown
Contributor

@michnowak michnowak commented Mar 10, 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

  • Bug Fixes

    • Fixed issues related to DXP starter and mocked data in the scaffolding process.
  • Refactor

    • Simplified project cleanup logic during scaffolding.
    • Improved package.json handling to consistently process both dependency types.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 10, 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 10, 2026 3:48pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 10, 2026

Walkthrough

The project scaffolding cleanup process is refactored. ALWAYS_REMOVE_DIRS constant is expanded to include packages/blocks and packages/integrations. The cleanupProject function is simplified—its signature changed to accept only projectDir, removing dependencies on user-selected block and integration names. Package.json transformation logic is extended to process both dependencies and devDependencies, filtering out private workspace packages and unselected dependencies.

Changes

Cohort / File(s) Summary
Changeset
.changeset/afraid-cooks-battle.md
Major release entry for create-o2s-app package with fix note related to dxp starter and mocked data.
Directory Removal Configuration
packages/cli/create-o2s-app/src/constants.ts
ALWAYS_REMOVE_DIRS expanded to include packages/blocks and packages/integrations.
Cleanup Logic Refactoring
packages/cli/create-o2s-app/src/scaffold/cleanup.ts, packages/cli/create-o2s-app/src/scaffold/index.ts
cleanupProject signature simplified from (projectDir, selectedBlockNames, selectedIntegrationNames) to (projectDir). Helper functions for conditional block/integration removal eliminated; logic now only iterates predefined ALWAYS_REMOVE_DIRS and ALWAYS_REMOVE_FILES.
Package Dependency Transformation
packages/cli/create-o2s-app/src/scaffold/transform-apps-package-json.ts
Extended to handle both dependencies and devDependencies sections. Introduces PRIVATE_PACKAGES list and adds filtering for private packages, unselected blocks, and unselected integrations. Signature updated to include selectedIntegrationNames parameter.
Integration Config Updates
packages/cli/create-o2s-app/src/scaffold/transform-integration-configs.ts
Simplified removeUnselectedIntegrations logic; removed integrationModules parameter from updateConfigsPackageJson and eliminated dependency addition for selected integrations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • marcinkrasowski

Poem

🐰 Tidy burrows, clean and neat,
Old selections now obsolete,
Fixed removals, paths so true,
Dependencies refreshed anew,
Scaffold hops with simpler ways!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description consists entirely of placeholder template text with no actual details filled in about the bugfix, key changes, side effects, or testing procedures. Complete the description by replacing all placeholder text with concrete details about what the bugfix addresses, how the code changes solve it, potential side effects, and step-by-step testing instructions.
Title check ❓ Inconclusive The title 'fix:cli-wizard-fixes' is vague and generic, using non-descriptive terms that don't convey meaningful information about the specific changes. Replace with a more specific title that clearly describes the primary change, such as 'Simplify CLI wizard cleanup and package.json transformation' or similar.
✅ 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 docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 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

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.

@michnowak michnowak marked this pull request as ready for review March 10, 2026 15:53
@michnowak michnowak enabled auto-merge (squash) March 10, 2026 15:56
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.

🧹 Nitpick comments (1)
packages/cli/create-o2s-app/src/constants.ts (1)

18-20: Consider using existing constants for consistency.

The values 'packages/blocks' and 'packages/integrations' are duplicated with BLOCKS_PATH and INTEGRATIONS_PATH defined at lines 9-10. Using those constants in ALWAYS_REMOVE_DIRS would improve maintainability.

♻️ Suggested refactor
 export const ALWAYS_REMOVE_DIRS: string[] = [
     '.git',
     '.github',
     '.changeset',
     'apps/docs',
-    'packages/blocks',
+    BLOCKS_PATH,
     'packages/framework',
-    'packages/integrations',
+    INTEGRATIONS_PATH,
     'packages/modules',
     'packages/utils',
     'packages/cli',
     'packages/telemetry',
 ];
🤖 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 18 - 20,
ALWAYS_REMOVE_DIRS currently duplicates string literals; update it to use the
existing constants BLOCKS_PATH and INTEGRATIONS_PATH instead of hard-coded
'packages/blocks' and 'packages/integrations'. Locate the ALWAYS_REMOVE_DIRS
array and replace those two entries with the constants BLOCKS_PATH and
INTEGRATIONS_PATH (ensuring they are defined above or imported in this file) so
the values remain single-source-of-truth.
🤖 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/cli/create-o2s-app/src/constants.ts`:
- Around line 18-20: ALWAYS_REMOVE_DIRS currently duplicates string literals;
update it to use the existing constants BLOCKS_PATH and INTEGRATIONS_PATH
instead of hard-coded 'packages/blocks' and 'packages/integrations'. Locate the
ALWAYS_REMOVE_DIRS array and replace those two entries with the constants
BLOCKS_PATH and INTEGRATIONS_PATH (ensuring they are defined above or imported
in this file) so the values remain single-source-of-truth.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c796a11c-ff33-4473-8d41-84bda0029d0f

📥 Commits

Reviewing files that changed from the base of the PR and between f60ab81 and 88cc49a.

📒 Files selected for processing (6)
  • .changeset/afraid-cooks-battle.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

@github-actions
Copy link
Copy Markdown
Contributor

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 #454 for commit 88cc49a by the Vitest Coverage Report Action

@michnowak michnowak merged commit 1df1ec2 into main Mar 11, 2026
13 checks passed
@michnowak michnowak deleted the fix/cli-wizzard-fixes branch March 11, 2026 07:17
@coderabbitai coderabbitai bot mentioned this pull request Mar 11, 2026
1 task
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