Update childReportNotificationPreference optimistically when adding comment in thread - #79811
Conversation
…ionPreference to ALWAYS when type is ADD
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e875ec66d
ℹ️ 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".
| childCommenterCount, | ||
| childLastVisibleActionCreated: lastVisibleActionCreated, | ||
| childOldestFourAccountIDs, | ||
| ...(type === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD && {childReportNotificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS}), |
There was a problem hiding this comment.
Avoid auto-subscribing all ancestor threads on reply
This now sets childReportNotificationPreference to ALWAYS on every optimistic ADD, but updateOptimisticParentReportAction is used by getOptimisticDataForAncestors for all ancestor report actions. In nested threads this will overwrite HIDDEN on parent actions the user explicitly left/muted, making those ancestors appear subscribed (e.g., “Leave thread” shows) even though no API call updated that parent thread’s preference. That creates a persistent UI mismatch until a refresh. Consider limiting this optimistic preference update to only the immediate parent action, or preserving an existing non-hidden value.
Useful? React with 👍 / 👎.
|
I'll review this tmr |
trjExpensify
left a comment
There was a problem hiding this comment.
Shouldn't this wait for the BE issue to come first?
I think no. We can proceed with this to fix only related issue which PR fixes |
@eh2077 kindly bump on this |
|
Sorry for the delay, I haven’t been feeling well for the past two days, but I’ll aim to review this tomorrow. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-01-30.at.3.10.58.PM.movAndroid: mWeb ChromeScreen.Recording.2026-01-30.at.3.12.11.PM.moviOS: HybridAppScreen.Recording.2026-01-30.at.3.08.36.PM.moviOS: mWeb SafariScreen.Recording.2026-01-30.at.3.09.38.PM.movMacOS: Chrome / SafariScreen.Recording.2026-01-30.at.3.06.41.PM.mov |
|
@AndrewGable kindly bump on this |
|
🚀 Deployed to staging by https://github.com/AndrewGable in version: 9.3.11-40 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.3.12-1 🚀
|
Explanation of Change
Fixed Issues
$ #76489 (comment)
PROPOSAL: #76489 (comment)
Tests
Offline tests
Offline tests
Joinbutton disappear in thread message headerQA Steps
The same as offline tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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_native.mp4
Android: mWeb Chrome
android_mWeb.mp4
iOS: Native
https://github.com/user-attachments/assets/1ff799db-ce93-481e-a81f-9369e8c7913eiOS: mWeb Safari
ios_mWeb.mp4
MacOS: Chrome / Safari
web.mp4