Skip to content

App: repeater claims cache can badge another radio's claim until the first reconcile #516

Description

@MrAlders0n

The claims cache in AppStateProvider is keyed by companion public key. repeaterClaims returns the connected companion's list when it has an entry, otherwise the union of every cached companion's claims. That fallback is what lets My Repeaters show without a radio, but it also means a companion with no entry yet (first connect, before the mine reconcile lands, or permanently against a server without the /repeater leg) sees every other radio's claims badged as its own. The detail sheet then says "You administer this repeater" for a claim another radio made. It self-corrects once the reconcile answers.

Related:

  • _removeClaim strips the repeater from every companion's cached list, while _upsertClaim writes only the connected one. The server's unclaim deletes only the caller's row, so a second radio's genuine claim vanishes from the cache until its next reconcile.
  • _reconcileRepeaterClaims captures the companion key before the mine await and writes the answer under it afterwards. If the companion changes during the round trip the list lands under the wrong key.

Worth deciding on purpose: either gate the union on "no radio connected" and show nothing for a connected companion until its reconcile lands, or keep the union and accept the brief mislabel. Multi-radio users are the ones who would notice.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions