feat(webconfig): show claim status above the activity log#31
Merged
Conversation
The Claim activity panel was just a journalctl tail. Once feed PR #100's timer-stop ships, the journal becomes empty on already-claimed feeders, and the panel looks broken ("no log entries yet") even though the feeder is fine. Add a Claim status header card sourced from GET /api/identity, which now carries the secret-file mtime + version sidecar so the UI can render "Claimed ✓, last updated …, version vN" without depending on journal retention. Polls every 5s for the lifetime of the panel with overlap + lifecycle guards so a stale response can't clear the next panel's timer or trigger a stray auth redirect.
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.
The Claim activity panel was a bare
journalctl -u airplanes-claim.servicetail. With airplanes-live/feed#100 (merged on the feed dev branch) the post-claim retry timer now stops, so the journal stays empty on already-claimed feeders and the panel renders(no log entries yet)— visually indistinguishable from a broken feeder.This PR adds a Claim status header card above the journal stream, sourced from
GET /api/identity. The endpoint now carries two new fields —claim_secret_updated_at(RFC3339 UTC mtime of the secret file) andclaim_secret_version(from the version sidecar) — so the UI can render "Claimed ✓ — Last updated … — Version vN" without depending on journal retention. Both fields ship with stable zero values for unclaimed feeders rather than being omitted, so downstream consumers don't have to distinguish absence from empty.The status card polls
/api/identityevery 5 s for the lifetime of the panel, with overlap and navigate-during-poll guards so a stale response can't clear the next panel's timer or trigger a stray auth redirect. The journal stream below is unchanged;logViewerwas refactored into a smallstreamLog(slug)helper that both the generic log view and the new panel reuse.