[Onyx audit] Migrate keys to RAM-only - part 1/2#82309
[Onyx audit] Migrate keys to RAM-only - part 1/2#82309JKobrynski wants to merge 28 commits intoExpensify:mainfrom
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
The submodule update was unintentionally included and is unrelated to the RAM-only keys migration. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…-migrate-keys-to-ram-only-part-1
…91-migrate-keys-to-ram-only-part-1
|
@Krishna2323 @roryabraham One of you needs to 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] |
|
I’ll be reviewing this shortly. |
…-migrate-keys-to-ram-only-part-1
|
@JKobrynski Yes, I was testing with the latest changes and had also verified that the bug was not happening on the |
|
@Krishna2323 sure thing, I will test this exact scenario |
|
@Krishna2323 I just tested with the report that you mentioned above and it seems to be working fine android.movHave you checked again on your end? 😄 |
|
Will test again today. |
|
It is possible that there's been a pre-existing race condition in |
|
@JKobrynski It still doesn't work for me. One thing I forgot to tell you is that I'm running the standalone app. Monosnap.screencast.2026-03-09.18-30-02.mp4 |
|
@Krishna2323 I'm using standalone too, so all the same. Ok so looking at this it seems like it must be the race condition. I'm working on a fix, I'll let you know when it's ready so you can test again. |
|
@Krishna2323 ok I've implemented a fix, I tested this flow and some other ones that are also related, could you please test the latest version again and let me know if it helped? 🙏 |
|
@JKobrynski I can still repro the issue, I'm trying to investigate it now... Monosnap.screencast.2026-03-10.04-23-53.mp4 |
|
@JKobrynski seems like this is the cause, I'm trying to apply a fix locally to confirm. Line 319 (very first render): Line 324-325 (effect fires immediately): Line 362 ( Line 462 (deep link resolves much later - TOO LATE): The root cause: On the very first render, This causes a cascade:
This is the exact scenario the Onyx team discussed in the issue -- JKobrynski warned that This is a bug you should report to the PR author. The |
|
@JKobrynski please check this, it fixed the navigation issue: What was happening:
The problem: How it was fixed (2 changes):
Monosnap.screencast.2026-03-10.05-27-06.mp4 |
|
@Krishna2323 first of all thank you so much for doing all that on your end as I wasn't able to reproduce the issue 🙏 I'm reaching out to you on Slack with some questions! |
…-migrate-keys-to-ram-only-part-1
…-migrate-keys-to-ram-only-part-1
…-migrate-keys-to-ram-only-part-1
|
@Krishna2323 I've applied the following improvements to the fix that you've suggested (and the one I implemented just before that):
I'm going to share more details about my investigation in the issue but I think we can test this PR again. |
|
Nice one, great job! @Krishna2323 thanks for helping |
|
@codex review |
|
Works well 🎉 fix_part_1.mp4fix_part_2.mp4 |
|
@JKobrynski Is there anything left? I tried checking for similar cases but found that it shouldn’t happen anywhere else.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e9b00ca33
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| Promise.race([ | ||
| Linking.getInitialURL(), | ||
| new Promise<null>((resolve) => { | ||
| setTimeout(() => resolve(null), CONST.TIMING.GET_INITIAL_URL_TIMEOUT); | ||
| }), |
There was a problem hiding this comment.
Handle late getInitialURL resolution after timeout
Racing Linking.getInitialURL() against a 10s null timeout unblocks startup, but it also permanently drops deep links when the native bridge returns the initial URL after that timeout (a case this comment already calls out in HybridApp). Once the timeout wins, onInitialUrl(null) runs and the eventual URL resolution is ignored, so users can land on the default route instead of the intended deep-linked report on slower/lagging startup paths.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@Krishna2323 do you have any thoughts on this ☝️ ?
These are just some suggestions for further investigation on similar cases, and potential improvements to consider! |
@JKobrynski I was asking about this :) |
|
@Krishna2323 posted on the issue yesterday! |
Explanation of Change
This PR is part 1/2 of RAM-only migration - it migrates the obvious keys.
Fixed Issues
$ #80091
PROPOSAL: N/A
Tests
1. App Launch & Deep Linking (
IS_CHECKING_PUBLIC_ROOM)2. App Update Modals (
UPDATE_AVAILABLE,UPDATE_REQUIRED)It's difficult to test these, as the related actions are only triggered by API
3. Search / User Selection Loading States (
IS_SEARCHING_FOR_REPORTS)New Chat
Money Request (Expense) Participant Selector
Workspace Invite
Search Router
4. Wallet / Onfido Identity Verification (
WALLET_ONFIDO)5. General Regression Checks
Offline tests
N/A
QA Steps
Same as Tests section above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web-compressed.mov