Repository navigation
Reconnect the flipper right after the network returns or the tab wakes - #1567
Open
ekwav-agent wants to merge 3 commits into
Open
ekwav-agent wants to merge 3 commits into
ekwav-agent wants to merge 3 commits into
Conversation
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
Behaviour: Flipper resumes promptly after network return or wake-up, refreshes its countdown, and shows “Reconnecting…” while disconnected.
flowchart LR A[Online or visible again] --> B[Check socket health] B --> C[Reconnect stale socket] C --> D[Login and resubscribe] D --> E[Refresh countdown and status]More detail
Change: Reuse existing recovery with immediate retries, preserving healthy and connecting sockets.
Test:
What is the worst that could happen?
Incorrect checks could trigger unnecessary shared-socket reconnects and delay consumers; reverting restores prior behaviour.
Test repair prerequisite
This change builds on the test repair in PR #1565 at commit
70047de244fdaa1000c8dd97da231c9fcc857ee2. Merge that PR first, then merge this one. This PR targetsmainin the upstream repository; GitHub does not use the prerequisite fork branch as its base.Validation: 50/50 checks passed · reviewed in a separate claude session · dependencies unchanged.
Checks and provenance
node_26npm_ciproduction_buildtest_server_readyregression_base_fail_patch_passcypress_account-active-subscription_cy_tscypress_auction-start_cy_tscypress_auction_cy_tscypress_bazaar-plan_cy_tscypress_bazaar-snapshot-recovery_cy_tscypress_color-filter_cy_tscypress_copy-button_cy_tscypress_crafting-utils_cy_tscypress_crafts-multi-step_cy_tscypress_crafts_cy_tscypress_dom-translation_cy_tscypress_error-reporting_cy_tscypress_filter-result-id-utils_cy_tscypress_filter_cy_tscypress_flip-tracking-recovery_cy_tscypress_flipper-recovery_cy_tscypress_forge_cy_tscypress_generated-api-client_cy_tscypress_generated-api-response-utils_cy_tscypress_goal-utils_cy_tscypress_google-user-changed_cy_tscypress_hydration-safe-dates_cy_tscypress_in-game-command-utils_cy_tscypress_item-category-check_cy_tscypress_item-category-utils_cy_tscypress_item-filter-params-utils_cy_tscypress_item-redirect-utils_cy_tscypress_market-analysis_cy_tscypress_navigation-accessibility_cy_tscypress_node-toolchain_cy_tscypress_notification-targets_cy_tscypress_page-search-utils_cy_tscypress_player_cy_tscypress_rat-checker_cy_tscypress_recent-auctions-recovery_cy_tscypress_reduced-motion_cy_tscypress_rsc-cache-poisoning_cy_tscypress_search-rows-utils_cy_tscypress_search-shortcut_cy_tscypress_search_cy_tscypress_stale-chunk-recovery_cy_tscypress_startpage-favorites_cy_tscypress_terms-acceptance_cy_tscypress_year-view_cy_tsauthenticated_year_view_personasReview notes:
!isSocketReady()when the page mounts, so "Reconnecting…" also shows briefly during the first connection on page load, not only after a drop.listenForResumemay sometimes reconnect a healthy socket when the tab becomes visible, if the server's nextUpdate/ping gap gets close to a minute; it never does this on every tab switch.Task:
task_l7737utyp7mce7oiq7mqBase:
mainat70047de244fdaa1000c8dd97da231c9fcc857ee2