{{ message }}
fix(rtc): do not mark sync idle when checksums diverge - #13169
Open
tiensonqin wants to merge 1 commit into
Open
Conversation
The RTC indicator treated an open websocket with zero pending ops as idle/green even when local and remote checksums differed. Require matching checksums for idle, show a warning state and details when they diverge. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change aligns with the stated behavior, adds targeted test coverage, and includes required i18n updates for the new user-facing strings.
Pull request overview
This PR fixes the RTC cloud sync indicator so it no longer shows an idle/green state when local and remote checksums are both present but differ, and surfaces a checksum mismatch warning (with the actual checksums) in the details popup.
Changes:
- Add checksum divergence detection and incorporate it into the indicator state/class computation (idle is suppressed when checksums diverge).
- Show a checksum-mismatch warning plus local/remote checksum values in the sync details popup whenever divergence is detected.
- Add CSS styling for the new
divergedstate and add unit tests covering match/mismatch/unknown checksum cases and pending-count precedence.
File summaries
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.

Fixes logseq/db-test#1147.
The RTC cloud indicator treated an open websocket with zero pending local/asset/server ops as idle (green), even when
local-checksumandremote-checksumwere both present and different. Clients could therefore show sync complete while journal content still diverged.Behavior
divergedwarning state (red) instead of green idle.queuing/syncing.Tests
bb dev:test -v frontend.components.rtc.indicator-test— 12 tests, 41 assertions, 0 failures.Also green:
clj-kondoon the changed indicator files,bb lang:validate-translations, andbb lang:lint-hardcoded --git-changed.