chore: standardize repository config#994
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough仓库更新了包配置、文档站、GitHub Actions、示例导入、测试断言和中英文文档内容,并同步调整了发布与预览相关配置。 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
❌ Deploy failed
📋 Build log (last lines)🤖 Powered by surge-preview |
|||||||||
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
There was a problem hiding this comment.
Code Review
This pull request updates the repository configuration, documentation, and build scripts to support Dumi-based documentation, Vercel deployments, and cleaner package distribution. Key changes include rewriting the README, updating example imports, configuring path aliases in .dumirc.ts and tsconfig.json, and adjusting package.json scripts. Feedback on these changes suggests packaging the entire assets directory to preserve .less files for consumers, restoring linting and type-checking in the prepublishOnly script, and optimizing the Vercel build command to only build the documentation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #994 +/- ##
=======================================
Coverage 98.98% 98.98%
=======================================
Files 18 18
Lines 788 788
Branches 235 235
=======================================
Hits 780 780
Misses 8 8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Deployment failed with the following error: Learn More: https://vercel.com/afc163s-projects?upgradeToPro=build-rate-limit |
|
Deployment failed with the following error: Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/react-component-ci.yml:
- Around line 11-12: The reusable workflow invocation should stop tracking the
moving main branch and avoid inheriting all secrets. Update the workflow call in
the CI config to reference a fixed commit SHA for the test-utoo.yml reusable
workflow, and replace secrets: inherit with an explicit minimal secrets mapping
containing only the symbols that the reusable workflow actually needs.
In @.github/workflows/surge-preview.yml:
- Around line 19-42: The workflow’s step conditions are referencing secrets
directly in `if:` clauses, which actionlint rejects during parsing. Update the
preview job in the Surge preview workflow to gate the “Build preview”,
`afc163/surge-preview`, and “Skip Surge preview” steps using an
environment-based flag derived from `SURGE_TOKEN` instead of checking `secrets`
inline, so the step selection works reliably at runtime.
In `@package.json`:
- Around line 85-87: Update the package.json engines.node constraint to reflect
the real minimum supported Node version rather than >=8.x. Adjust the value in
the engines block to match the highest required runtime from the current build
dependencies, and keep the change localized to the engines field so installers
and tooling get an accurate compatibility signal.
In `@README.zh-CN.md`:
- Line 57: Update the Chinese README wording around the `classNames`-related
table entries so the labels read naturally and consistently: fix the spacing in
terms like “附加 className” and “前缀 className”, correct the typo “面板className称” to
“面板 className” or “面板类名”, and use the existing `classNames` section in
README.zh-CN.md as the target. Also translate the remaining English descriptions
in that table into Chinese so the documentation stays fully localized and
consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5009336d-da30-48c3-a055-e3700bb40f0b
📒 Files selected for processing (26)
.dumirc.ts.github/FUNDING.yml.github/dependabot.yml.github/workflows/codeql.yml.github/workflows/main.yml.github/workflows/react-component-ci.yml.github/workflows/react-doctor.yml.github/workflows/surge-preview.yml.gitignoreREADME.mdREADME.zh-CN.mddocs/examples/animated.tsxdocs/examples/basic.tsxdocs/examples/dynamic-extra.tsxdocs/examples/editable.tsxdocs/examples/extra.tsxdocs/examples/indicator.tsxdocs/examples/mix.tsxdocs/examples/overflow.tsxdocs/examples/position.tsxdocs/examples/renderTabBar-dragable.tsxdocs/examples/renderTabBar-sticky.tsxdocs/index.mdpackage.jsontsconfig.jsonvercel.json
💤 Files with no reviewable changes (1)
- .github/workflows/main.yml
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
tsconfig.json (1)
21-31: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win补上
@rc-component/tabs/assets的精确路径映射。
.dumirc.ts已经声明了@rc-component/tabs/assets,但tsconfig.json只配了@rc-component/tabs/assets/*,裸导入时会在 dumi 和tsc之间出现解析差异。💡 建议修改
"`@rc-component/tabs/es/`*": [ "src/*" ], + "`@rc-component/tabs/assets`": [ + "assets" + ], "`@rc-component/tabs/assets/`*": [ "assets/*" ]🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tsconfig.json` around lines 21 - 31, The path mapping in tsconfig is missing the exact `@rc-component/tabs/assets` entry, causing bare imports to resolve differently between dumi and tsc. Update the tsconfig paths alongside the existing `@rc-component/tabs/assets/`* mapping so that `@rc-component/tabs/assets` resolves directly to the assets directory, matching the alias already declared in .dumirc.ts and keeping resolution consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/accessibility.test.tsx`:
- Around line 146-149: The tab focus test is using low-level mouse events
instead of the real user interaction path, so it may miss focus-related
regressions. Update the accessibility test around secondTab to use the
user-event API (for example through user.click or pointer interactions) and
assert the expected focus state with toHaveFocus alongside the rc-tabs-tab-focus
check. Keep the intent of the existing assertion, but make the test reflect
actual browser focus behavior.
In `@tsconfig.json`:
- Around line 36-40: The tsconfig include list is missing the root .fatherrc.ts,
so type and import issues in that config file are not caught during type
checking. Update the include array in tsconfig.json to add .fatherrc.ts
alongside .dumirc.ts, keeping the existing src, tests, and docs/examples entries
unchanged.
---
Nitpick comments:
In `@tsconfig.json`:
- Around line 21-31: The path mapping in tsconfig is missing the exact
`@rc-component/tabs/assets` entry, causing bare imports to resolve differently
between dumi and tsc. Update the tsconfig paths alongside the existing
`@rc-component/tabs/assets/`* mapping so that `@rc-component/tabs/assets` resolves
directly to the assets directory, matching the alias already declared in
.dumirc.ts and keeping resolution consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0301e8d5-8519-42e1-89e6-5c2f05424d4e
📒 Files selected for processing (6)
.dumirc.tsREADME.mdREADME.zh-CN.mdpackage.jsontests/accessibility.test.tsxtsconfig.json
✅ Files skipped from review due to trivial changes (2)
- README.zh-CN.md
- README.md
🚧 Files skipped from review as they are similar to previous changes (1)
- .dumirc.ts

Summary
Standardize this rc-component repository as part of the Ant Design rc-component maintenance sweep.
Tracking issue: ant-design/ant-design#58514
Scope
types: "./es/index.d.ts", publishConfig, and release flow through@rc-component/np.react-component/rc-test/.github/workflows/test-utoo.yml@mainworkflow, React Doctor, Codecov, CodeQL, updated GitHub Actions versions, and guarded Surge preview fallback.docs-distoutput and remove legacynow-build/ Cloudflare Pages residue.Notes
secrets: inheritis kept untilreact-component/rc-test#176is merged, then it can be narrowed to explicitCODECOV_TOKENforwarding.