Skip to content

fix(mobile): keep relay sessions stable during push lease updates (upstream #7745) - #208

Merged
RossHartmann merged 3 commits into
mainfrom
mobile-relay-session-stable-push-20261017
Oct 17, 2026
Merged

RossHartmann merged 3 commits into
mainfrom
mobile-relay-session-stable-push-20261017

Conversation

@RossHartmann

Copy link
Copy Markdown

Backports upstream block/buzz 4af2324 (block#7745) unchanged, with the original authorship kept and -x attribution.

Problem seen in production (2026-10-17): After Ross turned on push in TestFlight build 1, his relay session went into a reconnect loop: connect, NIP-42 auth, close about 1.5s later, roughly every 2s. The kind-30350 lease never reached the relay, so push_leases has 0 rows. This happens because reserving a lease generation updates the community, and RelayConfigNotifier watched the whole active community, so every update rebuilt the relay session and killed the publish that was in flight.

Fix (upstream): The relay config now selects only the community's id, relay URL and nsec. Upstream's regression test comes with it.

Fork inventory: Adds a drop/upstream-present delta covering both paths, plus the budget amendment upstream-7745-relay-session-stable: modified upstream files go from 275 to 276, and the production-source budgets are unchanged. scripts/check-kiingo-fork-boundary.mjs passes.

Tests run in CI only.

🤖 Generated with Claude Code

brow and others added 2 commits October 17, 2026 10:26
…ock#7745)

Enabling push notifications could repeatedly reset the relay session:
reserving a lease generation updates community metadata, which rebuilt
the relay configuration even though the connection identity was
unchanged. This made the avatar and inbox flash and prevented the new
lease from publishing.

Select only the community ID, relay URL, and signing identity as
configuration dependencies. Push bookkeeping keeps the session intact;
real community, URL, and identity changes still notify listeners.

### Validation
The production-provider regression test failed before the fix and passes
afterward; 48 focused mobile tests and static analysis pass.

A personal signed profile build on a physical iPhone published a fresh
lease and received a background notification with the actual message
text. The user confirmed the flashing stopped and tapping the
notification opened the correct community/channel and highlighted the
exact message.

Signed-off-by: Tom Brow <[email protected]>
(cherry picked from commit 4af2324)
@RossHartmann
RossHartmann merged commit e6157f2 into main Oct 17, 2026
RossHartmann pushed a commit that referenced this pull request Oct 17, 2026
…am-60de1db0

Conflict resolutions:
- iOS Xcode 27 picks (#199) and the block#7745 backport (#208) are upstream
  commits already in the 97e1f6a snapshot: take the sync side for every
  #199 path and drop both drop/upstream-present deltas.
- deny.toml: keep upstream's ignores and main's RUSTSEC-2026-0367/0368/0369;
  the sync tree pulls zip 8.6.0 via mesh-llm v0.76.2, re-audited: plugin
  manager and autoupdate still never call extract() and write plain files.
- Message Details (#205): desktop composes the host ref with the right-click
  root ref; mobile adds Details to upstream's grouped action sheet (the
  popover was removed upstream in block#8280) with a Tabler info-circle icon;
  retired-notice filtering passes agentPubkeys at upstream's new
  formatTimeline call sites.
- Hosted agents (#201): Lucide icons -> BuzzIcons (lucide removed upstream).
- Inventory: sync inventory plus main's new deltas (remote signer, guest
  alert Review, Message Details) and the merged hosted-agents delta paths.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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