fix: reset duration when updating notices - #409
Conversation
|
@nrps9909 is attempting to deploy a commit to the afc163's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. Walkthrough
Changes通知计时器重置
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change restarts a notification's auto-close duration when the same notice is updated while preserving paused behavior. Its impact is limited to local notification timing, and no actionable merge-blocking risk remains beyond normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #409 +/- ##
==========================================
+ Coverage 99.20% 99.21% +0.01%
==========================================
Files 12 12
Lines 376 383 +7
Branches 102 103 +1
==========================================
+ Hits 373 380 +7
Misses 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
timesupdate counter without resuming a paused noticeProblem
Notifications.openincrementstimeswhen an existing key is updated, butNotificationdid not pass that value to its timer. When a one-second notice was updated after 800 ms with the same one-second duration, it still closed about 200 ms later instead of remaining visible for another full second.Validation
vitest run --maxWorkers=1(3 files, 53 tests)tsc --noEmitfather build(ESM, CJS, declarations)git diff --checkI also checked the current open issues and PRs. The timer-related open PRs cover maximum timeout clamping, hover resume behavior, page blur, or progress styling; none resets the same-key update timer.
Summary by CodeRabbit
新功能
错误修复
测试