Skip to content

chore: standardize repository config#627

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

chore: standardize repository config#627
afc163 wants to merge 17 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Redesign README with npm/bundlephobia badges, Ant Design brand context, installation, usage, API, development, and release sections.
  • Standardize repository config: package scripts, dumi/father/tsconfig, FUNDING, Dependabot, Vercel preview, Surge preview fallback, React Doctor, and CodeQL workflow.
  • Remove the legacy Now config and keep trigger assets resolvable in docs preview.

Test plan

  • npm run tsc
  • npm test -- --runInBand
  • npm run lint
  • npm run build
  • npx vercel build --yes

Refs ant-design/ant-design#58514

Summary by CodeRabbit

  • 新功能

    • 更新了站点与资源路径配置,支持在不同部署环境下自动切换访问前缀。
    • 新增预览、持续集成与代码检查流程,提升提交后的可见反馈。
  • 改进

    • 文档首页与 README 重新整理,内容结构更清晰,示例和 API 说明更易读。
    • 更新了发布与构建脚本,优化文档构建、部署与发布流程。
  • 杂项

    • 调整了忽略规则、资助信息和依赖更新策略。

@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)
trigger Ready Ready Preview, Comment Jun 28, 2026 4:38am

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

✅ Preview is ready!

PR preview ✅ Ready ✅ Ready
🔗 Preview https://react-component-trigger-preview-pr-627.surge.sh
📝 Commit2e7ad96
⏱️ Build time35.545s
📦 Size1.8 MB (-17 B ⬇️) · 86 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ 2e7ad96 · react-component-trigger-preview-pr-627.surge.sh (open ↗) · 2026-06-28 06:07:12 UTC

🤖 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 23 minutes and 27 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: 33e8bf23-7d29-4598-9424-b05f2e3cbf70

📥 Commits

Reviewing files that changed from the base of the PR and between 33e8ff1 and 2e7ad96.

📒 Files selected for processing (10)
  • .dumirc.ts
  • .github/workflows/codeql.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .gitignore
  • README.md
  • README.zh-CN.md
  • package.json
  • tests/basic.test.jsx
  • tsconfig.json

Walkthrough

更新了站点路径前缀与别名、构建发布配置、README 文档,以及 GitHub Actions、Dependabot 和资助配置;同时将项目命名统一为 @rc-component/trigger

Changes

仓库现代化

Layer / File(s) Summary
路径与入口
.dumirc.ts, tsconfig.json, docs/index.md
新增站点前缀常量,切换到 @rc-component/trigger 命名空间别名,并同步更新 tsconfig 路径与文档首页标题。
构建与发布
package.json, vercel.json, .gitignore
更新包元信息、构建和发布脚本、依赖、Vercel 输出目录与忽略规则。
README 重写
README.md
README 改为新的封面、安装、示例、API、开发、发布和许可证结构。
CI 与代码扫描
.github/workflows/codeql.yml, .github/workflows/react-component-ci.yml
CodeQL 触发与动作引用更新,并新增可复用的测试工作流。
预览与机器人
.github/workflows/react-doctor.yml, .github/workflows/surge-preview.yml, .github/dependabot.yml, .github/FUNDING.yml
新增 React Doctor 和 Surge Preview 工作流,并更新 Dependabot 调度与资助配置。

Sequence Diagram(s)

Surge Preview 发布流

sequenceDiagram
  participant PullRequest as pull_request
  participant GitHubActions as GitHub Actions
  participant Checkout as actions/checkout
  participant SurgePreview as afc163/surge-preview

  PullRequest->>GitHubActions: trigger pull_request to master
  GitHubActions->>Checkout: checkout code
  GitHubActions->>SurgePreview: run npm run build for docs-dist
  SurgePreview->>GitHubActions: publish preview output
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • zombieJ

Poem

我是一只小兔,蹦进新前缀里,
/trigger/ 在草地上闪闪发光。
README 翻页,徽标一起歌唱,
CI、预览和扫描都排好队形。
🐇 新家落定,月亮也轻轻鼓掌。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题简洁且准确概括了本次以仓库配置标准化为主的变更。
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.
✨ 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.

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

Copy link
Copy Markdown
Contributor

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 repository configuration, documentation, and build scripts to align with the @rc-component scope and improve the GitHub Pages and Vercel deployment workflows. Key changes include a redesigned README, updated dumi and TypeScript configurations, and restructured package scripts. Feedback highlights a few issues: wildcard aliases in .dumirc.ts are unsupported and should be removed, ignoring the entire .dumi directory in .gitignore incorrectly excludes source configurations, and the gh-pages script in package.json fails to propagate the GH_PAGES=1 environment variable to the documentation build step.

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 package.json Outdated
Comment thread .gitignore Outdated
Comment thread .dumirc.ts Outdated
@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 97.28%. Comparing base (97703ff) to head (2e7ad96).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #627   +/-   ##
=======================================
  Coverage   97.28%   97.28%           
=======================================
  Files          17       17           
  Lines         956      956           
  Branches      268      278   +10     
=======================================
  Hits          930      930           
  Misses         26       26           

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

@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 (1)
README.md (1)

90-100: 📐 Maintainability & Code Quality | 🔵 Trivial

更新 Development 步骤以反映实际可用脚本

README 中的开发命令列表部分包含无效或非推荐流程。package.json 已确认包含 starttesttsccompilebuild 脚本,但开发工作流中通常不需要显式运行 npm run tscnpm run compile

建议简化文档:

  • 开发阶段:npm start
  • 构建产物:npm run build
  • 测试:npm test
  • 类型检查与编译已在构建流程中自动执行或作为独立可选步骤

请移除冗余命令或将其标注为可选步骤,避免开发者误解标准工作流。

🤖 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` around lines 90 - 100, Update the README Development section to
match the actual recommended workflow: keep the core scripts that developers
should run regularly (`npm start`, `npm test`, and `npm run build`) and remove
or clearly mark `npm run tsc` and `npm run compile` as optional/internal steps
rather than standard development commands. Use the existing Development heading
and script list in README.md as the target location, and ensure the documented
flow reflects what package.json supports without suggesting redundant commands.
🤖 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 14-15: The reusable workflow call in the GitHub Actions config is
using a mutable `@main` ref and inheriting all secrets, so tighten it up in the
workflow job that references
react-component/rc-test/.github/workflows/test-utoo.yml. Pin the uses target to
the provided commit SHA instead of main, and replace secrets: inherit with an
explicit secrets mapping that passes only CODECOV_TOKEN. If needed, also update
the called workflow’s workflow_call declaration to require only that secret.

In `@README.md`:
- Around line 62-89: The README API table is out of sync with TriggerProps in
src/index.tsx: rename the documented `destroyPopupOnHide` entry to
`autoDestroy`, add the deprecated `onPopupVisibleChange` replacement
`onOpenChange` plus `afterOpenChange`, and include the missing props such as
`prefixCls`, `showAction`, `hideAction`, `popupMotion`, `maskMotion`,
`mouseEnterDelay`, `mouseLeaveDelay`, `focusDelay`, and `blurDelay`. Update the
descriptions/types/defaults to match the `TriggerProps` interface exactly so the
API docs reflect the current component surface.

---

Nitpick comments:
In `@README.md`:
- Around line 90-100: Update the README Development section to match the actual
recommended workflow: keep the core scripts that developers should run regularly
(`npm start`, `npm test`, and `npm run build`) and remove or clearly mark `npm
run tsc` and `npm run compile` as optional/internal steps rather than standard
development commands. Use the existing Development heading and script list in
README.md as the target location, and ensure the documented flow reflects what
package.json supports without suggesting redundant commands.
🪄 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: 2baf11e0-4ead-4379-8e2f-3dec2a138683

📥 Commits

Reviewing files that changed from the base of the PR and between 97703ff and 33e8ff1.

📒 Files selected for processing (15)
  • .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
  • .gitignore
  • README.md
  • docs/index.md
  • now.json
  • package.json
  • tsconfig.json
  • vercel.json
💤 Files with no reviewable changes (2)
  • .github/workflows/main.yml
  • now.json

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

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown

React Doctor found no issues. 🎉

Reviewed by React Doctor for commit 2e7ad96.

@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
Updatednpm/​@​types/​jest@​30.0.0 ⏵ 29.5.14100 +110077 +180100
Addednpm/​gh-pages@​6.3.09910010082100
Addednpm/​@​testing-library/​react@​15.0.710010010087100

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