chore: standardize repository config#699
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本次修改更新了文档站点构建与部署配置,切换了示例和测试中的 Select 依赖,重写了 README 与首页文案,并新增或调整了多个 GitHub Actions 工作流和测试环境兜底。 Changes站点与组件迁移
GitHub 自动化与仓库配置
Sequence Diagram(s)sequenceDiagram
participant PullRequest
participant GitHubActions
participant Checkout
participant SurgePreview
PullRequest->>GitHubActions: pull_request 触发
GitHubActions->>Checkout: 检出代码并禁用凭据持久化
GitHubActions->>GitHubActions: npm install
GitHubActions->>GitHubActions: npm run build
alt SURGE_TOKEN 非空
GitHubActions->>SurgePreview: 发布 docs-dist 并设置状态
SurgePreview->>GitHubActions: 返回预览结果
else SURGE_TOKEN 为空
GitHubActions->>GitHubActions: 输出跳过提示
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 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 7 new issues in 2 files · 7 warnings · score 49 / 100 (Critical) · 12 fixed · vs 7 warnings
Reviewed by React Doctor for commit |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #699 +/- ##
==========================================
+ Coverage 99.06% 99.58% +0.51%
==========================================
Files 3 4 +1
Lines 320 479 +159
Branches 146 239 +93
==========================================
+ Hits 317 477 +160
+ Misses 3 2 -1 ☔ 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 migrates the repository from 'rc-select' to '@rc-component/select', updating dependency references, example files, tests, and snapshots accordingly. It also refactors the documentation, configures Vercel and GitHub Pages builds, and adds a 'MessageChannel' mock for the test environment. The review feedback suggests replacing 'setTimeout' with 'queueMicrotask' in the 'MessageChannel' mock to avoid potential issues when tests use Jest's fake timers.
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.
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 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 reference in react-component-ci is too
permissive: it currently points to the moving main branch and inherits all
secrets. Update the workflow call in the CI definition to pin
react-component/rc-test/.github/workflows/test-utoo.yml to a specific commit
SHA, and replace secrets: inherit with only the explicitly required secrets from
that called workflow’s workflow_call contract. Use the test job in
react-component-ci and the called workflow’s declared inputs/secrets to locate
what needs to be narrowed.
In @.github/workflows/react-doctor.yml:
- Around line 20-27: The react-doctor workflow job is missing an explicit
timeout, so add a timeout setting directly on the react-doctor job to prevent
the runner from hanging if the external action stalls. Update the job definition
in the react-doctor workflow alongside the existing checkout and
millionco/react-doctor steps, and choose a reasonable timeout that fits the
job’s expected runtime.
- Around line 9-14: `react-doctor.yml` 里的 `permissions`
现在对所有事件都开放了过大的写权限;请按事件拆分或在作业级别收紧 `GITHUB_TOKEN`,让 `pull_request` 相关步骤仅保留真正需要的
`pull-requests: write`/`issues: write`,而 `push` 到 `master` 时只保留必需权限(如 `contents:
read` 和必要的 `statuses: write`)。重点检查该 workflow 中触发第三方 Action 的作业配置,确保这些写权限不会在
`push` 场景下默认下发。
In `@package.json`:
- Line 94: README.md 中关于 selectPrefixCls 的默认前缀文档仍写成 rc-select,和已迁移到
`@rc-component/select` 的实际默认值不一致;请在 README 的相关说明处同步更新为新包对应的默认值或实际配置,并保持与
package.json 中的 `@rc-component/select` 版本一致,避免误导用户。定位时请关注 selectPrefixCls、README
里的默认值描述以及 `@rc-component/select` 相关文档段落。
In `@tests/setupAfterEnv.ts`:
- Around line 9-12: The MessageChannel fallback in the test setup is scheduling
port2.postMessage callbacks with queueMicrotask, which runs as a microtask
instead of matching the native macrotask behavior; update the fallback inside
the MessageChannel shim in setupAfterEnv.ts to use a task-based scheduler such
as setTimeout(..., 0) so the MessagePort callback ordering better matches real
browser timing and avoids test-only sequencing issues.
🪄 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: 6cec4165-8314-4225-8e03-89fec5aecb95
⛔ Files ignored due to path filters (2)
tests/__snapshots__/demo.test.tsx.snapis excluded by!**/*.snaptests/__snapshots__/options.test.tsx.snapis excluded by!**/*.snap
📒 Files selected for processing (25)
.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.mddocs/examples/controlled.tsxdocs/examples/jumper.tsxdocs/examples/jumperWithGoButton.tsxdocs/examples/locale.tsxdocs/examples/sizer.tsxdocs/examples/utils/commonUtil.tsxdocs/index.mdpackage.jsontests/commonUtil.tsxtests/setupAfterEnv.tstests/simple.test.tsxtests/sizer.test.tsxtests/two-pagination.tsxtsconfig.jsonvercel.json
💤 Files with no reviewable changes (1)
- .github/workflows/main.yml
|
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: 1
🤖 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/surge-preview.yml:
- Around line 19-41: Move SURGE_TOKEN to a job-level env and stop reading
secrets directly inside the if conditions in the preview workflow. Update the
conditional checks in the workflow steps to use env.SURGE_TOKEN instead of
secrets.SURGE_TOKEN, and keep the existing build/surge steps gated by that
env-based condition so the workflow validates correctly. Locate the logic in the
preview job where actions/checkout, Build preview, afc163/surge-preview, and
Skip Surge preview are defined.
🪄 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: 0aa1b7c5-ff0d-4aa4-b424-0b04613364fc
📒 Files selected for processing (3)
.github/workflows/react-doctor.yml.github/workflows/surge-preview.ymlREADME.md
🚧 Files skipped from review as they are similar to previous changes (2)
- .github/workflows/react-doctor.yml
- README.md
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|

Summary
rc-selectto@rc-component/select, including test helpers, API usage, and snapshots.Verification
Refs ant-design/ant-design#58514
Summary by CodeRabbit