-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix "New message" button shows when resolving an actionable mention whisper #50247
Fix "New message" button shows when resolving an actionable mention whisper #50247
Conversation
@ishpaul777 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] |
Can't send message on android mweb. android.mweb.mp4 |
@@ -715,8 +735,7 @@ function shouldReportActionBeVisibleAsLastAction(reportAction: OnyxInputOrEntry< | |||
return ( | |||
shouldReportActionBeVisible(reportAction, reportAction.reportActionID) && | |||
!(isWhisperAction(reportAction) && !isReportPreviewAction(reportAction) && !isMoneyRequestAction(reportAction)) && | |||
!(isDeletedAction(reportAction) && !isDeletedParentAction(reportAction)) && | |||
!isResolvedActionTrackExpense(reportAction) |
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.
I remove checking isResolvedActionTrackExpense
because shouldReportActionBeVisible
already covers it with the new condition.
src/libs/OptionsListUtils.ts
Outdated
@@ -329,8 +329,7 @@ Onyx.connect({ | |||
ReportActionUtils.shouldReportActionBeVisible(reportAction, actionKey) && | |||
!ReportActionUtils.isWhisperAction(reportAction) && | |||
reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.CREATED && | |||
reportAction.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && | |||
!ReportActionUtils.isResolvedActionTrackExpense(reportAction), |
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.
reportScrollManager.scrollToIndex(index); | ||
} | ||
}, [index, originalMessage, prevActionResolution, reportScrollManager, isActionableWhisper, hasResolutionInOriginalMessage]); | ||
|
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.
Removed this workaround because the issue doesn't happen anymore after we exclude the resolved actionable whisper from the list.
will finish this today in few hours |
For these steps it works well, but after log out and log in and opening the room again shows the floating "New message" button again, can you please investigate if we can resolve it @bernhardoj Screen.Recording.2024-10-09.at.2.19.00.AM.mov |
I'm able to repro it by simply reopening the report. Here is what happens:
Since we don't include the whisper as the last action anymore, the new message shows. I think BE shouldn't send the resolved whisper However, if that's the expected behavior, then we shouldn't optimistically update the |
Thanks for investigation!
i do agree with this 👍, pulling @youssef-lr early on this PR to get some help with this bug which appears to need BE changes |
Not overdue, I bumped Youssef in slack (C+ channel) yesterday |
We need to resolve this as well because it is blocking #49599:
IMO, we should make the following BE changes:
|
I'm not able to reproduce this locally, can we try again? |
@youssef-lr Still happens for me. web.mp4The new message doesn't show because the room has less than 25 messages. I forgot to add more messages before recording, but the above video shows the comparison between the
Here is the video with the new message shows. web.2.mp4 |
@youssef-lr just in case you missed the above comment ☝️ |
@youssef-lr gentle bump 🙇 |
@bernhardoj can you please sync main & retest again and start a thread in #expensify-open-source if issue is still reproducable, Tag me if you do. Thanks! |
It's still reproducible. Here is the thread. |
hi @paultsimura! The backend changes do NOT currently cover this case - I only updated the behavior when receiving the whisper, not when resolving it. I can look into that too, but I wasn't aware of it at the time |
@bernhardoj Will you please merge main give this a test and let us know if there's any left to do or it works well as is? |
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.
ugh that new lint rule makes these very hard to review. I think the actual code diff looks good! One minor change and then should be good on my end
Conflicts @bernhardoj |
Fixed |
@bernhardoj we have conflicts 😭 |
@youssef-lr @ishpaul777 fixed |
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.
LGTM! One Typescript question I'm curious about - not a blocker though!
@ishpaul777 I think the reviewer checklist must have changed since you filled it out, mind updating with the latest so the check is happy? |
done! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-01-14.at.1.54.53.AM.movAndroid: mWeb ChromeScreen.Recording.2025-01-14.at.1.58.44.AM.moviOS: NativeScreen.Recording.2025-01-14.at.1.36.39.AM.moviOS: mWeb SafariScreen.Recording.2025-01-14.at.1.36.39.AM.movMacOS: Chrome / SafariScreen.Recording.2025-01-14.at.2.04.55.AM.movMacOS: DesktopScreen.Recording.2025-01-11.at.1.20.22.AM.mov |
Great. @youssef-lr all yours, though I think you may be out sick? I can merge tomorrow if you're still not around. I hope you feel better! |
oh noooo i was coming in here to merge, but looks like we have conflicts now. @bernhardoj mind handling those? |
@dangrous fixed |
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.
LGTM!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/dangrous in version: 9.0.90-0 🚀
|
I think this PR caused this bug here. |
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.90-6 🚀
|
@ishpaul777 @bernhardoj I know you partially reverted this PR to fix that bug ^ - do we need a new fix for this, or are we good? |
I explained the root cause of that issue on the PR and provided a proper fix without partially reverting the PR. |
Ah okay great! |
Details
Resolving an actionable mention whisper causes the "New message" button to shows up.
Fixed Issues
$ #49824
PROPOSAL: #49824 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android.mp4
Android: mWeb Chrome
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4