Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
"react-native-localize": "^3.5.4",
"react-native-nitro-modules": "0.35.0",
"react-native-nitro-sqlite": "9.6.0",
"react-native-onyx": "3.0.73",
"react-native-onyx": "github:Expensify/react-native-onyx#6445eaac",
"react-native-pager-view": "8.0.0",
"react-native-pdf": "7.0.2",
"react-native-permissions": "^5.4.0",
Expand Down
10 changes: 1 addition & 9 deletions patches/react-native-onyx/details.md
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))._
67 changes: 0 additions & 67 deletions patches/react-native-onyx/react-native-onyx+3.0.73.patch

This file was deleted.

2 changes: 1 addition & 1 deletion src/hooks/useClearSelectedDomainMembersOnMoveComplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import usePrevious from './usePrevious';
* transition of `DOMAIN_MEMBERS_SELECTED_FOR_MOVE` from non-empty to empty.
*/
function useClearSelectedDomainMembersOnMoveComplete(clearSelectedMembers: () => void) {
const [selectedMemberAccountIDs] = useOnyx(ONYXKEYS.DOMAIN_MEMBERS_SELECTED_FOR_MOVE, {initWithStoredValues: false});
const [selectedMemberAccountIDs] = useOnyx(ONYXKEYS.DOMAIN_MEMBERS_SELECTED_FOR_MOVE);
Copy link
Copy Markdown
Contributor

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: false was removed. This option controls the initial render behavior:

  • false: Hook starts in loading state, value is undefined until Onyx connects
  • true (default): Hook immediately returns the stored value

Bug this could cause: If this hook is used during app initialization when DOMAIN_MEMBERS_SELECTED_FOR_MOVE may already have a stale value from a previous session,
removing initWithStoredValues: false means 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 initWithStoredValues works, 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.

const prevSelectedMemberAccountIDs = usePrevious(selectedMemberAccountIDs);
const selectedCount = selectedMemberAccountIDs?.length ?? 0;
const previousSelectedCount = prevSelectedMemberAccountIDs?.length ?? 0;
Expand Down
1 change: 0 additions & 1 deletion tests/unit/Search/SearchQueryUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
getDateRangeDisplayValueFromFormValue,
getDisplayQueryFiltersForKey,
getFilterDisplayValue,
getKeywordQueryWithCurrentSearchContext,
getQueryWithUpdatedValues,
getRangeBoundariesFromFormValue,
serializeQueryJSONForBackend,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/TryNewDotUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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);
Expand Down
Loading