Skip to content

Conversation

@ffgenius
Copy link
Contributor

@ffgenius ffgenius commented Jan 31, 2026

Description

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Checklist

ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in CONTRIBUTING.

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs:dev command.
  • Run the tests with pnpm test.
  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • Refactor
    • Migrated the app to a new UI library to standardize components and locales.
    • Updated modals, image preview, and upload behaviors for improved open/close and cleanup semantics.
    • Adjusted notification and message payloads and durations to match the new library’s API.
    • Aligned table and form components with the new UI primitives for consistent look-and-feel.

@changeset-bot
Copy link

changeset-bot bot commented Jan 31, 2026

⚠️ No Changeset found

Latest commit: 0efd2f1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 31, 2026

📝 Walkthrough

Walkthrough

This PR replaces ant-design-vue with antdv-next across the web-antd app: package and workspace entries, imports, component adapters, locale and message/notification usage, and updates API shapes (e.g., visible→open, onVisibleChange→onOpenChange, message→title).

Changes

Cohort / File(s) Summary
Dependency Configuration
apps/web-antd/package.json, pnpm-workspace.yaml
Replace ant-design-vue with antdv-next in package and add antdv-next to workspace catalog.
Adapter — Components
apps/web-antd/src/adapter/component/index.ts
Bulk migration of imports and component wrappers from ant-design-vueantdv-next; updated Upload/Image preview APIs (visible→open, onVisibleChange→onOpenChange), modal destroy prop (destroyOnClose→destroyOnHidden), rename Upload wrapper name to 'AUpload', and adjust notification payloads (message→title).
Adapter — Table
apps/web-antd/src/adapter/vxe-table.ts
Import sources switched for Button and Image from ant-design-vueantdv-next.
Core & Boot
apps/web-antd/src/app.vue, apps/web-antd/src/locales/index.ts
Swap imports for ConfigProvider, theme, and locale modules to antdv-next equivalents.
Utilities & Services
apps/web-antd/src/api/request.ts, apps/web-antd/src/router/access.ts
Switched message import source to antdv-next, no control-flow changes.
State, Views & Demos
apps/web-antd/src/store/auth.ts, apps/web-antd/src/views/_core/profile/password-setting.vue, apps/web-antd/src/views/demos/antd/index.vue
Switched message/notification imports to antdv-next; adjusted notification payloads to use title and updated durations where shown.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

feature

Suggested reviewers

  • anncwb
  • vince292007
  • jinmao88
  • mynetfan

Poem

🐰 Hopped through imports, bold and quick,
swapped old leaves for antdv-next's pick.
Modals open, previews hum a tune,
Notifications sparkle like the moon.
A tiny rabbit cheers the new UI!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is entirely empty—it only contains the template structure with no implementation details, context, migration steps, or explanation of the changes made. Add a detailed description explaining the migration scope, rationale, API changes (e.g., visible→open, onVisibleChange→onOpenChange), testing performed, and any breaking changes or compatibility concerns.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(deps): migrate antdv to antdv-next' clearly and specifically describes the main change—migrating the dependency from ant-design-vue to antdv-next.

✏️ 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

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.

@ffgenius
Copy link
Contributor Author

#7346

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

🤖 Fix all issues with AI agents
In `@apps/web-antd/package.json`:
- Line 44: The project added the antdv-next dependency but its global styles
aren't imported; open bootstrap.ts, locate the existing import for
"@vben/styles/antd" and immediately after it add explicit imports for
antdv-next's styles (the reset and component CSS) so the UI components render
correctly; ensure the two imports are placed near the top of bootstrap.ts
alongside other global style imports to guarantee they are bundled.

In `@apps/web-antd/src/views/demos/antd/index.vue`:
- Around line 26-32: The notification config passed in notify(type:
NotificationType) incorrectly includes a redundant type property; remove the
type field from the object passed to notification[type] so the method call
(notification[type](...)) drives the notification type and the config only
contains duration and title; update the notify function (and any similar calls
using notification and NotificationType) to stop passing type in the config
object.

In `@pnpm-workspace.yaml`:
- Line 75: The pinned dependency antdv-next (^1.0.0-rc.8) is ESM-only and
requires consumers to use ESM and modern TS resolution; verify all downstream
packages that consume antdv-next can run as ESM (or migrate them), replace or
pin to a CJS-compatible release if any consumer must remain CommonJS, and update
TypeScript configs (tsconfig.json) for affected packages to use
moduleResolution: "Node16" / "NodeNext" or "Bundler" so .d.mts types resolve;
also audit import sites to only use supported export subpaths (e.g.,
antdv-next/date-picker, antdv-next/locale) rather than undocumented deep
imports.
🧹 Nitpick comments (2)
apps/web-antd/src/adapter/component/index.ts (2)

378-379: Component name hardcoded to 'AUpload'.

The component name was changed from Upload.name to the hardcoded string 'AUpload'. This is acceptable if antdv-next's Upload component doesn't expose a stable .name property, but verify this is intentional.


38-101: Refactor to use top-level imports instead of internal dist paths.

The code already uses top-level imports (import { message, Modal, notification } from 'antdv-next') on lines 8 and 36, but the async component definitions on lines 38–101 use internal antdv-next/dist/*/index paths. While these dist paths are supported via the package's exports map, the official guidance recommends using the main entry point for all components: import { Button } from 'antdv-next' with dynamic imports for async loading. This maintains consistency within the file and aligns with the library's public API contract.

"@vben/utils": "workspace:*",
"@vueuse/core": "catalog:",
"ant-design-vue": "catalog:",
"antdv-next": "catalog:",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

antdv-next npm package peer dependencies

💡 Result:

As of antdv-next@1.0.0-rc.8, the package does not declare any peerDependencies (there is no peerDependencies field in its published package.json). [1]

You can confirm on your machine with:

npm info antdv-next@1.0.0-rc.8 peerDependencies

Source: [1]


🌐 Web query:

antdv-next library ant design vue style imports

💡 Result:

antdv-next ships a global bundled stylesheet plus per-component style modules.

1) Import all styles (simplest)

Add these once (e.g., main.ts):

import 'antdv-next/dist/reset.css'
import 'antdv-next/dist/antd.css'

Both files are published and exported by the package. (cdn.jsdelivr.net)

2) “On-demand” / per-component styles

Each component has its own style/index.mjs under dist/<component>/style/ (e.g. dist/button/style/index.mjs). When you import components in a tree-shakeable way, bundlers can pull only what you use, and these style modules are JS (css-in-js), not .css files. (cdn.jsdelivr.net)

Citations:


🏁 Script executed:

# First, let's examine the package.json file to understand the context
cat -n apps/web-antd/package.json | head -60

Repository: vbenjs/vue-vben-admin

Length of output: 1834


🏁 Script executed:

# Check for any monorepo catalog configuration
find . -type f -name "package.json" -o -name "pnpm-workspace.yaml" -o -name "lerna.json" | head -10

Repository: vbenjs/vue-vben-admin

Length of output: 449


🏁 Script executed:

# Check for pnpm-workspace or root package.json that defines the catalog
find . -maxdepth 2 -type f \( -name "pnpm-workspace.yaml" -o -name ".pnpmfile.cjs" \)

Repository: vbenjs/vue-vben-admin

Length of output: 86


🏁 Script executed:

# Check root package.json for catalog configuration
cat -n package.json | head -100

Repository: vbenjs/vue-vben-admin

Length of output: 4310


🏁 Script executed:

# Search for antdv-next style imports in the codebase
rg "antdv-next.*css|import.*antdv-next.*dist" --type ts --type vue --type js -B 2 -A 2

Repository: vbenjs/vue-vben-admin

Length of output: 92


🏁 Script executed:

# Check main entry point and style configuration in web-antd app
find apps/web-antd/src -type f \( -name "main.ts" -o -name "main.js" -o -name "App.vue" \) | head -5

Repository: vbenjs/vue-vben-admin

Length of output: 90


🏁 Script executed:

# Check main.ts for existing style imports
cat -n apps/web-antd/src/main.ts

Repository: vbenjs/vue-vben-admin

Length of output: 1044


🏁 Script executed:

# Check pnpm-workspace.yaml for catalog configuration
cat -n pnpm-workspace.yaml

Repository: vbenjs/vue-vben-admin

Length of output: 6734


🏁 Script executed:

# Search for any antd/antdv style imports in the entire web-antd app
rg "antd.*css|reset\.css" apps/web-antd/src --type ts --type js -B 2 -A 2

Repository: vbenjs/vue-vben-admin

Length of output: 47


🏁 Script executed:

# Look for common entry point files that might import styles
find apps/web-antd/src -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.vue" \) | xargs grep -l "import.*css\|import.*antd" | head -10

Repository: vbenjs/vue-vben-admin

Length of output: 448


🏁 Script executed:

# Check bootstrap.ts and app.vue for style imports
cat apps/web-antd/src/bootstrap.ts | head -50

Repository: vbenjs/vue-vben-admin

Length of output: 1271


🏁 Script executed:

cat apps/web-antd/src/app.vue | head -50

Repository: vbenjs/vue-vben-admin

Length of output: 890


🏁 Script executed:

# Also check if there's a global style configuration in vite config
find apps/web-antd -type f \( -name "vite.config.*" -o -name "vitest.config.*" \)

Repository: vbenjs/vue-vben-admin

Length of output: 94


🏁 Script executed:

# Check if `@vben/styles` handles antdv-next styles
find packages -name "styles" -type d | head -5

Repository: vbenjs/vue-vben-admin

Length of output: 80


🏁 Script executed:

# Look at the styles package structure
ls -la packages/@core/styles/ 2>/dev/null || ls -la packages/styles/ 2>/dev/null || find . -path "*/packages/*styles*" -type d | head -3

Repository: vbenjs/vue-vben-admin

Length of output: 413


🏁 Script executed:

# Check the vite config to see if there's any style configuration
cat apps/web-antd/vite.config.mts | head -80

Repository: vbenjs/vue-vben-admin

Length of output: 491


🏁 Script executed:

# Check what `@vben/styles/antd` exports/contains
find packages/styles/src -type f | head -20

Repository: vbenjs/vue-vben-admin

Length of output: 236


🏁 Script executed:

# Check the antd styles specifically
cat packages/styles/src/index.ts 2>/dev/null || find packages/styles -name "*.ts" -o -name "*.css" | head -10

Repository: vbenjs/vue-vben-admin

Length of output: 92


🏁 Script executed:

# List all files in the styles package
ls -la packages/styles/src/

Repository: vbenjs/vue-vben-admin

Length of output: 444


🏁 Script executed:

# Check what's in the antd styles file
cat packages/styles/src/antd/index.css

Repository: vbenjs/vue-vben-admin

Length of output: 1436


🏁 Script executed:

# Find the `@vben-core/design` package
find . -path "*vben-core*design*" -o -path "*design*" -type d | grep -E "packages|src" | head -10

Repository: vbenjs/vue-vben-admin

Length of output: 403


🏁 Script executed:

# Check the structure to find where `@vben-core/design` is
find packages -name "design" -type d

Repository: vbenjs/vue-vben-admin

Length of output: 91


🏁 Script executed:

# Check the design package content
find packages/@core/base/design -type f | head -20

Repository: vbenjs/vue-vben-admin

Length of output: 684


🏁 Script executed:

# Check if design package handles antdv-next styles
cat packages/@core/base/design/package.json | head -30

Repository: vbenjs/vue-vben-admin

Length of output: 829


🏁 Script executed:

# Look for antdv-next style imports in design package
find packages/@core/base/design -type f -name "*.ts" -o -name "*.css" -o -name "*.scss" | xargs grep -l "antdv-next\|reset\.css\|antd\.css" 2>/dev/null

Repository: vbenjs/vue-vben-admin

Length of output: 49


🏁 Script executed:

# Check what the design package index.ts imports
cat packages/@core/base/design/src/index.ts

Repository: vbenjs/vue-vben-admin

Length of output: 202


🏁 Script executed:

# Check the ui.css file to see if it imports antdv styles
cat packages/@core/base/design/src/css/ui.css

Repository: vbenjs/vue-vben-admin

Length of output: 1524


🏁 Script executed:

# Verify what antdv-next components are being used
rg "from ['\"]antdv-next" apps/web-antd/src --type ts --type js -B 1 -A 1 | head -30

Repository: vbenjs/vue-vben-admin

Length of output: 1518


🏁 Script executed:

# Check if maybe antdv-next styles are imported dynamically somewhere
rg "antdv-next.*css|reset.*css|dist.*antd" apps/web-antd --type ts --type js

Repository: vbenjs/vue-vben-admin

Length of output: 47


Add antdv-next stylesheets to avoid missing component styles.

Line 44 introduces antdv-next, but its bundled stylesheets are not imported. Add the following to bootstrap.ts (after or near the existing @vben/styles/antd import):

import 'antdv-next/dist/reset.css';
import 'antdv-next/dist/antd.css';

antdv-next ships with required global reset and component styles that must be explicitly imported for proper rendering. (Note: antdv-next has no peer dependencies, so dependency verification is not needed.)

🤖 Prompt for AI Agents
In `@apps/web-antd/package.json` at line 44, The project added the antdv-next
dependency but its global styles aren't imported; open bootstrap.ts, locate the
existing import for "@vben/styles/antd" and immediately after it add explicit
imports for antdv-next's styles (the reset and component CSS) so the UI
components render correctly; ensure the two imports are placed near the top of
bootstrap.ts alongside other global style imports to guarantee they are bundled.

Comment on lines 26 to 32
function notify(type: NotificationType) {
notification[type]({
duration: 2500,
message: '说点啥呢',
title: '说点啥呢',
type,
});
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, locate and examine the file
fd "index.vue" -p apps/web-antd/src/views/demos/antd/

Repository: vbenjs/vue-vben-admin

Length of output: 109


🏁 Script executed:

# Check the file content around the lines mentioned
cat -n apps/web-antd/src/views/demos/antd/index.vue | head -40

Repository: vbenjs/vue-vben-admin

Length of output: 1190


🏁 Script executed:

# Search for antdv-next notification usage in the codebase
rg "notification\." -A 3 -B 1 --type vue --type ts --type js | head -100

Repository: vbenjs/vue-vben-admin

Length of output: 92


🏁 Script executed:

# Search for notification usage patterns more broadly
rg "notification\." -A 3 -B 1 | head -150

Repository: vbenjs/vue-vben-admin

Length of output: 4519


🏁 Script executed:

# Check if there are any type definitions or node_modules references for antdv-next
fd "antdv-next" --type d

Repository: vbenjs/vue-vben-admin

Length of output: 47


🏁 Script executed:

# Look for package.json to see antdv-next version
cat -n package.json | grep -A 5 -B 5 "antdv-next"

Repository: vbenjs/vue-vben-admin

Length of output: 47


🌐 Web query:

antdv-next notification API documentation type property

💡 Result:

In antdv-next (ant-design-vue v3+) the Notification config type (NotificationArgsProps) includes a type field, but it is readonly:

  • type?: 'success' | 'info' | 'error' | 'warning' (aka IconType)
  • Because it’s readonly, it’s not meant to be set manually in notification.open({...}); it’s set internally when you call notification.success(...), notification.info(...), notification.warning(...), or notification.error(...). If you want a custom icon, use the icon property instead. [1]

Source: ant-design-vue es/notification/index.d.ts on UNPKG. [1]

References

Citations:


Remove the redundant type property from the notification config.

The type property on line 30 is redundant and incorrect. In antdv-next, the type field in the notification config is readonly and automatically set by the method call itself (e.g., notification.success(), notification.error()). Manually passing type in the config object violates the API contract. Remove type from the object:

Suggested change
function notify(type: NotificationType) {
  notification[type]({
    duration: 2500,
    title: '说点啥呢',
  });
}
🤖 Prompt for AI Agents
In `@apps/web-antd/src/views/demos/antd/index.vue` around lines 26 - 32, The
notification config passed in notify(type: NotificationType) incorrectly
includes a redundant type property; remove the type field from the object passed
to notification[type] so the method call (notification[type](...)) drives the
notification type and the config only contains duration and title; update the
notify function (and any similar calls using notification and NotificationType)
to stop passing type in the config object.

'@vueuse/integrations': ^14.1.0
'@vueuse/motion': ^3.0.3
ant-design-vue: ^4.2.6
antdv-next: ^1.0.0-rc.8
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

antdv-next 1.0.0-rc.8 release notes breaking changes

💡 Result:

I couldn’t find any published release notes / changelog entry for antdv-next@1.0.0-rc.8 (the npm package metadata doesn’t include a repository or homepage link that would normally point to GitHub releases/notes). (cdn.jsdelivr.net)

From the 1.0.0-rc.8 package metadata, the clearest potential breaking-change items are:

  • ESM-only package: it’s published with "type": "module" and exports pointing to .mjs entrypoints—CommonJS require() consumers may break and may need ESM-compatible tooling/config. (cdn.jsdelivr.net)
  • Stricter entrypoints via exports map: consumers that rely on undocumented deep imports may break and must use only the exported subpaths (e.g. antdv-next/date-picker/*, antdv-next/locale/*, etc.). (cdn.jsdelivr.net)
  • TypeScript types are .d.mts (ESM type declarations): TS projects may need modern module resolution settings (e.g. Node16/NodeNext/Bundler) if they previously relied on classic/CJS resolution. (cdn.jsdelivr.net)

If you can share the upstream repo URL (or the rc.7→rc.8 diff / changelog link you’re using), I can list the actual rc.8 breaking changes verbatim against that source.

Citations:


Address the ESM-only package transition and TypeScript resolution requirements.

Line 75 pins antdv-next to ^1.0.0-rc.8, which is an ESM-only package with .mjs entrypoints and .d.mts type declarations. This introduces breaking changes:

  • CommonJS consumers will break: Projects using require() must migrate to ESM or use ESM-compatible tooling.
  • Stricter import constraints: Only exports map subpaths (e.g., antdv-next/date-picker, antdv-next/locale) are supported; undocumented deep imports will fail.
  • TypeScript configuration: Requires modern module resolution (Node16, NodeNext, or Bundler) for .d.mts type declarations.

Verify this dependency does not conflict with downstream consumer module systems and update TypeScript configuration accordingly.

🤖 Prompt for AI Agents
In `@pnpm-workspace.yaml` at line 75, The pinned dependency antdv-next
(^1.0.0-rc.8) is ESM-only and requires consumers to use ESM and modern TS
resolution; verify all downstream packages that consume antdv-next can run as
ESM (or migrate them), replace or pin to a CJS-compatible release if any
consumer must remain CommonJS, and update TypeScript configs (tsconfig.json) for
affected packages to use moduleResolution: "Node16" / "NodeNext" or "Bundler" so
.d.mts types resolve; also audit import sites to only use supported export
subpaths (e.g., antdv-next/date-picker, antdv-next/locale) rather than
undocumented deep imports.

@jinmao88
Copy link
Collaborator

jinmao88 commented Feb 7, 2026

更新到最新的antdv-next吧

@ffgenius
Copy link
Contributor Author

ffgenius commented Feb 7, 2026

@jinmao88 已将 web-antd 中的 antdv-next 升级至最新版本。请帮忙 review 本次升级改动,确认是否还有潜在问题或需要补充调整的地方。

@jinmao88
Copy link
Collaborator

jinmao88 commented Feb 7, 2026

弄个新APP 比较好

@ffgenius
Copy link
Contributor Author

ffgenius commented Feb 7, 2026

弄个新APP 比较好

好的,我将会关闭这个请求,重新开启一个

@ffgenius ffgenius closed this Feb 7, 2026
@ffgenius ffgenius deleted the antdv-next branch February 8, 2026 13:40
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