-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[DO NOT MERGE] fix: IDB backing store corruption healing (onyx PR #780 test) #91085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
leshniak
wants to merge
9
commits into
Expensify:main
Choose a base branch
from
callstack-internal:fix/idb-corruption-heal-test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
21ab47c
fix: pin react-native-onyx to IDB heal branch for testing
leshniak 545b878
fix: update onyx pin to latest #780 HEAD (d1f95a03)
leshniak 0766c18
fix: update onyx pin to ca5c2b14 (improved diagnostic logging)
leshniak 52fafa0
fix: update onyx pin to e6c812e1 (prettier + probe timing fix)
leshniak 52365e2
fix: update onyx pin to 92405996 (heal logs downgraded to info level)
leshniak c95b733
Merge remote-tracking branch 'upstream/main' into fix/idb-corruption-…
leshniak 505911b
fix: reset Mobile-Expensify submodule to upstream/main
leshniak 97ce738
fix: resolve typecheck and eslint errors from pinned onyx version
leshniak c33d35e
fix: bump onyx pin to 6445eaac (DOMException detection fix)
leshniak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,3 @@ | ||
| # `react-native-onyx` patches | ||
|
|
||
| ### [react-native-onyx+3.0.73.patch](react-native-onyx+3.0.73.patch) | ||
|
|
||
| - Reason: | ||
|
|
||
| > Reverts [Onyx PR #770 (the subscription-side skip for skippable collection member ids in subscribeToKey)](https://github.com/Expensify/react-native-onyx/pull/770) and the line [PR #779](https://github.com/Expensify/react-native-onyx/pull/779) added to work around [PR #770](https://github.com/Expensify/react-native-onyx/pull/770)'s silent-no-callback contract. | ||
|
|
||
| - Upstream PR/issue: https://github.com/Expensify/react-native-onyx/pull/785 | ||
| - E/App issue: https://github.com/Expensify/App/issues/86181 | ||
| - PR Introducing Patch: https://github.com/Expensify/App/pull/90764 | ||
| _No active patches — the 3.0.73 patch (reverting PR #770) is not needed because this branch pins onyx to a git SHA that already includes the revert (landed upstream in 3.0.72 via [PR #785](https://github.com/Expensify/react-native-onyx/pull/785))._ |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ function getTryNewDot(): Promise<TryNewDot | null> { | |
| return new Promise((resolve) => { | ||
| const connectionID = Onyx.connect({ | ||
| key: ONYXKEYS.NVP_TRY_NEW_DOT, | ||
| initWithStoredValues: true, | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Formatting: There's a blank line left where the property was. |
||
| callback: (value) => { | ||
| Onyx.disconnect(connectionID); | ||
| resolve(value ?? null); | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 CRITICAL ISSUE - Unexplained behavioral change
The PR description does not explain why
initWithStoredValues: falsewas removed. This option controls the initial render behavior:false: Hook starts inloadingstate, value isundefineduntil Onyx connectstrue(default): Hook immediately returns the stored valueBug this could cause: If this hook is used during app initialization when
DOMAIN_MEMBERS_SELECTED_FOR_MOVEmay already have a stale value from a previous session,removing
initWithStoredValues: falsemeans the hook will read that stale value immediately.If there's logic that depends on the transition from "no selection" → "has selection" or vice versa, using the stale initial value could incorrectly trigger
clearSelectedMembers()on mount.Suggested fix: If this change is intentional (e.g., the new onyx version changes how
initWithStoredValuesworks, or the hook was incorrectly using it), we could add a comment or note in the PR explaining why it was removed. If it's not intentional, we should revert it.