Skip to content

Conversation

@Krishna2323
Copy link
Contributor

@Krishna2323 Krishna2323 commented Nov 24, 2025

Explanation of Change

What

  • Upgrade @react-native-community/netinfo to ^11.4.1.

Fixed Issues

$ #75699
PROPOSAL: #75699 (comment)

Tests

  1. Launch the app while online
  2. Verify no offline banner/indicator; data loads; sending a message succeeds.
  3. Go offline
  4. Verify offline banner/indicator appears.
  5. Open a report and send a message.
  6. Action is queued/pending (no error shown).
  7. Go back online
  8. Offline banner disappears; queued/pending action auto-sends/completes.
  • Verify that no errors appear in the JS console

Offline tests

  • Same as tests

QA Steps

  • Same as tests

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • 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
    • MacOS: Desktop
  • 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 verified there are no new alerts related to the canBeMissing param for useOnyx
  • 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 shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • 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)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • 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)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • 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.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • 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
android_native.mp4
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@github-actions
Copy link
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. ⚠️

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 3 files with indirect coverage changes

@Krishna2323 Krishna2323 changed the title Upgrade @react-native-community/netinfo to latest. [NoQA] Upgrade @react-native-community/netinfo to latest. Nov 25, 2025
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@Krishna2323 Krishna2323 marked this pull request as ready for review November 25, 2025 08:50
@Krishna2323 Krishna2323 requested a review from a team as a code owner November 25, 2025 08:50
@melvin-bot melvin-bot bot requested review from akinwale and removed request for a team November 25, 2025 08:50
@melvin-bot
Copy link

melvin-bot bot commented Nov 25, 2025

@akinwale 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]

@akinwale
Copy link
Contributor

akinwale commented Nov 26, 2025

@Krishna2323 I believe we should remove the NoQA tag add test steps to check whether offline status is being detected properly and indicated since this module directly affects that functionality in the app.

@Krishna2323 Krishna2323 changed the title [NoQA] Upgrade @react-native-community/netinfo to latest. Upgrade @react-native-community/netinfo to latest. Nov 26, 2025
@Krishna2323
Copy link
Contributor Author

@akinwale I have updated the title, test steps and added testing videos.

@akinwale
Copy link
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 there are no new alerts related to the canBeMissing param for useOnyx
  • 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 shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • 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)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • 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)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • 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.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • 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 75864-android-hybrid
Android: mWeb Chrome 75864-android-chrome
iOS: HybridApp 75864-ios-hybrid
iOS: mWeb Safari 75864-ios-safari
MacOS: Chrome / Safari
75864-web.mp4

Copy link
Contributor

@akinwale akinwale left a comment

Choose a reason for hiding this comment

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

LGTM.

@melvin-bot melvin-bot bot requested a review from mollfpr November 26, 2025 16:47
@mollfpr
Copy link
Contributor

mollfpr commented Nov 27, 2025

I have a few questions.

NetInfo ≥ 11.3 ships New Architecture (TurboModule + codegen) upstream. Version 11.4.1 includes:

  • codegenConfig with RNCNetInfoSpec
  • Android new-arch sources under android/src/newarch/...
  • iOS implementation aligned with codegen

I don't see them mentioning supporting new-arc or the ones listed above in their releases.

Android new-arch sources under android/src/newarch/...
Could you link the permalink for this?

Also, react-native-netinfo/react-native-netinfo#655 hasn't been merged yet. How the react-native-netinfo is already support the new-arc?

@apeyada
Copy link
Contributor

apeyada commented Nov 28, 2025

I am not sure how this PR was tested by both author and reviewer but before I submit updated proposal, I tested locally without patch and faced runtime error on iOS because new arch not supported.
@mollfpr maybe you can generate adhoc build to see android and ios works.

@Krishna2323
Copy link
Contributor Author

@mollfpr I'm really sorry for overlooking the response from AI web search. I should have dug deeper and verified the data thoroughly. The builds were successful and the app was working fine, which made my assumption stronger and pushed me to not verify the response properly.

I know that was a really dumb mistake on my part, and I'm genuinely sorry about it. Thanks a lot for catching the issue — it would have created more trouble for me later. I truly feel guilty about this.

I'm reverting the deletion and making the necessary changes in the patches now.

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@Krishna2323
Copy link
Contributor Author

@mollfpr I’ve been sitting on this for the past 5-6 hours without a break and tried literally everything to make old patches work, but unfortunately I still haven’t been successful.

Here’s what I tried today:

  1. Added the changes from feat: New architecture support for Android and iOS react-native-netinfo/react-native-netinfo#655 into NetInfo inside node_modules and generated a new patch. This worked, but the patch ended up being only ~700 lines, whereas the existing one is ~3000 lines, so I’m worried this might break something.
  2. Listed the failing patches and attempted to fix them manually, but the merge conflicts are extremely confusing and I couldn’t make it work.

At this point, I’m not sure what else to try. If anyone can guide me on how to fix this, that would be super helpful. Or if someone familiar with handling patch failures or the NetInfo PR can take a look, they might solve it much more easily.

Maybe there is an easy solution, but I’ve already tried everything I could think of.

@war-in do you have any suggestions? I saw you reacted 👍 here.

Monosnap internetReachability js map rej — App 2025-11-29 20-16-23

@war-in
Copy link
Contributor

war-in commented Dec 1, 2025

Usually when I migrate RN patches, I go through each line of the patch and try to apply the changes if possible (if not I resolve conflicts). The turbomodule patch is a huge one so migrating it will be tough but to make sure we won't break anything, I'd recommend this approach.

I found those two commits adding changes to the turbomodule patch where they should be extracted to a separate patch file as they're unrelated. Maybe we could extract them now?

Also I'm not sure if the upstream PR has been updated so it might be outdated with the main branch of the repo but I can also see the possibly unrelated changes in the patch (isDisplayZoomed mentioned in md file) so those changes are probably already released in the newest netinfo version

so I'd

  • apply changes from the upstream PR
  • go through gh history of the patch and extract unrelated changes to separate patches
  • test the feature and make sure we don't introduce any regressions

@Krishna2323
Copy link
Contributor Author

@war-in thanks a lot for the suggestion. I also think the safest option is to go through each line of the patch and apply the changes carefully. It will definitely take a good amount of time, but I don’t think there’s another option.

@Krishna2323
Copy link
Contributor Author

I’ll try to create a new patch over the weekend. The current patch is quite large and confusing, so it will require some time and effort. Thanks for waiting.

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@Krishna2323
Copy link
Contributor Author

Update: New patch has been created and applied successfully, but the iOS app build is failing for some reason. I’m investigating the cause and will update here as soon as possible.

@Krishna2323
Copy link
Contributor Author

@akinwale the new patch file has been created, and the native app build was also successful. Could you please test this PR on your end as well? Thanks!

@Krishna2323
Copy link
Contributor Author

@akinwale friendly bump!

@akinwale
Copy link
Contributor

@Krishna2323 Please fix merge conflicts.

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@Krishna2323
Copy link
Contributor Author

@akinwale all done.

@akinwale
Copy link
Contributor

Re-tested and works well. Ready to merge.

cc @mollfpr

@mollfpr
Copy link
Contributor

mollfpr commented Dec 30, 2025

@Krishna2323 @akinwale Do we need to update the hybrid app too?

@Krishna2323
Copy link
Contributor Author

@mollfpr the PR in the hybrid repo is up: https://github.com/Expensify/Mobile-Expensify/pull/13816

@mollfpr mollfpr merged commit d5081e3 into Expensify:main Jan 5, 2026
37 checks passed
@OSBotify
Copy link
Contributor

OSBotify commented Jan 5, 2026

✋ 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
Copy link
Contributor

OSBotify commented Jan 5, 2026

🚀 Deployed to staging by https://github.com/mollfpr in version: 9.2.93-0 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Jan 6, 2026

🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.93-1 🚀

platform result
🖥 desktop 🖥 failure ❌
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

abzokhattab pushed a commit to abzokhattab/App that referenced this pull request Jan 6, 2026
…/75699

Upgrade @react-native-community/netinfo to latest.
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