Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Nov 9, 2025

Summary by CodeRabbit

  • New Features

    • Added an interactive tabbed UI to show uninstall commands for npm, pnpm, bun, and yarn.
  • Documentation

    • Updated migration guide with package rename details (zenstack → @zenstackhq/cli, @zenstackhq/runtime → @zenstackhq/orm) and step-by-step uninstall/install examples.

@vercel
Copy link

vercel bot commented Nov 9, 2025

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

Project Deployment Preview Comments Updated (UTC)
zenstack-new-site Ready Ready Preview Comment Nov 9, 2025 3:31pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

Walkthrough

Adds a new React component PackageUninstall that renders tabs with uninstall commands for npm, pnpm, bun, and yarn and integrates it into the v3 migration guide (migrate-v2.md) to show uninstall/install examples for renamed ZenStack packages.

Changes

Cohort / File(s) Summary
New component
versioned_docs/version-3.x/_components/PackageUninstall.tsx
Adds PackageUninstall default-exported React component accepting dependencies: string[], rendering a tab per package manager with a CodeBlock showing the uninstall command concatenated with provided dependencies.
Migration doc update
versioned_docs/version-3.x/migrate-v2.md
Imports and uses PackageUninstall; adds a "Migrating ZenStack Packages" section documenting package renames and showing uninstall/install examples using PackageUninstall and existing PackageInstall components.

Sequence Diagram(s)

sequenceDiagram
  participant Doc as Migration Doc (migrate-v2.md)
  participant Comp as PackageUninstall
  participant UI as Tabbed UI
  participant CB as CodeBlock

  Note over Doc,Comp: Doc imports and renders the component
  Doc->>Comp: <PackageUninstall dependencies=[...]/>
  activate Comp
  Comp->>UI: create tabs [npm,pnpm,bun,yarn]
  UI->>CB: render command for active tab
  CB-->>UI: display uninstall command string
  UI-->>Comp: tab switch (user)
  deactivate Comp
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Small, self-contained TSX component with straightforward rendering logic.
  • Documentation addition only; verify imports, prop typing, and that CodeBlock API matches usage.

Possibly related PRs

  • doc: v2 to v3 migration guide #503: Modifies the same versioned_docs/version-3.x/migrate-v2.md migration file; likely directly related to these documentation/component additions.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding package migration documentation to the v2 migration guide.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/add-pkg-migrate

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f364f1 and 856ef19.

📒 Files selected for processing (1)
  • versioned_docs/version-3.x/_components/PackageUninstall.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • versioned_docs/version-3.x/_components/PackageUninstall.tsx

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.

Copy link
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)
versioned_docs/version-3.x/_components/PackageUninstall.tsx (1)

22-22: Remove unnecessary optional chaining.

The optional chaining dependencies?.length is unnecessary since dependencies is a required prop in the Props interface (line 6).

Apply this diff:

-                        {`${dependencies?.length ? `${pkg.command} ${dependencies.join(' ')}` : ''}`}
+                        {dependencies.length ? `${pkg.command} ${dependencies.join(' ')}` : ''}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7979a01 and 5f364f1.

📒 Files selected for processing (2)
  • versioned_docs/version-3.x/_components/PackageUninstall.tsx (1 hunks)
  • versioned_docs/version-3.x/migrate-v2.md (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
versioned_docs/version-3.x/_components/PackageUninstall.tsx (1)
versioned_docs/version-3.x/_components/PackageInstall.tsx (1)
  • Props (17-31)
🔇 Additional comments (3)
versioned_docs/version-3.x/_components/PackageUninstall.tsx (1)

1-7: LGTM!

The imports and Props interface are correctly defined.

versioned_docs/version-3.x/migrate-v2.md (2)

7-7: LGTM!

The import statement is correctly structured.


44-55: LGTM!

The new "Migrating ZenStack Packages" section is well-structured and clearly documents the package renames. The interactive examples using both PackageUninstall and PackageInstall components provide a good user experience for the migration process.

@ymc9 ymc9 merged commit 5e12739 into main Nov 9, 2025
4 checks passed
@ymc9 ymc9 deleted the docs/add-pkg-migrate branch November 9, 2025 15:31
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