Skip to content

[Due for payment 2026-05-20] [$250] [Quality] Generalize seed-full-reconnect helper across Onyx clear flows #89990

@mountiny

Description

@mountiny

This issue tracks the fix for duplicate `ReconnectApp` requests being fired in multiple Onyx clear flows beyond the delegate account switch.

The same `Onyx.clear` → `openApp` race that was fixed in the delegate-account-switch path (#89262) also exists in three other flows that go through `subscribeToFullReconnect`:

  • `src/libs/actions/Session/index.ts` — supportal restore stashed session
  • `src/libs/actions/App.ts` (`RESET_REQUIRED` listener) — Troubleshoot/Reset Onyx
  • `src/libs/actions/App.ts` (`clearOnyxAndResetApp`) — exit imported state

This PR extracts a generalized helper `clearOnyxAndSeedFullReconnect(keysToPreserve, extraSeeds?)` that always seeds `LAST_FULL_RECONNECT_TIME=now` atomically and clears with the preserve list + the seeded keys, preventing unnecessary `ReconnectApp` calls in all these flows.

PR: #89980


cc @mountiny @TMisiukiewicz @abzokhattab

Upwork Automation - Do Not Edit

Current Issue Owner: @mallenexpensify

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022052704237221521842
  • Upwork Job ID: 2052704237221521842
  • Last Price Increase: 2026-05-08

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions