Repository navigation
feat(push): one Live Activity for every linked environment - #907
Merged
Merged
Conversation
A phone showed one Live Activity (or ongoing notification) per environment, so a second machine meant a second card. The phone now names one environment for its card (Settings → Notifications, the first one added by default). Every other environment linked to it hands its threads over the link, and ends its own card for that phone while the chosen one shows them. A linked environment that goes quiet, such as a laptop asleep, leaves the card after ten minutes, and one that cannot reach the chosen environment shows its own card. Alerts stay per environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trancong12102
force-pushed
the
feat/push-one-live-activity
branch
from
December 1, 2026 09:36
5feb3e7 to
72059d6
Compare
trancong12102
enabled auto-merge (squash)
December 1, 2026 09:36
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.
A phone showed one Live Activity (or Android ongoing notification) per environment, so linking a second machine meant a second card on the Lock Screen. The gateway keeps no state and the app cannot merge cards from the background, so the merge has to happen in an environment.
How it works
activityHubin the device preferences). Settings → Notifications gets a "Show every environment on one card" choice when more than one environment is saved; the first one added is the default, and "One card per environment" keeps the old behaviour.POST /api/peer-link/push-activity, admitted only for a link's own session with Linked environments on, like client pairing). The chosen environment answers which devices it now covers. The sender then ends its own card for those devices.linkPushActivitycapability), shows its own card. Before the first answer it holds its card instead of starting one it would end again.Verification
PushNotifications.test.ts: a sender hands its threads over, holds then ends its own card, ignores steps of unchanged work, falls back to its own card when the chosen one is unreachable, and keeps its alerts. The chosen environment merges a linked environment's threads only for devices that chose it, and drops them after the lease.PushActivityRelay.test.ts: report through a real link to a served peer; refused when the peer's Linked environments is off; no request to a peer without the capability.pushRegistration.test.ts: hub choice resolution.vp run check:changedpasses.Before this change, the section does not exist.
🤖 Generated with Claude Code
Claude Opus 5.5 in Claude Code.