Skip to content

fix: disable unused valtio plugin to resolve undefined error#11835

Open
afc163 wants to merge 1 commit into
masterfrom
fix/valtio-undefined
Open

fix: disable unused valtio plugin to resolve undefined error#11835
afc163 wants to merge 1 commit into
masterfrom
fix/valtio-undefined

Conversation

@afc163

@afc163 afc163 commented Jun 1, 2026

Copy link
Copy Markdown
Member

Umi Max auto-enables the valtio plugin, which is not used in this project. This causes valtio is undefined errors at runtime. Explicitly disable it with valtio: false in the config. Closes #11817.

Summary by CodeRabbit

  • Chores
    • 在项目配置中显式将 valtio 数据流插件设置为 false,关闭默认启用的 valtio 插件以避免在未使用情况下意外启用带来的运行时问题,并保持其余配置不变以确保配置行为可预测。

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. umi4 labels Jun 1, 2026
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d16368b1-b05e-41c5-8015-96d190b6222d

📥 Commits

Reviewing files that changed from the base of the PR and between 09f2429 and a53530c.

📒 Files selected for processing (1)
  • config/config.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/config.ts

Walkthrough

config/config.ts 的 Umi Max 插件配置中新增 valtio: false,显式关闭 valtio 数据流插件;其他配置未变更。

变更

Valtio 插件禁用

Layer / File(s) Summary
Valtio 插件禁用配置
config/config.ts
在 Umi Max 的 defineConfig 中新增 valtio: false 配置项,显式禁用 valtio 插件。

估计审查工作量

🎯 1 (Trivial) | ⏱️ ~2 分钟

诗文

🐰 Valtio 轻轻关上门,
一行配置保宁静,
undefined 不再来访,
项目奔跑又轻盈,
苗条代码乐无垠。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR标题清晰准确地反映了主要变更内容:通过禁用unused valtio插件来解决undefined错误。
Linked Issues check ✅ Passed 代码变更完全符合关联issue #11772的需求:通过配置valtio: false来禁用未使用的valtio插件,解决运行时undefined错误。
Out of Scope Changes check ✅ Passed PR中仅修改config/config.ts文件,添加valtio: false配置,所有变更均在scope内且与关联issue直接相关。
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
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/valtio-undefined

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

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

🎊 PR Preview has been successfully built and deployed to https://ant-design-pro-preview-pr-11835.surge.sh

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request disables the unused valtio data flow plugin in config/config.ts to prevent potential undefined errors. There are no review comments, and I have no feedback to provide.

@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.63%. Comparing base (4bd45ba) to head (a53530c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11835   +/-   ##
=======================================
  Coverage   39.63%   39.63%           
=======================================
  Files         187      187           
  Lines        2379     2379           
  Branches      398      410   +12     
=======================================
  Hits          943      943           
+ Misses       1436     1432    -4     
- Partials        0        4    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 1, 2026

Copy link
Copy Markdown

Deploying ant-design-pro with  Cloudflare Pages  Cloudflare Pages

Latest commit: a53530c
Status: ✅  Deploy successful!
Preview URL: https://919fdb54.ant-design-pro-nd3.pages.dev
Branch Preview URL: https://fix-valtio-undefined.ant-design-pro-nd3.pages.dev

View logs

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@afc163 afc163 force-pushed the fix/valtio-undefined branch from 09f2429 to a53530c Compare June 1, 2026 08:54
@afc163 afc163 changed the title fix: resolve valtio undefined error fix: disable unused valtio plugin to resolve undefined error Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files. umi4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

修复侧栏折叠时 OpenAPI 链接文字溢出

1 participant