Repository navigation
Conversation
getDataByPath looped over every ONYXKEYS.COLLECTION prefix and rebuilt the key it was given, so it always returned data?.[key]. Replace it with that lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fabioh8010
left a comment
There was a problem hiding this comment.
LGTM, but I dont think this should be [No QA], can we have simple tests around search?
|
@fabioh8010 I believe tests in |
|
@samranahm 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] |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@mountiny @heyjennahay, do we need C+ review on this PR? |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.41-0 🚀
|
|
No help site update needed — this PR only optimizes internal data lookups without changing user-facing behavior, adding a feature, removing a beta, or making an existing article inaccurate. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.41-2 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Each render of a member-key read redirected to a Search snapshot (for example
report_X) now does one property lookup instead of astartsWithscan over everyONYXKEYS.COLLECTIONprefix plus a rebuilt key string. The removedgetDataByPathrebuilt${collection}${path.slice(collection.length)}, which is always the same string aspath, so results are identical. It's a small per read saving.Fixed Issues
$ #107164
PROPOSAL: N/A
Tests
npx jest tests/unit/hooks/useOnyxSearchSnapshot.test.tsxreads the snapshot copy inside Search, which readsreport_1on a Search screen while the live and snapshot copies differOffline tests
None. The change only affects how an already-loaded snapshot is read, so network state doesn't matter.
QA Steps
None, this PR is [No QA]. The output is identical to before, so there is nothing for QA to observe.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.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
N/A. No UI change.
Android: mWeb Chrome
N/A. No UI change.
iOS: Native
N/A. No UI change.
iOS: mWeb Safari
N/A. No UI change.
MacOS: Chrome / Safari
N/A. No UI change.
🤖 Generated with Claude Code