Conversation
|
Someone is attempting to deploy a commit to the afc163's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. Walkthrough通知组件现在将最新计时进度保存在 ref 中。仅当进度条显示时,组件才因进度变化更新渲染状态。新增测试覆盖进度显示切换、倒计时和暂停行为。 Changes通知倒计时进度渲染
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change avoids unnecessary renders while retaining countdown and progress-display behavior. No actionable merge-blocking risk is established; merge after normal checks pass. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
b9eb7ff to
56cddc6
Compare
Problem
A timed notice currently passes
setPercenttouseNoticeTimereven whenshowProgressis omitted or false. Every animation-frame timer tick then commits another notification render without any visible progress to update. Ant Design Message also uses this path.A React Profiler regression reproduces 33 commits, including the initial mount, over 512 ms for a single notice with hidden progress.
Change
Only update progress state while
showProgressis enabled. Track elapsed progress in a ref without triggering renders, and synchronize state when the progress bar is enabled, including while the countdown is paused. The existing timer continues to run, preserving auto-close and hover pause/resume behavior. The same profiler check now records only the initial mount.Add five regression cases covering omitted/false
showProgress, visible progress updates, automatic closing at the original duration, and enabling progress during running or paused countdowns without restarting them.Validation
npm test -- --maxWorkers=2).npm run tscpasses.npm run lintpasses with 10 existing warnings in untouched files.npm run compilepasses for ESM/CJS and declarations.Summary by CodeRabbit