[CP Staging] Revert "Coalesce OnyxDerived recomputations via macrotask scheduling" - #95715
Conversation
Reverts the coalescing engine that caused deploy blockers, scoped to just the OnyxDerived changes on top of current main. Restores the synchronous, per- dependency recompute engine (Onyx sourceValue based) and keeps waitForCollectionCallback, matching main's current Onyx 3.0.86 (the onyx-store work that removed it, Expensify#93436, was already reverted separately). Removes getCollectionDelta, scheduleMacrotask, and the triggeredKeys/flush changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@shubham1206agra 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c2803515f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| context.currentValue = derivedValue; | ||
| context.sourceValues = sourceValues as typeof context.sourceValues; | ||
| context.triggeredKeys = triggeredKeys; | ||
| context.sourceValues = sourceKey && sourceValue !== undefined ? {[sourceKey]: sourceValue} : undefined; |
There was a problem hiding this comment.
Preserve cleared scalar dependency triggers
When a non-collection dependency is cleared to undefined, this drops both the new value and the identity of the triggering key from context.sourceValues. Several derived configs rely on seeing that key to force a full recompute (for example visibleReportActions on ONYXKEYS.SESSION for whisper targeting, and reportAttributes on locale/intro/concierge keys), so clearing one of those values now looks the same as an untriggered recompute and can leave the cached derived value computed for the previous scalar state until another dependency changes. Please keep the triggered key, or restore a separate trigger signal, even when the new value is undefined.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This PR is just a revert, and the issue mentioned was actually being solved in #95287
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. |
|
🚧 inimaga 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! 🧪🧪
|
|
Looks like this PR was CP'd. I don't see anyone testing it though so i asked QA to test all the linked issues in this PR and to clear them if the issue doesn't persist. |
|
@chiragsalian it was not cped yet |
…rived-coalescing Revert "Coalesce OnyxDerived recomputations via macrotask scheduling" (cherry picked from commit 262d84a) (cherry-picked to staging by mountiny)
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.32-2 🚀
|
|
🤖 I reviewed the changes in this PR against Expensify's help site files under No help site changes are required. This PR is a pure revert of an internal performance change ("Coalesce OnyxDerived recomputations via macrotask scheduling"), made to resolve deploy blockers. All modified files are internal engineering code with no user-facing behavior, feature, or copy changes:
Since there are no changes to features, settings, workflows, or UI that a Help site article would document, no draft docs PR was created. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.32-3 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.33-0 🚀
|
|
🤖 I reviewed the changes in this PR and no help site changes are required under Why: This PR is a pure code revert of an internal architecture change — "Coalesce OnyxDerived recomputations via macrotask scheduling" (#95287) — done to resolve deploy blockers. Every changed file is internal implementation or test/config, with no impact on any documented, user-facing behavior:
There are no changes to features, tab/settings labels, buttons, workspaces, billing, or integrations that the help site documents. Nothing to update. @fabioh8010, since this is a code-only revert with no user-facing changes, no help site PR was created. Please confirm you agree that no docs update is needed here. If you believe an article should still be updated, let me know which behavior changed and I'll draft the PR. |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.4.33-8 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Reverts #95287 because of some deploy blockers:
Fixed Issues
$ #95301
$ #95721
$ #95700
$ #95698
$ #95696
PROPOSAL:
Tests
Verify the DBs are not reproducible anymore:
[Due for payment 2026-07-17] Chat - Chat Report appears on user's name when start new chat #95696
[Due for payment 2026-07-17] Expense - Skeleton loader appears briefly after creating expense in the empty report #95698
[Due for payment 2026-07-17] Original expense briefly appears after splitting an expense #95700
Verify that no errors appear in the JS console
Offline tests
N/A
QA Steps
Same as Tests.
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
Screen.Recording.2026-07-09.at.16.17.24.mov
Screen.Recording.2026-07-09.at.16.22.48.mov
Screen.Recording.2026-07-09.at.16.25.48.mov