Skip to content

chore: standardize repository tooling#1229

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

chore: standardize repository tooling#1229
afc163 wants to merge 2 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Redesign README with a centered @rc-component/select header, package-specific emoji description, focused highlights, install, usage, examples, API, development, and release sections.
  • Restore the Bundlephobia minzip badge, keep the explicit npm install @rc-component/select command, and add a subtle Ant Design ecosystem note.
  • Mark README usage as a pure snippet so dumi preview builds do not compile it as a live demo.
  • Document the current prepublishOnly release flow.
  • Include dumi/father config files in TypeScript project scope.
  • Switch the primary rc-test reusable workflow to test-utoo.yml.
  • Add explicit Vercel preview configuration for the .doc dumi build output.
  • Add Surge Preview and optional Cloudflare Pages Preview fallback workflows.
  • Add the React Doctor GitHub Action for pull requests and pushes to master.
  • Normalize .github/FUNDING.yml to Ant Design sponsorship entries.
  • Update CodeQL to the current v4 action and pin touched actions to immutable SHAs, using checkout v7 with persisted credentials disabled.
  • Address AI review feedback by using the options prop in README usage and correcting SearchConfig defaults.

Compatibility

No runtime code changes. This should not introduce breaking changes.

Verification

  • npm run lint
  • npm test
  • npm run tsc
  • npm run compile
  • npm run build
  • git diff --check

Refs ant-design/ant-design#58514

@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)
select Ready Ready Preview, Comment Jun 26, 2026 7:09am

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

新增 React Doctor 和 Surge Preview 工作流,补充 Vercel 构建配置;重写 README 的结构、使用说明、API 和发布信息;并在 tsconfig.json 中补充 include

Changes

项目自动化与文档更新

Layer / File(s) Summary
工作流与部署配置
.github/workflows/react-doctor.yml, .github/workflows/surge-preview.yml, vercel.json
新增 React Doctor 与 Surge Preview 工作流,并为 Vercel 补充安装、构建和输出目录配置。
README 开头与使用说明
README.md
README 的标题、简介、徽标、Highlights、Install、Usage 和 Examples 章节被重写。
README API 参考
README.md
README 的 Select、Methods、SearchConfig、Option 与 OptGroup 参考表被重写。
README 结尾与编译配置
README.md, tsconfig.json
README 的 Development、Release 和 License 章节被重写,tsconfig.json 补充了 include 配置。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

(\_/)
小兔跳过新工作流,
README 换上整齐的胡萝卜图谱,
预览与部署一起亮起灯,
tsconfig 把路径轻轻收拢,
咔嚓一口,代码田更清爽了 ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 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 README.md with modernized API documentation, usage examples, and development instructions, and updates tsconfig.json to include configuration and source directories. The review feedback suggests updating the README usage example to use the recommended 'options' prop instead of the legacy 'Option' component. Additionally, it points out that including '.fatherrc.js' in tsconfig.json without enabling 'allowJs' will cause a TypeScript compilation error.

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 README.md Outdated
Comment on lines 16 to 27
import Select, { Option } from '@rc-component/select';
import '@rc-component/select/assets/index.css';

export default () => (
<Select>
<Option value="jack">jack</Option>
<Option value="lucy">lucy</Option>
<Option value="yiminghe">yiminghe</Option>
</Select>
import React from 'react';
import { createRoot } from 'react-dom/client';

createRoot(document.getElementById('root')!).render(
<Select placeholder="Select a user">
<Option value="jack">Jack</Option>
<Option value="lucy">Lucy</Option>
<Option value="yiminghe">Yiminghe</Option>
</Select>,
);

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.

medium

The main usage example in the README uses the legacy Option component. However, the API documentation below explicitly states that Option is a legacy placeholder component and recommends preferring the options prop for new usage. Updating the usage example to use the options prop maintains consistency and promotes best practices.

Suggested change
import Select, { Option } from '@rc-component/select';
import '@rc-component/select/assets/index.css';
export default () => (
<Select>
<Option value="jack">jack</Option>
<Option value="lucy">lucy</Option>
<Option value="yiminghe">yiminghe</Option>
</Select>
import React from 'react';
import { createRoot } from 'react-dom/client';
createRoot(document.getElementById('root')!).render(
<Select placeholder="Select a user">
<Option value="jack">Jack</Option>
<Option value="lucy">Lucy</Option>
<Option value="yiminghe">Yiminghe</Option>
</Select>,
);
import Select from '@rc-component/select';
import '@rc-component/select/assets/index.css';
import React from 'react';
import { createRoot } from 'react-dom/client';
const options = [
{ value: 'jack', label: 'Jack' },
{ value: 'lucy', label: 'Lucy' },
{ value: 'yiminghe', label: 'Yiminghe' },
];
createRoot(document.getElementById('root')!).render(
<Select placeholder="Select a user" options={options} />,
);

Comment thread tsconfig.json
}
}
},
"include": [".dumirc.ts", ".fatherrc.js", "src", "tests", "docs"]

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.

medium

Including .fatherrc.js in the include array without enabling "allowJs": true in compilerOptions causes TypeScript to throw an error during compilation (e.g., error TS6054: File '.fatherrc.js' has an unsupported extension). To resolve this, add "allowJs": true to the compilerOptions section of tsconfig.json.

@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 99.47%. Comparing base (866e4d4) to head (4e7a280).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1229      +/-   ##
==========================================
+ Coverage   99.44%   99.47%   +0.03%     
==========================================
  Files          31       31              
  Lines        1263     1339      +76     
  Branches      462      491      +29     
==========================================
+ Hits         1256     1332      +76     
  Misses          7        7              

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

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 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-doctor.yml:
- Around line 18-20: The checkout step is currently persisting the GitHub token
into local git config by default, which can expose credentials to later actions
in the same job. Update the actions/checkout@v5 usage in the workflow to
explicitly set persist-credentials to false alongside fetch-depth so the token
is not stored.
- Around line 18-21: The workflow currently uses mutable Action tags and leaves
checkout credentials persisted, so update the actions in the workflow to pinned
commit SHAs for both actions/checkout and millionco/react-doctor, and add
persist-credentials: false under the checkout step. Use the existing
actions/checkout and millionco/react-doctor steps to locate the changes.

In `@README.md`:
- Around line 86-96: The SearchConfig table is documenting incorrect defaults
for filterOption and optionFilterProp; only autoClearSearchValue has a real
runtime default. Update the README entry for SearchConfig so filterOption and
optionFilterProp no longer show default values (or mark them as none), and keep
the descriptions aligned with the actual behavior in the search config handling.
🪄 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: 1c17bf59-520f-4101-b8b8-3fe5bed8a7b8

📥 Commits

Reviewing files that changed from the base of the PR and between 866e4d4 and d9f9b8e.

📒 Files selected for processing (3)
  • .github/workflows/react-doctor.yml
  • README.md
  • tsconfig.json

Comment thread .github/workflows/react-doctor.yml Outdated
Comment thread .github/workflows/react-doctor.yml Outdated
Comment thread README.md
@afc163 afc163 force-pushed the codex/standardize-rc-config branch from d9f9b8e to f4de537 Compare June 26, 2026 03:36
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

✅ Preview is ready!

PR preview ✅ Ready ✅ Ready
🔗 Preview https://react-component-select-preview-pr-1229.surge.sh
📝 Commit4e7a280
⏱️ Build time84.428s
📦 Size2.0 MB (+232 B ⬆️) · 150 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ 4e7a280 · react-component-select-preview-pr-1229.surge.sh (open ↗) · 2026-06-26 07:04:53 UTC

🤖 Powered by surge-preview

@coderabbitai coderabbitai 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.

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 17-18: This workflow still uses floating action tags and leaves
checkout credentials persisted, which expands supply-chain and token exposure
risk. Update the `actions/checkout` step to disable credential persistence, and
pin both `actions/checkout` and `afc163/surge-preview` in the workflow to
immutable version identifiers (preferably full commit SHAs) so the exact action
code cannot drift over time.
🪄 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: 1c40c8a9-df2e-4cdb-a2c8-25fe24961083

📥 Commits

Reviewing files that changed from the base of the PR and between d9f9b8e and f4de537.

📒 Files selected for processing (5)
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • README.md
  • tsconfig.json
  • vercel.json
✅ Files skipped from review due to trivial changes (2)
  • tsconfig.json
  • README.md

Comment thread .github/workflows/surge-preview.yml Outdated
@github-actions

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 4e7a280.

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