Skip to content
Draft
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
8 changes: 4 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 @@ -179,7 +179,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": "git+https://github.com/callstack-internal/react-native-onyx.git#c1be57316bef150d2f8d6bda6b1e0ae328b55a29",
"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._
67 changes: 0 additions & 67 deletions patches/react-native-onyx/react-native-onyx+3.0.73.patch

This file was deleted.

1 change: 1 addition & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2061,6 +2061,7 @@ const CONST = {
EMOJI_TRIE_BUILD: 'LocaleEmojiTrieBuild',
},
SPAN_ONYX_DERIVED_COMPUTE: 'OnyxDerivedCompute',
SPAN_ONYX_UPDATES_APPLY_HTTPS: 'OnyxUpdates.applyHTTPSOnyxUpdates',
SPAN_NAVIGATION: {
ROOT: 'BootsplashVisibleNavigation',
PUSHER_INIT: 'NavigationPusherInit',
Expand Down
21 changes: 21 additions & 0 deletions src/libs/actions/OnyxUpdates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import {SIDE_EFFECT_REQUEST_COMMANDS, WRITE_COMMANDS} from '@libs/API/types';
import Log from '@libs/Log';
import PusherUtils from '@libs/PusherUtils';
import {endSpan, startSpan} from '@libs/telemetry/activeSpans';
import {trackExpenseApiError} from '@libs/telemetry/trackExpenseCreationError';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand All @@ -30,6 +31,23 @@

function applyHTTPSOnyxUpdates<TKey extends OnyxKey>(request: Request<TKey>, response: Response<TKey>, lastUpdateID: number) {
Log.info('[OnyxUpdateManager] Applying https update', false, {lastUpdateID});

// Perf-test instrumentation: measure local Onyx-update processing time per API response
// (excludes network time). Cold-cache mergeCollection batches dominate this duration during
// OpenApp / ReconnectApp / Search; comparing this span across branches isolates the impact
// of mergeCollectionWithPatches changes (cache-first ordering, multiGet pre-warm).
const spanId = `${CONST.TELEMETRY.SPAN_ONYX_UPDATES_APPLY_HTTPS}:${request?.command ?? 'unknown'}:${lastUpdateID}`;
startSpan(spanId, {
name: CONST.TELEMETRY.SPAN_ONYX_UPDATES_APPLY_HTTPS,
op: 'onyx.updates.apply.https',
attributes: {
command: String(request?.command ?? 'unknown'),
onyx_data_count: Array.isArray(response.onyxData) ? response.onyxData.length : 0,

Check failure on line 45 in src/libs/actions/OnyxUpdates.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Object Literal Property name `onyx_data_count` must match one of the following formats: camelCase, UPPER_CASE, PascalCase

Check failure on line 45 in src/libs/actions/OnyxUpdates.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Object Literal Property name `onyx_data_count` must match one of the following formats: camelCase, UPPER_CASE, PascalCase
success_data_count: Array.isArray(request?.successData) ? request.successData.length : 0,

Check failure on line 46 in src/libs/actions/OnyxUpdates.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Object Literal Property name `success_data_count` must match one of the following formats: camelCase, UPPER_CASE, PascalCase

Check failure on line 46 in src/libs/actions/OnyxUpdates.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Object Literal Property name `success_data_count` must match one of the following formats: camelCase, UPPER_CASE, PascalCase
failure_data_count: Array.isArray(request?.failureData) ? request.failureData.length : 0,

Check failure on line 47 in src/libs/actions/OnyxUpdates.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Object Literal Property name `failure_data_count` must match one of the following formats: camelCase, UPPER_CASE, PascalCase

Check failure on line 47 in src/libs/actions/OnyxUpdates.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Object Literal Property name `failure_data_count` must match one of the following formats: camelCase, UPPER_CASE, PascalCase
},
});

// For most requests we can immediately update Onyx. For write requests we queue the updates and apply them after the sequential queue has flushed to prevent a replay effect in
// the UI. See https://github.com/Expensify/App/issues/12775 for more info.
const updateHandler: (updates: Array<OnyxUpdate<TKey>>) => Promise<unknown> = request?.data?.apiRequestType === CONST.API_REQUEST_TYPE.WRITE ? queueOnyxUpdates : Onyx.update;
Expand Down Expand Up @@ -75,6 +93,9 @@
.then(() => {
Log.info('[OnyxUpdateManager] Done applying HTTPS update', false, {lastUpdateID});
return Promise.resolve(response);
})
.finally(() => {
endSpan(spanId);
});
}

Expand Down
Loading