Skip to content

startup flow#29365

Open
chrisnojima wants to merge 7 commits into
nojima/HOTPOT-yarnhelper-fixesfrom
nojima/HOTPOT-startup-flow
Open

startup flow#29365
chrisnojima wants to merge 7 commits into
nojima/HOTPOT-yarnhelper-fixesfrom
nojima/HOTPOT-startup-flow

Conversation

@chrisnojima

Copy link
Copy Markdown
Contributor

No description provided.

…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.
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.

1 participant