Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Contributor
ePlus OnAir — PR Preview✅ Preview ready for commit d8f8ce5 (public SHA and noindex verified). Open preview · View build status Static preview: representative routes only; full catalog remains on Staging after merge. Noindex and production GA4 disabled. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reproduction / impact
createOnlineDurationTrackercaps a single unflushed interval at 15s. If a foreground timer is delayed, user interaction at 15s previously only updatedlastActivityAt, without flushing. Stopping at 20s then records 15s instead of 20s, despite explicit activity at 15s. This is an independently testable foreground timing edge case relevant to #328.Change
On user activity, flush an active interval if it reached
MAX_ONLINE_CHECKPOINT_MS, before resetting the idle deadline. Preserve existing handling for activity after idle and cap long timer gaps. No extra writes for interactions shorter than the checkpoint threshold.Regression
Added
foreground activity checkpoints a delayed timer before later time is lostexpecting [15000, 5000] for activity at 15s and stop at 20s. The old implementation yields [15000] (single capped interval). Full npm test, Node execution, CI and browser tests have not yet been run/verified.Risk / acceptance
Low: may add one persistence write on foreground input after a delayed >=15s timer; does not affect audio playback. Accept when npm test and CI pass, and both idle-gap safety and delayed foreground activity regressions pass. No merge/deploy requested.