Conversation
Deploying ant-design-x with
|
| Latest commit: |
c05d088
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fdd968ba.ant-design-x.pages.dev |
| Branch Preview URL: | https://changelog.ant-design-x.pages.dev |
📝 WalkthroughWalkthrough更新为 2.7.0 发布:版本号和 changelog 更新;为 x-card 引入/完善 v0.8 与 v0.9 的操作上下文类型与解析(路径引用解析与合并行为调整)、增强测试覆盖,并同步更新若干技能文档示例与站点说明。 Changes
Sequence Diagram(s)sequenceDiagram
participant UI as UI Component
participant Card as x-card (resolver)
participant Data as DataModel
participant Handler as onAction handler
UI->>Card: 触发 action (可能含 path 或 literal)
Card->>Data: 读取 dataModel[path](若存在)
Data-->>Card: 返回值
Card->>Card: 合并为 { value, ...rest }(确保 value 不被 rest 覆盖)
Card->>Handler: 调用 onAction({ context: { key: { value, ... } } })
Handler-->>UI: 处理结果/副作用
Estimated code review effort🎯 3 (中等) | ⏱️ ~25 分钟 建议标签
建议审阅者
诗句
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
|
This comment is automatically generated by the x-markdown performance CI. |
There was a problem hiding this comment.
Code Review
This pull request bumps the version to 2.7.0 and introduces automatic action context path resolution (resolveActionContextPathRefs) for the @ant-design/x-card component, supporting both v0.8 and v0.9 formats. The implementation includes refined TypeScript interfaces for action configurations and updated documentation. Feedback points out a critical discrepancy where test assertions conflict with the code's behavior regarding literal value preservation in the merged context. Additionally, there is a redundant type cast in Card.tsx and a need for more precise documentation regarding which context keys are transformed versus those preserved as-is.
|
This comment is automatically generated by the x-markdown performance CI. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Line 3: The package.json bump to "2.7.0" lacks corresponding changelog
entries; update CHANGELOG.en-US.md and CHANGELOG.zh-CN.md with a 2.7.0 section
containing concise bullet points summarizing features, fixes and affected areas
(at least one-line summary per item) and include scope/impact notes; ensure the
new changelog headings match the version string in package.json and follow the
repository's existing formatting convention so the release tooling and users can
trace the changes.
In `@packages/x-card/src/A2UI/__tests__/Card.coverage.test.tsx`:
- Around line 768-807: The test asserts that configuration-side literal fields
like label are excluded from reported action context, but the current
implementation (resolveActionContextPathRefs in Card.tsx) preserves non-{path}
literals and merges them into the runtime context; update the failing assertions
in the test to expect the literal (e.g., label: 'static-label') to be present in
the reported context instead of absent, and make the same change for the other
similar assertions in the same test file that currently assert absence of
configuration literals so the tests match the existing
resolveActionContextPathRefs behavior.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: c199d625-3ff3-4aa8-acf6-ab9a11878fc0
📒 Files selected for processing (28)
CHANGELOG.en-US.mdCHANGELOG.zh-CN.mdpackage.jsonpackages/x-card/package.jsonpackages/x-card/src/A2UI/Card.tsxpackages/x-card/src/A2UI/Card.v0.8.tspackages/x-card/src/A2UI/Card.v0.9.tspackages/x-card/src/A2UI/__tests__/Card.coverage.test.tsxpackages/x-card/src/version.tspackages/x-markdown/package.jsonpackages/x-sdk/package.jsonpackages/x-skill/.claude-plugin/marketplace.jsonpackages/x-skill/package.jsonpackages/x-skill/skills-zh/use-x-chat/SKILL.mdpackages/x-skill/skills-zh/x-card/SKILL.mdpackages/x-skill/skills-zh/x-card/reference/ACTIONS.mdpackages/x-skill/skills-zh/x-chat-provider/SKILL.mdpackages/x-skill/skills-zh/x-components/SKILL.mdpackages/x-skill/skills-zh/x-markdown/SKILL.mdpackages/x-skill/skills-zh/x-request/SKILL.mdpackages/x-skill/skills/use-x-chat/SKILL.mdpackages/x-skill/skills/x-card/SKILL.mdpackages/x-skill/skills/x-card/reference/ACTIONS.mdpackages/x-skill/skills/x-chat-provider/SKILL.mdpackages/x-skill/skills/x-components/SKILL.mdpackages/x-skill/skills/x-markdown/SKILL.mdpackages/x-skill/skills/x-request/SKILL.mdpackages/x/package.json
size-limit report 📦
|
Bundle ReportBundle size has no change ✅ |
|
This comment is automatically generated by the x-markdown performance CI. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/x-skill/skills/x-card/reference/ACTIONS.md`:
- Around line 151-154: The examples show only using payload.context.xxx?.value
which breaks literal/ runtime-original-value cases; update the examples (the
lines using payload.context.email?.value and payload.context.name?.value and the
similar blocks at the other occurrences) to either (A) add a fallback read that
prefers the .value when present and otherwise uses the raw context field, or (B)
change the comment to explicitly state “.value is only for path-bound fields”
and keep the examples as-is; implement option A by adjusting the example reads
to first check for a .value and fall back to the literal runtime value so both
binding styles work.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 0b913473-2a2b-4ae7-8070-612b319fa273
📒 Files selected for processing (3)
packages/x-card/src/A2UI/__tests__/Card.coverage.test.tsxpackages/x-skill/skills-zh/x-card/reference/ACTIONS.mdpackages/x-skill/skills/x-card/reference/ACTIONS.md
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/x-skill/skills-zh/x-card/reference/ACTIONS.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1891 +/- ##
=======================================
Coverage 97.61% 97.61%
=======================================
Files 158 158
Lines 5533 5537 +4
Branches 1628 1620 -8
=======================================
+ Hits 5401 5405 +4
Misses 130 130
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|

中文版模板 / Chinese template
🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
📝 Change Log
Summary by CodeRabbit
版本 2.7.0 发布说明
新功能
Bug 修复
文档
测试