Repository navigation
Keep the event stream open in the iOS app switcher - #110
Merged
Merged
Conversation
iOS reports "inactive" while the app switcher, Control Center, Notification Center, or a system prompt covers the app. The transport treated every state other than "active" as background, so swiping up to switch apps closed the event stream and showed the stale-request and saved-data notices on the workspace card. Only "background" now closes the stream and pauses query focus. Leaving for another app still reaches "background" and reconnects on return.
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.
Summary
On an iPhone, swiping up to the app switcher showed "Request status is stale. Reconnect to check pending requests." and "Showing saved data until the server reconnects." on the workspace card, every time.
inactivewhile the app switcher, Control Center, Notification Center, or a system prompt covers the app. The transport treated every state other thanactiveas background. It closed the event stream and set the status tostale, and after the 1-second notice delay both warnings appeared.isTransportForegroundtreats onlybackgroundas leaving the foreground. The transport's startup state and the AppState listener both use it, for the coordinator and for TanStack Query focus.inactivekeeps the stream open.background, closes the stream, and reconnects on return. Android does not reportinactive.This change is already published as an EAS Update to
preview(runtime 0.1.6), built on87974aaplus this change, after both native fingerprints matched the installed baseline.Verification
pnpm check(1533 mobile tests, adapter tests, both Hermes exports)pnpm native:doctor(18/18)pnpm crap --threshold 30inactiveat startup keeps the transport in the foreground, aninactivechange keeps query focus, andbackgroundstill drops it.docs/COMPATIBILITY.md. Check that no notice appears while hovering in the app switcher, and that switching to another app and back reconnects cleanly.TODO.mdreflect the resulting behavior.