Skip to content

feat(alerts): push local ack to cloud (desktop→cloud read-state sync)#28

Merged
proofofprints merged 2 commits into
mainfrom
claude/overmanager-alert-control-sync-dsu4ko
Jun 18, 2026
Merged

feat(alerts): push local ack to cloud (desktop→cloud read-state sync)#28
proofofprints merged 2 commits into
mainfrom
claude/overmanager-alert-control-sync-dsu4ko

Conversation

@proofofprints

Copy link
Copy Markdown
Collaborator

Why

acknowledge_alert 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. (The reverse direction, cloud→desktop, was already handled in ws.rs.)

What

  • acknowledge_alert now POSTs the alert's (ruleName, minerIp, timestamp) tuple to the cloud's new POST /api/v1/ingest/alert-read after marking it read locally. The cloud matches by tuple (the desktop never stores the cloud's surrogate alertId).
  • Best-effort with offline durability: on failure or when logged out, the push is enqueued and drained by the existing 60s sync loop (new alert-read queue kind).
  • New client::push_alert_read.

Companion PR

  • overbuildlabs/OverCloud — adds the /ingest/alert-read endpoint this calls.

Test plan

  • Ack an alert on desktop → shows read on portal/mobile within a sync cycle.
  • Note: 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 future Send.

Generated by Claude Code

claude added 2 commits June 16, 2026 12:31
…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
@proofofprints proofofprints merged commit af59265 into main Jun 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants