Skip to content

[Onyx bump] Bump react-native-onyx from 3.0.86 to 3.0.88#95044

Merged
roryabraham merged 1 commit into
Expensify:mainfrom
callstack-internal:bump-onyx-3.0.88
Jul 1, 2026
Merged

[Onyx bump] Bump react-native-onyx from 3.0.86 to 3.0.88#95044
roryabraham merged 1 commit into
Expensify:mainfrom
callstack-internal:bump-onyx-3.0.88

Conversation

@elirangoshen

@elirangoshen elirangoshen commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

This PR bumps Onyx from 3.0.86 to 3.0.88 (diff), which includes the following changes:

  • react-native-onyx#798 (3.0.87) — Add a proactive visibilitychange probe for IDB health, building on the reactive heal from Update version to 1.0.1-177 #780. Safari kills IDB connections for backgrounded tabs, so on return the burst of reconnect writes hits a dead cached dbp and every write fails before the reactive heal can fire. A visibilitychange listener registered in createStore() runs a lightweight readonly count() probe when the tab becomes visible; if it detects a stale connection it drops dbp before the write burst arrives, so the first real op opens a fresh connection. Adds isStaleConnectionError() (union detector for InvalidStateError / backing-store corruption / connection-lost), a probePromise guard so a stale probe can't clear a dbp already replaced by a concurrent heal, classified req.onerror (only drops dbp for genuine stale-connection errors), and diagnostic logging.
  • react-native-onyx#797 (3.0.88) — Replace the brittle string-matching storage-error retry logic with a layered design: classify the error → route it to exactly one recovery owner → stop session-wide storms with a circuit breaker. (1) Error classification moves into each storage provider's classifyError, mapping engine dialects to a shared taxonomy (TRANSIENT, CAPACITY, INVALID_DATA, FATAL, UNKNOWN) in lib/storage/errors.ts. (2) Single-owner recovery: TRANSIENT/FATAL → connection layer reopens/heals (retry skips them quietly), CAPACITY → operation layer evicts LRU + retries, INVALID_DATA → throws, UNKNOWN → logs the full error shape once then bounded retry. (3) A session-level circuit breaker (lib/StorageCircuitBreaker.ts) trips when capacity failures storm (>50/60s) or evictions repeatedly free nothing (5 consecutive no-progress cycles), halting eviction/retry and emitting exactly one alert per window instead of one log line per failed write.

Fixed Issues

$ #87864
$ #87873
PROPOSAL: N/A — Onyx version bump. The bundled Onyx changes resolve these storage-error investigations:

Tests

Both bundled Onyx PRs touch web IDB storage paths. The changes are defensive — under normal operation the App should look identical to main; the value shows up in failure/recovery scenarios. Testing steps below are taken from the two Onyx PRs.

Setup

  1. Check out this branch (bump-onyx-3.0.88).
  2. npm install under Node 20.20.0, then npm run web.
  3. Open https://dev.new.expensify.com:8082/ in Chrome with DevTools open (filter console by Onyx).
  4. Sign in to a test account.

Functional smoke — no regression

  1. After login, LHN reports list and workspace switcher populate within a few seconds; no missing rows vs. a baseline main session.
  2. Open a chat, send a message — appears immediately, confirms via Pusher, persists after reload.
  3. Open Search, apply a filter — results populate, live updates as filters change, no duplicates.
  4. Switch workspaces — LHN filters to the new workspace within a few seconds.
  5. No new console errors vs. main.

Storage circuit breaker (onyx#797) — Chrome quota simulation

  1. DevTools → ApplicationStorage → enable Simulate custom storage quota and set a value lower than the amount currently used by the App.
  2. Go to the inbox and switch between various reports, watching the console (filtered by Onyx).
  3. Verify there is no uncaught storm of repeated failure logs.
  4. Verify the circuit-breaker log appears once per window, e.g.: Storage circuit breaker tripped: 5 consecutive evictions freed no usable space. Halting eviction/retry for 60s to stop a storage failure storm.
  5. Disable the simulated quota — the App resumes normal writes after the breaker window.

Stale-connection recovery (onyx#798) — Safari backgrounded tab

  1. Open the App in Safari, log in.
  2. Switch to a different tab and wait 30+ seconds (Safari may kill IDB connections for backgrounded tabs).
  3. Switch back to the App tab.
  4. If Safari killed the connection, verify the console shows: IDB visibilitychange probe: stale connection detected, dropping cached connection.
  5. Interact with the App (send a message, switch reports) — it recovers seamlessly with no white screen, stale UI, or data loss.
  • Verify that no errors appear in the JS console

Offline tests

This PR is an Onyx version bump; there is no new offline behavior beyond the existing Onyx offline-first invariants. Spot-check:

  1. Toggle "Offline" in the DevTools Network tab.
  2. Send a chat message → appears optimistically.
  3. Toggle back online → message confirms via Pusher.
  4. Verify no white screen, no stale UI.

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

N/A — Onyx web IDB storage paths; no native-specific changes.

Android: mWeb Chrome
iOS: Native

N/A — Onyx web IDB storage paths; no native-specific changes.

iOS: mWeb Safari
MacOS: Chrome / Safari

Behavioral recordings carried over from the bundled Onyx PRs.

Storage circuit breaker — react-native-onyx#797:

Before:

before.mov

After:

after.mov

visibilitychange probe / heal — react-native-onyx#798:

Probe on Safari (primary target platform):

Simulator.Screen.Recording.-.iPhone.17.-.2026-06-10.at.17.09.41.mov

Healed (simulated error):

healed.mov

Killed connection (simulated error):

killed.mp4

Exhausted (simulated error):

exhausted.mov

Healed (simulated on Safari):

safari_error.mp4

Killed connection (simulated on Safari):

safari_killed.mp4

Exhausted (simulated on Safari):

safari_exhausted.mp4

Healed offline (simulated on Chrome):

offline.mp4

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

⚠️ This PR is possibly changing native code and/or updating libraries, it may cause problems with HybridApp. Please check if any patch updates are required in the HybridApp repo and run an AdHoc build to verify that HybridApp will not break. Ask Contributor Plus for help if you are not sure how to handle this. ⚠️

@elirangoshen elirangoshen marked this pull request as ready for review July 1, 2026 10:44
@elirangoshen elirangoshen requested a review from a team as a code owner July 1, 2026 10:44
@melvin-bot melvin-bot Bot requested a review from abzokhattab July 1, 2026 10:44
@melvin-bot

melvin-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

@abzokhattab Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot Bot removed the request for review from a team July 1, 2026 10:44
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@abzokhattab

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
Screen.Recording.2026-07-01.at.14.59.47.mov
MacOS: Chrome / Safari

before

Screen.Recording.2026-07-01.at.14.43.58.mov

after

Screen.Recording.2026-07-01.at.14.53.50.mov

@abzokhattab abzokhattab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM i am no longer getting the error after the upgrade

@roryabraham roryabraham merged commit f5a91b2 into Expensify:main Jul 1, 2026
53 checks passed
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

OSBotify commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.4.26-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@m-natarajan

Copy link
Copy Markdown

@Julesssss @roryabraham @elirangoshen Is this one Internal? A few of the test steps can't be executed by the QA team.

@roryabraham

Copy link
Copy Markdown
Contributor

@m-natarajan QA what you can, ignore the rest.

Storage circuit breaker (onyx#797) — Chrome quota simulation

This one we'll monitor sentry for

@m-natarajan

Copy link
Copy Markdown

@m-natarajan QA what you can, ignore the rest.

Storage circuit breaker (onyx#797) — Chrome quota simulation

This one we'll monitor sentry for

Validated only the following steps: Functional smoke — no regression and Offline steps in the Test section

@OSBotify

OSBotify commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/grgia in version: 9.4.27-2 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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.

6 participants