fix: preserve remaining duration when paused repeatedly - #417
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 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本次修改在 Changes通知计时器暂停与恢复
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The change prevents repeated pauses from counting time spent hovering while preserving the remaining notice duration after resume. No actionable merge-blocking risk is identified; merge after normal checks pass. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #417 +/- ##
=======================================
Coverage 99.21% 99.21%
=======================================
Files 12 12
Lines 380 381 +1
Branches 103 103
=======================================
+ Hits 377 378 +1
Misses 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
❌ Deploy failed
📋 Build log (last lines)🤖 Powered by surge-preview |
|||||||||

Summary
Moving between stacked notices can pause an already paused timer again. This incorrectly counts time spent hovering while the progress bar remains frozen, causing notices to close immediately when the pointer leaves the list.
Clear the timer timestamp after pausing so repeated pauses preserve the remaining duration. Add a regression test covering repeated pauses, frozen progress, and closing only after the remaining duration elapses.
Validation
Summary by CodeRabbit
Bug Fixes
Tests