Repository navigation
[Payment due @ahmedGaber93] [No QA] Rename originalUseOnyx to useOnyxWithoutSnapshots - #100200
Conversation
Co-authored-by: ahmedGaber93 <ahmedGaber93@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Co-authored-by: ahmedGaber93 <ahmedGaber93@users.noreply.github.com>
|
🤖 Android test steps verification results: ✅ pass All 6 checks passed on standalone Android NewDot. The PR's
Scope note: verified on standalone Android NewDot (developmentDebug APK), not the HybridApp shell. |
|
Fixed the The rename made two lines longer than the 190-char
The fix is Two remaining red checks, neither actionable here:
Verification run locally
|
|
Nothing new to fix on this PR — the one check I could fix is green, and the other red check isn't this PR's.
Neither file is in this PR's 13-file diff, and both are byte-identical to To unblock, one of:
Local reproductionRun on this branch at Confirmed |
|
🤖 Web test steps verification results: Four of six checks passed cleanly on web — the app loads, Search renders result rows, the expense details view (MoneyRequestView) shows populated fields, and
Scope note: view run · no recording available |
|
@MelvinBot rename this PR title to
|
|
@MelvinBot Please update TestsN/A. Offline testsN/A. QA StepsN/A. PR Author ChecklistMark all author checklist checked. |
|
🤖 Renamed the PR title to |
|
Updated the PR description as requested.
Everything else in the description is byte-identical, including the open question in One flag, since you own the checklist: a few items I just checked aren't literally true for this PR — |
|
@MelvinBot Mark this PR ready for review |
|
🤖 Marked as ready for review. Two things worth a reviewer's eye:
|
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
@ahmedGaber93 could you merge main in? The failing jest test should be fixed by the PR #100205 |
|
@MelvinBot Please merge the latest main branch |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
…UseOnyx Co-authored-by: ahmedGaber93 <ahmedGaber93@users.noreply.github.com>
|
Merged the latest Merge commit: The rename is still complete after the merge: 0 occurrences of Merge detailsUsed
I could not re-run view run · no recording available |
|
🎯 @ahmedGaber93, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/tgolen in version: 9.4.69-0 🚀
|
|
No help site changes are required for this PR, so I did not create a docs PR. This is a pure internal identifier rename ( How I verified this1. The diff contains only the rename and its formatting fallout. I filtered every added/removed line in 2. No article references the renamed symbol. 3. Scope check against the help site's purpose. Per Since there is no docs PR, the |
|
🚧 tgolen 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 production by https://github.com/francoisl in version: 9.4.69-1 🚀
Bundle Size Analysis (Sentry): |
Issues attributed to commits in this pull requestThis pull request was merged and Sentry observed the following issues:
|
|
Hmm! This PR only renames a hook, so I don’t expect it to introduce any issues. |










Explanation of Change
Pure identifier rename:
originalUseOnyx→useOnyxWithoutSnapshots, everywhere it appears in the app. No behavior change.tgolenraised this in a review comment on #99279: "'Original Onyx' doesn't really make sense, how about renaming it touseOnyxWithoutSnapshots?" That PR renamed the one occurrence it introduced, andahmedGaber93asked for the rest of the app to follow in a separate PR — this one.Why the new name is better: the alias exists to distinguish the raw
react-native-onyxuseOnyxfrom our snapshot-aware wrapper atsrc/hooks/useOnyx.ts. "Original" says nothing about that distinction; "without snapshots" names exactly what the caller is opting out of.Scope: 13 files, 55 occurrences, all of them the import alias
import {useOnyx as originalUseOnyx}and its call sites.Two spots needed more than a find-and-replace:
src/hooks/useOnyx.ts— the type aliasOriginalUseOnyx(which is justtypeof originalUseOnyx) was renamed toUseOnyxWithoutSnapshotsto stay consistent. It still annotates the exported snapshot-awareuseOnyx, exactly asOriginalUseOnyxdid before.tests/ui/CategoryPickerTest.tsx— the localmockedOriginalUseOnyxvariable and the comment that names the alias in backticks were updated too, since both are direct references to the old name.Deliberately left alone — please confirm this is what you want. Several files carry a prose comment above the import reading
// Use the original useOnyx hook to get the real-time data from Onyx and not from the snapshot. I did not touch those, becauseahmedGaber93asked for that exact wording word-for-word only hours ago. The word "original" therefore still appears in comments even though the identifier is gone. Say the word and I'll reword them in a follow-up commit.Automated checks run locally
npm run typecheck— passednpm run lint-changed— passednpm run react-compiler-compliance-check checkon the 12 changed source files — passednpm run spell-changed— 13/13 files, 0 issuesnpm test tests/ui/CategoryPickerTest.tsx— 3/3 passednpm test tests/unit/inlineEditing— 43/43 passedFixed Issues
$
PROPOSAL:
Tests
N/A.
Offline tests
N/A.
QA Steps
N/A.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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