chore: standardize repository setup#510
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 59 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 (8)
WalkthroughREADME 改写为 Changes仓库文档与发布配置
工作流自动化
Sequence Diagram(s)React Doctor 工作流sequenceDiagram
participant GitHubActions
participant actions/checkout
participant millionco/react-doctor
GitHubActions->>actions/checkout: checkout with fetch-depth: 0
actions/checkout-->>GitHubActions: repository history
GitHubActions->>millionco/react-doctor: run checks
millionco/react-doctor-->>GitHubActions: results
Surge Preview 工作流sequenceDiagram
participant GitHubActions
participant Shell
participant actions/checkout
participant afc163/surge-preview
GitHubActions->>Shell: check SURGE_TOKEN
Shell-->>GitHubActions: enabled true/false
alt enabled=true
GitHubActions->>actions/checkout: checkout repository
actions/checkout-->>GitHubActions: files
GitHubActions->>afc163/surge-preview: build and publish docs-dist
afc163/surge-preview-->>GitHubActions: preview status
else enabled=false
GitHubActions->>GitHubActions: skip preview log
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 可能相关的 PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
✅ Preview is ready!
↩️ Previous: ⚡️ 🤖 Powered by surge-preview |
|||||||||||||||
There was a problem hiding this comment.
Code Review
This pull request updates the repository configuration, package name references to @rc-component/image, and the README documentation. It also introduces a new vercel.json configuration and updates scripts in package.json. Feedback on these changes highlights two issues: the outputDirectory in vercel.json should be corrected to docs-dist to prevent deployment failures, and the TransformAction type definition should be restored in the README as it is still referenced in the API tables.
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 #510 +/- ##
=======================================
Coverage 99.44% 99.44%
=======================================
Files 17 17
Lines 541 541
Branches 165 164 -1
=======================================
Hits 538 538
Misses 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 9
🧹 Nitpick comments (2)
README.md (1)
104-104: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
imageRender参数名与源码不一致README 写为
(node, info),而src/Image.tsx中实际参数名为originalNode。参数名不一致会增加开发者对照源码时的认知成本。建议将
node改为originalNode以匹配源码。🤖 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 `@README.md` at line 104, The README entry for imageRender uses a parameter name that does not match the implementation in Image; update the documented signature so the first argument name matches the source symbol originalNode instead of node. Keep the rest of the type unchanged and make sure the description aligns with the actual callback shape used by Image.tsx..github/workflows/react-doctor.yml (1)
9-14: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win建议按事件收紧权限范围。
这里的工作流级写权限会同时作用于
pull_request和push。但push到master并没有对应的 PR/Issue 上下文,pull-requests: write和issues: write在这个事件里是多余的,扩大了GITHUB_TOKEN的权限面。更稳妥的做法是把权限下沉到 job,或拆成 PR / push 两套权限配置。🤖 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 @.github/workflows/react-doctor.yml around lines 9 - 14, The workflow-level permissions are too broad for all events in react-doctor.yml, since pull-requests: write and issues: write also apply on push runs where they are unnecessary. Restrict the permissions by event, either by moving them into the relevant job(s) or by splitting the workflow into separate pull_request and push permission sets, and keep only the minimum required scope for the job that uses the GitHub API.
🤖 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/cloudflare-pages-preview.yml:
- Around line 3-12: 当前 Cloudflare Pages 预览工作流缺少并发控制,导致同一 PR 的多次运行可能互相覆盖。请在
preview 工作流中为 jobs.preview 添加 concurrency 配置,并开启 cancel-in-progress,以
github.head_ref 作为分组键,确保同一 PR 只保留最新一次运行并自动取消旧运行。
In @.github/workflows/react-component-ci.yml:
- Around line 5-6: The reusable workflow reference in the workflow job is too
permissive because it points to a moving branch and inherits all secrets. Update
the job that uses react-component/rc-test/.github/workflows/test-utoo.yml to pin
the workflow to an immutable commit SHA instead of `@main`, and replace secrets:
inherit with an explicit minimal secrets mapping only if the called workflow
actually needs secrets; otherwise remove secrets entirely.
In @.github/workflows/surge-preview.yml:
- Around line 3-14: The Surge preview workflow is missing PR-scoped concurrency
control, so multiple runs for the same pull request can overlap and leave stale
previews/statuses. Add a top-level concurrency block to the workflow in the same
YAML that defines the pull_request trigger and preview job, using a group keyed
by github.workflow and github.event.pull_request.number, and enable
cancel-in-progress so only the latest run for each PR continues.
In `@README.md`:
- Around line 115-124: The Image.PreviewGroup API table is missing several props
exposed by PreviewGroupProps, so update the README entry for Image.PreviewGroup
to include classNames, styles, and children. Add brief descriptions and types
for classNames and styles using the semantic popup shape from PreviewGroupProps,
and document children as React.ReactNode so the public API matches the component
implementation.
- Line 120: The README entry for the custom preview operation icons type does
not match the actual source type, so update the documentation reference in the
preview group section to use the symbol from PreviewGroup.tsx, namely
PreviewProps['icons'], unless OperationIcons is a real public alias that is
exported elsewhere. Make sure the table describes the same type name that
developers can find in the codebase.
- Line 99: README 中的 actionsRender 类型仍引用了已移除的 ToolbarRenderInfoType,导致 info
参数结构不明确。请在文档里为 ToolbarRenderInfoType 补充明确的定义,或直接把 ToolbarRenderInfoType 的字段内联展开到
actionsRender 这一行,确保读者能从 ToolbarRenderInfoType / actionsRender 处直接看到 info
的完整类型结构。
- Line 99: The README entry for actionsRender uses the wrong info type and does
not match the source signature. Update the documentation to reflect the actual
type used in Image.tsx for actionsRender, where the info parameter is
Omit<ToolbarRenderInfoType, 'current' | 'total'> rather than the full
ToolbarRenderInfoType, so the docs accurately describe that current and total
are not included.
- Around line 95-114: The PreviewConfig API table in the README is missing the
cover property exposed by the PreviewConfig type in Image.tsx. Update the
documentation table to include cover with its type (React.ReactNode |
CoverConfig) and a brief description, keeping it consistent with the existing
PreviewConfig entries and the source interface.
- Line 112: The README entry for onOpenChange does not match the actual API
contract in PreviewConfig and Image; update the documented callback signature to
reflect the source definition with a single boolean parameter, and keep the docs
aligned with the implementation so consumers see the correct contract.
---
Nitpick comments:
In @.github/workflows/react-doctor.yml:
- Around line 9-14: The workflow-level permissions are too broad for all events
in react-doctor.yml, since pull-requests: write and issues: write also apply on
push runs where they are unnecessary. Restrict the permissions by event, either
by moving them into the relevant job(s) or by splitting the workflow into
separate pull_request and push permission sets, and keep only the minimum
required scope for the job that uses the GitHub API.
In `@README.md`:
- Line 104: The README entry for imageRender uses a parameter name that does not
match the implementation in Image; update the documented signature so the first
argument name matches the source symbol originalNode instead of node. Keep the
rest of the type unchanged and make sure the description aligns with the actual
callback shape used by Image.tsx.
🪄 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: bff64328-9fd9-49c1-a66b-a4d8a6d63156
📒 Files selected for processing (9)
.github/FUNDING.yml.github/workflows/cloudflare-pages-preview.yml.github/workflows/react-component-ci.yml.github/workflows/react-doctor.yml.github/workflows/surge-preview.ymlREADME.mdnow.jsonpackage.jsonvercel.json
💤 Files with no reviewable changes (1)
- now.json
|
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: 2
🧹 Nitpick comments (1)
.github/workflows/surge-preview.yml (1)
38-42: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win在工作流里固定 Node 版本
当前仓库没有.nvmrc、.node-version或package.json#engines作为版本来源;这里直接依赖ubuntu-latest自带的 Node,runner 升级后构建结果可能漂移。建议在Build preview前加actions/setup-node并显式锁定版本。🤖 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 @.github/workflows/surge-preview.yml around lines 38 - 42, The Build preview step in the surge preview workflow relies on the runner’s default Node version, which can drift over time. Add an explicit actions/setup-node step before Build preview and pin a specific Node version there, using the workflow’s existing build job context so npm install and npm run build execute against the locked runtime.
🤖 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 `@README.zh-CN.md`:
- Line 123: The `children` parameter description has a mistranslation in the
Chinese README: the label shown in the table is a literal error and should be
corrected to the proper React meaning. Update the `children` entry in the README
documentation to use “子元素” or “子节点” instead of the current incorrect wording,
keeping the rest of the table format unchanged.
- Line 93: README.zh-CN.md 中的表格项 src 说明仍是英文“Image
source”,与中文文档不一致;请在该参数描述处将其改为中文表述(如“图片源”或“图片地址”),并保持与同页其他字段说明的语言风格一致。
---
Nitpick comments:
In @.github/workflows/surge-preview.yml:
- Around line 38-42: The Build preview step in the surge preview workflow relies
on the runner’s default Node version, which can drift over time. Add an explicit
actions/setup-node step before Build preview and pin a specific Node version
there, using the workflow’s existing build job context so npm install and npm
run build execute against the locked runtime.
🪄 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: 00f9708e-4c4e-46db-894d-2647120ca979
📒 Files selected for processing (11)
.dumirc.ts.github/dependabot.yml.github/workflows/react-doctor.yml.github/workflows/surge-preview.yml.gitignore.prettierignoreLICENSEREADME.mdREADME.zh-CN.mdpackage.jsontsconfig.json
✅ Files skipped from review due to trivial changes (3)
- LICENSE
- .prettierignore
- .gitignore
🚧 Files skipped from review as they are similar to previous changes (3)
- .github/workflows/react-doctor.yml
- tsconfig.json
- README.md

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.