feat(alerts): push local ack to cloud (desktop→cloud read-state sync)#28
Merged
proofofprints merged 2 commits intoJun 18, 2026
Merged
Conversation
…obile acknowledge_alert previously only flipped the local flag — nothing reached the cloud, so a read marked on the desktop never showed up on the web portal or mobile app. It now POSTs the alert's (ruleName, minerIp, timestamp) tuple to the new /ingest/alert-read endpoint after marking it locally, falling back to the offline queue (drained by the sync loop) when offline or on failure. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YYr4XG3SBHoSpP33d84Jqa
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.
Why
acknowledge_alertonly flipped the local flag — nothing reached the cloud, so a read marked on the desktop never showed up on the web portal or mobile app. (The reverse direction, cloud→desktop, was already handled inws.rs.)What
acknowledge_alertnow POSTs the alert's(ruleName, minerIp, timestamp)tuple to the cloud's newPOST /api/v1/ingest/alert-readafter marking it read locally. The cloud matches by tuple (the desktop never stores the cloud's surrogate alertId).alert-readqueue kind).client::push_alert_read.Companion PR
/ingest/alert-readendpoint this calls.Test plan
cargo test/build isn't runnable in this sandbox (missing system GTK/GDK dev libs); verify in CI/locally. The mutex guard for the API key is dropped before the await, keeping the command futureSend.Generated by Claude Code