Repository navigation
fix(Input.Password): respect controlled visibility state - #59168
Conversation
|
|
👁 Visual Regression Report for PR #59168 Passed ✅
🎊 Congrats! No visual-regression diff found.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughSummary by CodeRabbit
Walkthrough受控模式下, Changes密码可见性控制
Estimated code review effort: 2 (简单) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change keeps password visibility under the parent-controlled state while preserving uncontrolled behavior and the existing callback contract. No actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. ✨ 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. Comment |
size-limit report 📦
|
Bundle ReportChanges will increase total bundle size by 6 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
|
More templates
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #59168 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 834 834
Lines 15994 15995 +1
Branches 4204 4205 +1
=========================================
+ Hits 15994 15995 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Deploying ant-design with
|
| Latest commit: |
16e6660
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6f20aa37.ant-design.pages.dev |
| Branch Preview URL: | https://fix-input-password-controlle.ant-design.pages.dev |
nrps9909
left a comment
There was a problem hiding this comment.
Reviewed exact head 16e6660c330abc4eadbee80b20eccc02c0b82982.
The regression is causal: applying only the submitted test to base c99d71d06c fails because the controlled-false input changes to type="text"; the exact head keeps the input controlled while still emitting onVisibleChange(true). I also ran an independent matrix covering controlled true and false, keyboard activation/callback direction, and transition back to uncontrolled behavior. The focused run passed 27 tests including that temporary probe and 5 snapshots; ESLint, Biome, git diff --check, and all current substantive remote checks are green. The temporary probe was removed and the exact-head worktree is clean.
AI assistance disclosure: Codex was used to inspect the controlled-state path, run the base-vs-head reproduction, author the temporary boundary probe, and draft this review. I independently verified the exact head and results.


English Template / 英文模板
🤔 这个变动的性质是?
🔗 相关 Issue
fix #59167
💡 需求背景和解决方案
Input.Password 使用
visibilityToggle.visible受控显隐状态时,点击显隐图标仍会更新组件内部状态,导致密码在受控值保持false时也被显示。受控模式下不再更新内部显隐状态,仅触发
onVisibleChange通知外部更新;非受控模式保持原有行为。同时补充回归测试,确保点击图标不会绕过受控值。📝 更新日志