startup flow#29365
Open
chrisnojima wants to merge 7 commits into
Open
Conversation
…chestrator startHandshake is now a retry loop that loads bootstrap status then awaits injected gating steps; handshakeWaiters/handshakeVersion/wait() and the loadOnStartPhase enum are gone. Fixes auto-retry, which never re-ran the handshake and reset its own counter, leaving the splash stuck on non-fatal failures with no Reload button. - DaemonHandshakeState: loading | done | failed - bootstrap-status and account RPCs deduped (2-3x at cold start -> 1x) - loggedInCausedbyStartup/fromMenubar were write-only; deleted
GlobalError returned early on size === 'Closed', which only tracks globalError, so daemon-error-only renders (service died) never reached the overlay branch. The overlay Box2s also lacked fullWidth/fullHeight and shrink-wrapped to content.
waitForKbfsDaemon returned once connected, so a kbfs crash went unnoticed until an fs RPC failed or the tab was re-entered. Keep the loop alive for the login session: poll every 5s while connected, reuse the 60s wait while disconnected.
The logout store was a version/waiter machine with exactly one real waiter (push:deleteToken) plus a fake 10ms 'nullhandshake' waiter to handle the no-waiter case. Await the token delete then the logout RPC instead; store, push-listener version subscription, and waiter calls all go.
Four hand-rolled copies of the sticky everLoadedRef pattern become one hook. Also drops a redundant NavigationContainer type argument.
shareListenersRegistered was called from two places on Android. Native flushes pending share intents on the first call and emitDeepLink has no queue, so the early push-listener call could drop a cold-start share before the router was listening. Keep only the nav+logged-in gated call. Also parse the persisted routeState synchronously instead of wrapping a JSON.parse in a promise race.
The watcher loop exits if the service dies; a completed handshake means RPCs work again, so restart it then. Replaces the native installerRan() kick, which native abused as a startup trigger despite having no installer.
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.
No description provided.