Skip to content

Device groups: phones learn about a computer that switched phone access on later - #221

Merged
danielehrhardt merged 2 commits into
mainfrom
fix/phone-group-peers
Oct 21, 2026
Merged

danielehrhardt merged 2 commits into
mainfrom
fix/phone-group-peers

Conversation

@danielehrhardt

Copy link
Copy Markdown
Contributor

Found while checking #218 with the real phone app in the simulator: a phone paired with the primary got a group list with only the primary. The secondary switched its phone access on when the pairing arrived, but the primary only read the secondary's info (its phone address) at connect, so the phone had nowhere to fail over to.

  • Each pull between the computers of a group also asks the other computer what it says about itself (refreshRunnerInfo); when its phone address changed, the group is announced (devices.updated).
  • A computer that switches phone access on for a phone of the group says so right away (the others pull, and so refresh).
  • The phone app reloads its group list (/api/mobile/me) on devices.updated.
  • e2e: what the primary says about itself is asked again with each pull (devices-e2e.test.ts).

Tests: devices-e2e, replica, mobile pass; core and phone typecheck pass.

…ss on later

A computer's info (where phones reach it) was only read at connect. A secondary that got
phone access after it connected (when a phone pairing arrived) never showed up in the
primary's group list, so a phone paired with the primary had nowhere to fail over to.
Each pull now asks again, the group is announced when a phone address changed, the
computer that switched phone access on says so at once, and the phone app reloads its
group list on devices.updated.
@danielehrhardt
danielehrhardt merged commit 1eead0f into main Oct 21, 2026
8 checks 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.

1 participant