chore: standardize repository maintenance#393
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Preview is ready!
↩️ Previous: ⚡️ 🤖 Powered by surge-preview |
|||||||||||||||
|
Warning Review limit reached
Next review available in: 58 minutes Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable usage-based reviews in Billing to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information, and refer to the rate limits docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
Walkthrough本 PR 更新了文档构建与部署配置、GitHub Actions 工作流、README 中英文文档,以及测试中与 Changes文档、CI、说明与测试
可能相关的 PR
估算的代码审查工作量🎯 3 (Moderate) | ⏱️ ~25 minutes
🚥 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #393 +/- ##
========================================
Coverage 99.20% 99.20%
========================================
Files 13 12 -1
Lines 1375 377 -998
Branches 182 102 -80
========================================
- Hits 1364 374 -990
+ Misses 11 3 -8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request modernizes the repository configuration and documentation. Key changes include updating the README to document the hook-based useNotification API, updating build and deployment scripts in package.json to target docs-dist, configuring Vercel deployment via vercel.json, and refining TypeScript path mappings. Feedback highlights two improvement opportunities: removing the manual Date.now() key in the README example since the hook automatically handles unique key generation, and using cross-env in the gh-pages npm script to ensure cross-platform compatibility.
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.
|
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 |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
tests/index.test.tsx (1)
44-46: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win先断言节点存在,再读取
style.content。这里直接把
querySelector结果断言成HTMLElement。一旦节点没渲染出来,测试会先抛TypeError,失败信息里看不到具体 selector,后面这些样式用例会更难排查。♻️ 建议修改
function expectContentStyle(selector: string, content: string) { - expect((document.querySelector(selector) as HTMLElement).style.content).toBe(`"${content}"`); + const element = document.querySelector(selector); + expect(element, `Missing element for selector: ${selector}`).not.toBeNull(); + expect((element as HTMLElement).style.content).toBe(`"${content}"`); }🤖 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 `@tests/index.test.tsx` around lines 44 - 46, The helper expectContentStyle currently assumes querySelector always returns an element, so missing nodes will fail with a TypeError before the assertion is useful. Update expectContentStyle to first assert that the selector resolves to a real DOM node, then read its style.content, so failures clearly identify the missing selector and keep the style checks in tests/index.test.tsx easy to debug.
🤖 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 6-8: The reusable workflow call in this CI config is too loose: it
references the external workflow with a moving branch and inherits all secrets.
Update the job that uses react-component/rc-test/.github/workflows/test-utoo.yml
to pin the reference to an immutable commit SHA instead of `@main`, and replace
secrets: inherit with an explicit secrets mapping containing only the values
that workflow actually needs.
In `@README.zh-CN.md`:
- Around line 114-168: This README.zh-CN notification props table has a few
untranslated or inconsistently translated descriptions. Update the
Notification-related tables so the remaining English descriptions in the
components, icon, and placement entries are translated to consistent Chinese,
and adjust the prefixCls description in the Notification API section to use the
more natural “类名前缀”; use the existing symbols NotificationAPI and
NotificationListConfig to locate the affected rows.
- Around line 114-133: API 表格中的参数名不要翻译,直接把 README.zh-CN.md
里被误写成中文的条目改回与代码一致的名称,重点检查 Notification 相关表格中的 motion 和
style,以及所有同类参数名,避免用户复制后出错;同时在对应描述里把
className称、className前缀等术语统一修正为“类名”“类名前缀”,以保证文档术语与代码符号一致。
In `@tsconfig.json`:
- Around line 29-35: The TypeScript include list currently covers config files
like vitest.config.ts and vitest-setup.ts but misses the tests/ directory, so
test files are not checked by tsc. Update the include entries in tsconfig.json
to add tests alongside the existing src and docs paths, keeping the change near
the current include array so files like tests/index.test.tsx are picked up by
the tsc --noEmit flow.
In `@vercel.json`:
- Around line 1-6: The Vercel build configuration is using the wrong script for
the docs site: update the buildCommand in vercel.json from the generic build
task to the docs-specific script so the output matches docs-dist/. Use the
existing package.json docs:build script (dumi build) rather than npm run build,
and keep the outputDirectory aligned with the generated docs artifact.
---
Nitpick comments:
In `@tests/index.test.tsx`:
- Around line 44-46: The helper expectContentStyle currently assumes
querySelector always returns an element, so missing nodes will fail with a
TypeError before the assertion is useful. Update expectContentStyle to first
assert that the selector resolves to a real DOM node, then read its
style.content, so failures clearly identify the missing selector and keep the
style checks in tests/index.test.tsx easy to debug.
🪄 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: 5e38169e-4796-4f4e-be9d-1d1bb22d391b
📒 Files selected for processing (15)
.dumirc.ts.github/FUNDING.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.mdnow.jsonpackage.jsontests/index.test.tsxtsconfig.jsonvercel.json
💤 Files with no reviewable changes (2)
- .github/workflows/main.yml
- now.json

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.