Repository navigation
fix(ancs): treat the opening replay as backlog when there is nothing to compare it to - #349
Merged
Merged
Conversation
zackb
requested changes
Nov 24, 2026
zackb
left a comment
Owner
There was a problem hiding this comment.
Looks good. Just needs the comments fixed and rebase on main
| // up, so the same notification arrives again after each reconnect. Dedupe is | ||
| // on the notification UID, but a Modified event is a genuine update the user | ||
| // should see, so it is never suppressed by having seen the UID before. | ||
| // The replay that opens a session with nothing earlier to compare it against (the daemon just started): iOS does |
Owner
There was a problem hiding this comment.
This code was inserted between NotificationRegistry class and it's comments
Contributor
Author
There was a problem hiding this comment.
Moved ReplayBurst above it, and rebased on main.
…to compare it to an earlier session. The first session after the daemon starts has no earlier copy, and since zackb#343 the daemon restarts at every logout, so the same old entries still popped up once per login. When a session starts with an empty registry, the run of additions that opens it (the first within ReplayBurst::START of subscribing, then no gap longer than ReplayBurst::GAP) is marked pre-existing. Everything in that replay was already on the phone. A notification that lands inside the burst is still listed, just without a popup. Co-Authored-By: Claude Opus 5.5 <[email protected]>
fernando2393
force-pushed
the
pr/ancs-first-replay
branch
from
November 25, 2026 19:19
cfba896 to
dba605b
Compare
Contributor
Author
|
Heads-up: this and #341 both add tests at the end of |
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.
Follow-up to #348, for the gap discussed in #346: the first session after the daemon starts has no earlier copy to match against, and since #343 the daemon restarts at every logout, so the same old entries still popped up once per login.
Change
When a session starts with an empty registry, the run of additions that opens it is marked pre-existing. The run is the first addition within 10 s of subscribing, then no gap over 1 s (
ReplayBurst). Everything in that replay was already on the phone. A notification that happens to land inside the burst is still listed, just without a popup. Later sessions are untouched and rely on #348. This uses the daemon's own monotonic clock, never the phone's Date.Testing
ReplayBurstunit tests: the opening run counts, a late addition after the run doesn't, nothing counts without a start or once the start window has passed, and only additions belong to it. The suite passes.Independent of #348: they touch different functions, and either can land first.
🤖 Generated with Claude Code