Repository navigation
Today: debounce the pull-to-sync vessel so per-chunk backfill can't flicker it (#587 follow-up) - #608
Merged
Conversation
…licker it (#587 follow-up) Follow-up to #590. That change tied the pull-to-sync vessel + "Syncing…" label to `live.backfilling`, but that flag toggles false→true between EVERY offload chunk (exitBackfilling at each HISTORY_END → auto-continue re-kick → beginBackfill), with a real BLE gap in between. A deep backlog is now up to ~24 chunks in one connection (#594 raised the auto-continue cap 6→24), so the vessel strobed in/out on every chunk boundary — the exact per-chunk toggle the MenuBar header already pins a constant height against. Debounce the visibility: a new @State `syncing` goes true instantly on syncingRaw, but goes false only after riding out a 3s quiet window with no new chunk (cancelled the moment the next chunk arrives). So the vessel stays steady through a multi-chunk drain and only drops when the sync is genuinely done. iOS/macOS shared (LiquidTodayView), one file. swiftc -parse clean; i18n audit exit 0 (reuses the existing "Syncing…" key). App-target compile to be confirmed by app-build.
DX23876
pushed a commit
to DX23876/noop
that referenced
this pull request
Jul 22, 2026
…licker it (ryanbr#587 follow-up) (ryanbr#608) Follow-up to ryanbr#590. That change tied the pull-to-sync vessel + "Syncing…" label to `live.backfilling`, but that flag toggles false→true between EVERY offload chunk (exitBackfilling at each HISTORY_END → auto-continue re-kick → beginBackfill), with a real BLE gap in between. A deep backlog is now up to ~24 chunks in one connection (ryanbr#594 raised the auto-continue cap 6→24), so the vessel strobed in/out on every chunk boundary — the exact per-chunk toggle the MenuBar header already pins a constant height against. Debounce the visibility: a new @State `syncing` goes true instantly on syncingRaw, but goes false only after riding out a 3s quiet window with no new chunk (cancelled the moment the next chunk arrives). So the vessel stays steady through a multi-chunk drain and only drops when the sync is genuinely done. iOS/macOS shared (LiquidTodayView), one file. swiftc -parse clean; i18n audit exit 0 (reuses the existing "Syncing…" key). App-target compile to be confirmed by app-build.
simoncad7
pushed a commit
to simoncad7/noop
that referenced
this pull request
Aug 17, 2026
…licker it (ryanbr#587 follow-up) (ryanbr#608) Follow-up to ryanbr#590. That change tied the pull-to-sync vessel + "Syncing…" label to `live.backfilling`, but that flag toggles false→true between EVERY offload chunk (exitBackfilling at each HISTORY_END → auto-continue re-kick → beginBackfill), with a real BLE gap in between. A deep backlog is now up to ~24 chunks in one connection (ryanbr#594 raised the auto-continue cap 6→24), so the vessel strobed in/out on every chunk boundary — the exact per-chunk toggle the MenuBar header already pins a constant height against. Debounce the visibility: a new @State `syncing` goes true instantly on syncingRaw, but goes false only after riding out a 3s quiet window with no new chunk (cancelled the moment the next chunk arrives). So the vessel stays steady through a multi-chunk drain and only drops when the sync is genuinely done. iOS/macOS shared (LiquidTodayView), one file. swiftc -parse clean; i18n audit exit 0 (reuses the existing "Syncing…" key). App-target compile to be confirmed by app-build.
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 #590 (which fixed #587 — the pull-to-sync vessel vanishing mid-sync). #590 tied the vessel + "Syncing…" label to
live.backfilling, which surfaced a flicker the review flagged.The flicker
state.backfillingtoggles false→true between every offload chunk:exitBackfilling()sets it false at eachHISTORY_END, then the auto-continue re-kick callsbeginBackfill()which sets it true again for the next chunk — with a real BLE round-trip gap in between. So binding the vessel straight torefreshing || live.backfillingstrobes it in/out (64 pt height animation + label blink) on every chunk boundary. This is the exact per-chunk toggle the MenuBar header already pins a constant height against (MenuBarContent.syncLine), and it's amplified by #594 (auto-continue cap raised 6→24), which makes a deep backlog drain in up to ~24 chunks in one connection — so up to ~24 flicker cycles.The fix
Debounce the visibility. A new
@State private var syncingdrives the body: it goes true instantly whensyncingRaw(refreshing || live.backfilling) becomes true, but goes false only after a 3 s quiet window with no new chunk — cancelled the moment the next chunk arrives. So the vessel stays steady through a multi-chunk drain and only drops when the sync is genuinely finished (3 s is comfortably longer than an inter-chunk gap). No visible change for a single-chunk sync or the pull-in-progress/idle states.Scope
iOS/macOS shared (
Strand/Liquid/LiquidTodayView.swift), one file,LiquidRefreshIndicatoronly. No BLE/protocol change — samelive.backfillingread, just debounced. Uses the existingonChangeCompathelper (iOS 17 / macOS 14 split).Verification
swiftc -parseclean;i18n_audit.py --ci mainexit 0 (reuses the existing "Syncing…" key — no new literal). App-target compile confirmed via an on-demandapp-buildrun (see checks).Note — the other review item is deliberately NOT here
#590's
|| live.backfillingalso makes the vessel appear for BACKGROUND syncs (periodic/on-connect/auto-continue), not just the user's pull. That's a behavior decision (accept "show syncing whenever syncing" vs. gate to pull-initiated), separate from this flicker fix — happy to follow up if you want it gated.