Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.3.64-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-23129/folder/13177078/41237899/1372516040?sort=%2Bidentifier
Email or phone of affected tester (no customers): n/a
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: iPhone 13 iOS 26.3.1
App Component: Chat Report View
Action Performed:
- Open the app
- Go to any conversation with some messages
- Long tap on any message
- Select Mark as unread
Expected Result:
Context menu closes after selecting Mark as unread option
Actual Result:
Context menu does not close after selecting Mark as unread option
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
Screenshots/Videos
Video.mp4
Issue Owner
Current Issue Owner: @mallenexpensifyMetadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
melvin-bot commentedon Apr 28, 2026
Triggered auto assignment to @JS00001 (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Apr 28, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 28, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
OSBotify commentedon Apr 28, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #87155 - "[INTERNAl QA] Compact row styles for context menus and popovers" by @shawnborton (Low confidence)
Related Issues: None identified
Recommendation: NEEDS INVESTIGATION
I was unable to pinpoint the exact root cause with high confidence. PR #87155 is the most significant change to
BaseReportActionContextMenu.tsxin this staging cycle, but its changes appear to only affect wide-screen styling, making it an unlikely cause of an iOS-only regression.Assigned: @shawnborton (PR author), @shubham1206agra @Julesssss (approving reviewers) from highest-confidence causing PR
Labels:
DeployBlockerCashkept (frontend/App bug on iOS). No label changes made.📋 Detailed Analysis
Evidence
The bug is reproduced on iOS App only (staging version 9.3.64-0), not on production or any other platform. The context menu does not close after selecting "Mark as unread" from the long-press context menu on a message.
Code path for "Mark as unread" (
src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx, line 470–474):The
hideContextMenu(true, ...)call usesshouldDelay=truewhich triggers an 800mssetTimeoutbefore callingcontextMenuRef.current.hideContextMenu(paramsWithCallback). After 800ms, it checks if theinstanceIDRef.currentstill matches the savedinstanceIDbefore proceeding. If the instance ID was reset (because the popover was hidden and reshown), the close would be silently skipped.PR #87155 modified
BaseReportActionContextMenu.tsxto wrap the entire content in aCompactMenuContext.Provider value(providestrueto all platforms). WhileCompactMenuContextchecksisCompactMenu && !isSmallScreenWidth, meaning compact styles do NOT apply on narrow/mobile screens, the provider is now active on iOS as well. This is the most direct change to the affected file in this staging cycle.Other candidates investigated:
PopoverReportActionContextMenu.tsx,ReportActionContextMenu.ts, or thehideContextMenufunction signatureuseThrottledButtonState, which controls the 1800ms success-state displaymarkCommentAsUnreadfunction was not changed in this staging cycleVerification
src/pages/inbox/report/ContextMenu/BaseReportActionContextMenu.tsxwas modified by PR [INTERNAl QA] Compact row styles for context menus and popovers #87155 (92 additions, 88 deletions)hideContextMenu(true, ...)fromsrc/pages/inbox/report/ContextMenu/ReportActionContextMenu.tsline 80BOTTOM_DOCKEDmodal (src/components/Popover/index.native.tsx)Root Cause
The exact root cause is unclear from static code analysis. Possible explanations:
PR [INTERNAl QA] Compact row styles for context menus and popovers #87155 (low confidence): The
CompactMenuContext.Provider valuewrapper added toBaseReportActionContextMenu.tsxmay be interacting with the iOSBOTTOM_DOCKEDmodal's render cycle in an unexpected way, potentially causing a re-render that interferes with the 800ms close timer's instance ID check.Pre-existing iOS edge case exposed: The 800ms
shouldDelaytimer inhideContextMenu(true, ...)+ the 1800ms throttled button state timer (for the success checkmark display) could be creating a race condition specific to iOS's rendering/animation cycle that was exposed by some other recent change.Mobile-Expensify submodule: The staging deploy includes Mobile-Expensify updates (
9.3.63-1and9.3.64-0) that could contain iOS-native changes affecting modal close behavior.The PR author @shawnborton and reviewing engineers should verify whether PR #87155 introduced this iOS regression. If not, deeper investigation into the Mobile-Expensify submodule changes may be warranted.
MelvinBot commentedon Apr 28, 2026
Proposal
What is the root cause of that problem?
When "Mark as unread" is tapped,
markCommentAsUnread()fires anOnyx.mergeon the report (updatinglastReadTime) beforehideContextMenu(true, ...)runs its 800ms delayed close.The
trueparameter triggers a delayed hide path that capturesinstanceIDRef.currentand checks it again after 800ms — if the ID changed (due to the popover remounting from the Onyx-triggered re-render), the close is silently skipped.Other actions that use
hideContextMenu(true, ...)(Copy URL, Copy text, Copy email) only write to the clipboard — no Onyx updates, no re-renders, so the instanceID stays stable. "Mark as unread" is unique in triggering an Onyx merge before the delayed close.What changes do you think we should make in order to solve the problem?
Move
markCommentAsUnread()into theonHidecallback so it runs after the popover closes, preventing re-renders during the 800ms delay window. This matches the pattern used by other actions like "Reply in thread" which perform their work inside the callback:In
ContextMenuActions.tsx:470-475, change theonPressto:What alternative solutions did you explore? (Optional)
hideContextMenu(false, ...)— closes immediately without delay, but loses the checkmark success animation that thesuccessIcon: 'Checkmark'field provides.setTimeoutcallback more resilient to re-renders, but this would mask future bugs where the guard is genuinely needed.The callback approach is safest because it preserves the success animation while ensuring the Onyx update can't interfere with the close.
Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.shawnborton commentedon Apr 28, 2026
@MelvinBot what PR caused this? Was this the cause: #87155 Or was it something else?
70 remaining items
melvin-bot commentedon May 4, 2026
@ZhenjaHorbach / @aimane-chnaif @mallenexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
melvin-bot commentedon May 4, 2026
@ZhenjaHorbach Whoops! This issue is 2 days overdue. Let's get this updated quick!
luacmartins commentedon May 5, 2026
@ZhenjaHorbach will be paid via the main issue #85260. We just need to pay @aimane-chnaif for the PR review.
mallenexpensify commentedon May 7, 2026
Payment Summary
Contributor+: @aimane-chnaif due $250 via Upwork
@aimane-chnaif can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022052497671705880228
aimane-chnaif commentedon May 8, 2026
@mallenexpensify accepted offer
melvin-bot commentedon May 11, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon May 12, 2026
Payment Summary
Contributor+: @aimane-chnaif due $250 via NewDot