Skip to content

chore: standardize repository maintenance#81

Open
afc163 wants to merge 32 commits into
masterfrom
codex/standardize-rc-config
Open

chore: standardize repository maintenance#81
afc163 wants to merge 32 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Standardize this rc-component repository as part of the Ant Design rc-component maintenance sweep.

Tracking issue: ant-design/ant-design#58514

Scope

  • Redesign README.md and README.zh-CN.md with centered title, Ant Design ecosystem branding, aligned badges, scoped Bundlephobia badge, install command, Usage, Development, Release, and License sections.
  • Standardize package metadata, GitHub repo metadata, npm package name, package entry fields, types: "./es/index.d.ts", publishConfig, and release flow through @rc-component/np.
  • Align shared dependencies and scripts for React, testing-library, Jest/Vitest where existing, TypeScript, ESLint, Prettier, Less, dumi, father, Husky, lint-staged, and Dependabot.
  • Use the shared react-component/rc-test/.github/workflows/test-utoo.yml@main workflow, React Doctor, Codecov, CodeQL, updated GitHub Actions versions, and guarded Surge preview fallback.
  • Keep Vercel preview configuration compatible with docs-dist output and remove legacy now-build / Cloudflare Pages residue.
  • Keep API docs, demos, tests, TypeScript checks, funding metadata, and npm package files aligned with the repository standardization matrix.

Notes

  • No breaking runtime behavior is intended.
  • React peer dependency ranges are preserved when narrowing them would be a breaking change.
  • secrets: inherit is kept until react-component/rc-test#176 is merged, then it can be narrowed to explicit CODECOV_TOKEN forwarding.

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
motion Ready Ready Preview, Comment Jun 28, 2026 8:27am

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

❌ Deploy failed

PR preview ❌ Failed ❌ Failed
🔗 Preview https://react-component-motion-preview-pr-81.surge.sh (may be unavailable)
📝 Commit4465c75
🪵 LogsView logs
📋 Build log (last lines)
npm warn exec The following package was not found and will be installed: surge@0.27.4

   Running as afc163@gmail.com (Student)

        project: ./docs-dist
         domain: react-component-motion-preview-pr-81.surge.sh
           size: 49 files, 1.6 MB

   Aborted - you do not have permission to publish to react-component-motion-preview-pr-81.surge.sh

🤖 Powered by surge-preview

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@afc163, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 26 minutes and 44 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 credits.

🚦 How do rate 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 43dfaa3a-4f39-44f3-8ffb-9248ef79ca7d

📥 Commits

Reviewing files that changed from the base of the PR and between 409bb9b and 4465c75.

📒 Files selected for processing (12)
  • .dumirc.ts
  • .github/dependabot.yml
  • .github/workflows/codeql.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .husky/pre-commit
  • .prettierignore
  • LICENSE
  • README.md
  • README.zh-CN.md
  • package.json
  • tsconfig.json

Walkthrough

更新了文档站点基础配置、README 内容和多项 GitHub Actions 工作流,并同步调整了构建输出、发布脚本与相关部署配置。

Changes

站点发布与自动化配置

Layer / File(s) Summary
基础路径与映射
.dumirc.ts, tsconfig.json
根据 GH_PAGES 切换 base / publicPath,并补充文档站点相关的路径映射与包含/排除规则。
构建与发布配置
package.json, vercel.json, .gitignore
文档构建输出改为 docs-dist,发布脚本、Vercel 配置和忽略规则同步更新。
README 重写
README.md
README 重新组织为安装、用法、示例、API、开发与发布章节,并更新 CSSMotionCSSMotionListRef 的说明。
预览工作流
.github/workflows/cloudflare-pages-preview.yml, .github/workflows/surge-preview.yml
新增 Cloudflare Pages 和 Surge 的预览工作流,并根据密钥是否存在选择跳过或执行构建部署。
CI 与诊断工作流
.github/workflows/react-component-ci.yml, .github/workflows/react-doctor.yml, .github/workflows/codeql.yml
新增复用测试模板、react-doctor 和 CodeQL 的工作流配置。
Funding 条目
.github/FUNDING.yml
Funding 配置只保留了 githubopen_collective 条目。

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • zombieJ

Poem

我是小兔,蹦进新文档,
docs-dist 像胡萝卜园一样亮。
预览风车转,CodeQL 轻轻唱,
README 翻页,月光也跟着忙。
啦哒,发布成功我最欢畅 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题与本次以仓库维护、CI 和文档配置标准化为主的改动一致,能概括主要方向。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/standardize-rc-config

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.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.09%. Comparing base (de9bede) to head (4465c75).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #81   +/-   ##
=======================================
  Coverage   98.09%   98.09%           
=======================================
  Files          11       11           
  Lines         421      421           
  Branches      121      120    -1     
=======================================
  Hits          413      413           
  Misses          7        7           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 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.

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

Copy link
Copy Markdown

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 updates the project's build, documentation, and deployment configurations, including transitioning the documentation output directory to docs-dist, adding a Vercel configuration, and modernizing the README. It also updates the TypeScript path mappings for the dumi temporary directory. The feedback points out that excluding the .dumi directory in tsconfig.json will prevent TypeScript from resolving the generated type definitions under .dumi/tmp/*, and suggests removing it from the exclusion list.

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.

Comment thread tsconfig.json Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
.github/workflows/cloudflare-pages-preview.yml (1)

26-41: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

重复的密钥校验条件可合并为作业级 guard。

Install dependenciesBuild siteDeploy preview 三步重复了完全相同的三元条件表达式,Skip 步骤则是其取反。后续若新增配置项(如再加一个变量),需要同步修改 4 处,易遗漏。建议在 job 级别用 outputs 或单独的判断步骤集中处理,例如:

♻️ 建议的重构方向
   preview:
     runs-on: ubuntu-latest
     env:
       CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
       CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
       CLOUDFLARE_PAGES_PROJECT: ${{ vars.CLOUDFLARE_PAGES_PROJECT }}
       PREVIEW: true
     steps:
       - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
         with:
           persist-credentials: false
+      - name: Check configuration
+        id: cfg
+        run: |
+          if [ -n "$CLOUDFLARE_API_TOKEN" ] && [ -n "$CLOUDFLARE_ACCOUNT_ID" ] && [ -n "$CLOUDFLARE_PAGES_PROJECT" ]; then
+            echo "enabled=true" >> "$GITHUB_OUTPUT"
+          else
+            echo "Cloudflare Pages preview is not configured; skip deployment."
+            echo "enabled=false" >> "$GITHUB_OUTPUT"
+          fi
       - name: Install dependencies
-        if: ${{ env.CLOUDFLARE_API_TOKEN != '' && env.CLOUDFLARE_ACCOUNT_ID != '' && env.CLOUDFLARE_PAGES_PROJECT != '' }}
+        if: ${{ steps.cfg.outputs.enabled == 'true' }}
         run: npm install
🤖 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/cloudflare-pages-preview.yml around lines 26 - 41, The
Cloudflare Pages preview workflow repeats the same secret-check condition across
multiple steps, while the skip step uses the inverse, making the logic hard to
maintain. Consolidate the configuration check into a single job-level guard or
one dedicated condition step in cloudflare-pages-preview.yml, then have Install
dependencies, Build site, and Deploy preview reuse that shared result instead of
duplicating the expression.
.github/workflows/codeql.yml (1)

3-9: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

建议补充并发控制以取消过期运行。

本 PR 为其它诊断工作流(如 react-doctor.yml)添加了 concurrency 控制,但 CodeQL 工作流缺少同样配置。在频繁推送时会并行跑多次分析,浪费 runner 资源。建议添加:

♻️ 建议补充
 on:
   push:
     branches: ['master']
   pull_request:
     branches: ['master']
   schedule:
     - cron: '24 18 * * 1'
+
+concurrency:
+  group: codeql-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
🤖 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/codeql.yml around lines 3 - 9, CodeQL workflow is missing
the same concurrency cancellation behavior used elsewhere, so repeated pushes
can leave stale runs executing in parallel. Update the workflow definition in
the CodeQL configuration to add a concurrency group that keys off the
workflow/ref context and enables cancellation of in-progress older runs, using
the existing workflow structure near the trigger configuration.
🤖 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 7-8: The reusable workflow invocation in react-component-ci is
over-sharing secrets and should be tightened. In the workflow call that uses
test-utoo.yml, remove secrets: inherit and pass only the CODECOV_TOKEN
explicitly, since that is the only secret the downstream workflow needs. Also
update the workflow reference from `@main` to a specific commit SHA if possible to
reduce supply-chain risk; if SHA pinning is not available yet, still ensure the
secret scope is limited in the call site.

In `@README.md`:
- Around line 130-150: The Release section in README is inaccurate: `npm run
prepublishOnly` is only a pre-publish hook and does not perform the actual
release with `@rc-component/np`. Update the release instructions to point to the
real publish/release command used by the project (such as the
`release`/`publish` script or invoking `@rc-component/np` directly) and keep the
Development command list unchanged.

---

Nitpick comments:
In @.github/workflows/cloudflare-pages-preview.yml:
- Around line 26-41: The Cloudflare Pages preview workflow repeats the same
secret-check condition across multiple steps, while the skip step uses the
inverse, making the logic hard to maintain. Consolidate the configuration check
into a single job-level guard or one dedicated condition step in
cloudflare-pages-preview.yml, then have Install dependencies, Build site, and
Deploy preview reuse that shared result instead of duplicating the expression.

In @.github/workflows/codeql.yml:
- Around line 3-9: CodeQL workflow is missing the same concurrency cancellation
behavior used elsewhere, so repeated pushes can leave stale runs executing in
parallel. Update the workflow definition in the CodeQL configuration to add a
concurrency group that keys off the workflow/ref context and enables
cancellation of in-progress older runs, using the existing workflow structure
near the trigger configuration.
🪄 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: 3d81783f-fdee-4a12-b328-620c6fc25aaf

📥 Commits

Reviewing files that changed from the base of the PR and between de9bede and 409bb9b.

📒 Files selected for processing (14)
  • .dumirc.ts
  • .github/FUNDING.yml
  • .github/workflows/cloudflare-pages-preview.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
  • .gitignore
  • README.md
  • now.json
  • package.json
  • tsconfig.json
  • vercel.json
💤 Files with no reviewable changes (2)
  • now.json
  • .github/workflows/main.yml

Comment thread .github/workflows/react-component-ci.yml
Comment thread README.md
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/afc163s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit

@socket-security

socket-security Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​husky@​9.1.71001006280100
Updatednpm/​@​types/​jest@​30.0.0 ⏵ 29.5.14100 +110077 +180100
Addednpm/​cross-env@​10.1.010010010082100
Addednpm/​@​testing-library/​jest-dom@​6.9.110010010089100
Addednpm/​prettier@​3.9.1961009497100
Addednpm/​lint-staged@​16.4.010010010097100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant