You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-05-22] [Due for payment 2026-05-20] Web - Search - After closing "Search" RHP. chats are briefly visible on top of screen again. #90510
Version Number: 9.3.73-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:#90358 Email or phone of affected tester (no customers):ibellicotest+2250@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Windows 11 / Chrome App Component: Search
Action Performed:
Open the staging.new.expensify.com website,
Navigate to "Inbox"
Click on the search icon on the top right corner.
Close "Search" RHP by clicking outside of it or pressing "ESC" on keyboard.
Note that after RHP is closed, chats reappear briefly on top of screen where RHP was displayed.
Expected Result:
RHP modal should be dismissed correctly without any flickering after clicking outside of it or pressing "ESC" on keyboard.
Actual Result:
After closing "Search" RHP by clicking outside of it ot pressing "ESC" on keyboard, chats from list are briefly visible again on top of the screen where RHP was displayed.
👋 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:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #90358 - "Refactor ReanimatedModal/index.tsx to follow Rules of React and compile with React Compiler" by @roryabraham (High confidence) Related Issues: #68765 (partial fix referenced in PR)
Recommendation: REVERT
The PR introduced a regression in the modal close animation by removing the isVisibleState state variable, which now causes the container children to be unmounted immediately when isVisible becomes false, while the modal shell remains visible during the exit animation — producing visible flickering on web.
The bug manifests as chat list content briefly appearing over the area where the Search RHP was displayed after dismissal — a classic modal close animation artifact.
The PR merged at 2026-05-13T00:08:25Z and the issue was reported on 2026-05-13, consistent with the timeline.
Root Cause
The refactor eliminated isVisibleState (a one-render-lagged mirror of the isVisible prop) and replaced it with direct use of the isVisible prop throughout the render output.
In the old code, the container children were rendered conditionally on isVisibleState (not isVisible). When the modal was dismissed, isVisible became false first, then isVisibleState followed one render later after the exit animation had already been set in motion. This kept the children mounted during the exit animation.
In the new code, {isVisible && containerView} causes the container children to be unmounted immediately when isVisible flips to false. However, modalVisibility = isVisible || isTransitioning evaluates to true at the same moment (because isContainerOpen is still true, making isTransitioning = true). This means the React Native <Modal> wrapper remains visible={true} while the container content is already unmounted — leaving an empty, transparent modal shell briefly over the screen. The underlying LHN/chat list renders through this transparent shell, causing the flicker reported in the issue.
The fix direction is either:
Revert the PR to restore the previous behavior.
Roll forward with a targeted fix: change {isVisible && containerView} to {(isVisible || isTransitioning) && containerView} so the container stays mounted during the exit animation, matching the intent of the old isVisibleState logic.
Revert is recommended as the safest option given deploy blocker severity.
PR #90358 refactored ReanimatedModal to derive isTransitioning from state instead of tracking it explicitly, and replaced the internal isVisibleState with the raw isVisible prop. This created a mismatch between what keeps the Modal wrapper visible (isVisible || isTransitioning) and what keeps the Container content mounted (just isVisible).
When the RHP closes, isVisible flips to false immediately. The Container unmounts instantly at index.tsx:237, but the Modal wrapper stays visible for the transition period at index.tsx:201-207. This creates a ~200ms window where the transparent Modal is still mounted but empty — the underlying chat list shows through where the RHP content used to be.
Before the refactor, the old isVisibleState was an internal state variable that stayed true during the exit animation, keeping the Container mounted while it animated out. The new code removed that buffering.
What changes do you think we should make in order to solve the problem?
Change the Container render guard from {isVisible && containerView} to {modalVisibility && containerView} (on both occurrences at lines 228 and 237) in src/components/Modal/ReanimatedModal/index.tsx. This keeps the Container in the tree during the exit transition so Reanimated's exiting Keyframe animation can play, matching the pre-refactor behavior.
What alternative solutions did you explore? (Optional)
Reintroduce isVisibleState: Would restore the exact old behavior but defeats the purpose of the refactor to derive isTransitioning.
Using modalVisibility is the minimal fix — it aligns the Container's lifecycle with the Modal's lifecycle, which is the correct semantic (the Container should be mounted whenever the Modal is visible).
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
changed the title [-]Web - Search - After closing "Search" RHP. chats are briefly visible on top of screen again.[/-][+][Due for payment 2026-05-20] Web - Search - After closing "Search" RHP. chats are briefly visible on top of screen again.[/+]on May 13, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.73-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@abzokhattab 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]
changed the title [-][Due for payment 2026-05-20] Web - Search - After closing "Search" RHP. chats are briefly visible on top of screen again.[/-][+][Due for payment 2026-05-22] [Due for payment 2026-05-20] Web - Search - After closing "Search" RHP. chats are briefly visible on top of screen again.[/+]on May 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.74-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@abzokhattab 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]
Activity
melvin-bot commentedon May 13, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #90358
melvin-bot commentedon May 13, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 13, 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 May 13, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #90358 - "Refactor ReanimatedModal/index.tsx to follow Rules of React and compile with React Compiler" by @roryabraham (High confidence)
Related Issues: #68765 (partial fix referenced in PR)
Recommendation: REVERT
The PR introduced a regression in the modal close animation by removing the
isVisibleStatestate variable, which now causes the container children to be unmounted immediately whenisVisiblebecomesfalse, while the modal shell remains visible during the exit animation — producing visible flickering on web.Assigned: @roryabraham (PR author), @abzokhattab (approving reviewer), @carlosmiceli (approving reviewer)
Labels:
DeployBlockerCashkept (frontend App PR caused this issue). No label changes made.Detailed Analysis
Evidence
src/components/Modal/ReanimatedModal/index.tsx.Verification
src/components/Modal/ReanimatedModal/index.tsxRoot Cause
The refactor eliminated
isVisibleState(a one-render-lagged mirror of theisVisibleprop) and replaced it with direct use of theisVisibleprop throughout the render output.In the old code, the container children were rendered conditionally on
isVisibleState(notisVisible). When the modal was dismissed,isVisiblebecamefalsefirst, thenisVisibleStatefollowed one render later after the exit animation had already been set in motion. This kept the children mounted during the exit animation.In the new code,
{isVisible && containerView}causes the container children to be unmounted immediately whenisVisibleflips tofalse. However,modalVisibility = isVisible || isTransitioningevaluates totrueat the same moment (becauseisContainerOpenis stilltrue, makingisTransitioning = true). This means the React Native<Modal>wrapper remainsvisible={true}while the container content is already unmounted — leaving an empty, transparent modal shell briefly over the screen. The underlying LHN/chat list renders through this transparent shell, causing the flicker reported in the issue.The fix direction is either:
{isVisible && containerView}to{(isVisible || isTransitioning) && containerView}so the container stays mounted during the exit animation, matching the intent of the oldisVisibleStatelogic.Revert is recommended as the safest option given deploy blocker severity.
MelvinBot commentedon May 13, 2026
Proposal
What is the root cause of that problem?
PR #90358 refactored
ReanimatedModalto deriveisTransitioningfrom state instead of tracking it explicitly, and replaced the internalisVisibleStatewith the rawisVisibleprop. This created a mismatch between what keeps the Modal wrapper visible (isVisible || isTransitioning) and what keeps the Container content mounted (justisVisible).When the RHP closes,
isVisibleflips tofalseimmediately. The Container unmounts instantly atindex.tsx:237, but the Modal wrapper stays visible for the transition period atindex.tsx:201-207. This creates a ~200ms window where the transparent Modal is still mounted but empty — the underlying chat list shows through where the RHP content used to be.Before the refactor, the old
isVisibleStatewas an internal state variable that stayedtrueduring the exit animation, keeping the Container mounted while it animated out. The new code removed that buffering.What changes do you think we should make in order to solve the problem?
Change the Container render guard from
{isVisible && containerView}to{modalVisibility && containerView}(on both occurrences at lines 228 and 237) insrc/components/Modal/ReanimatedModal/index.tsx. This keeps the Container in the tree during the exit transition so Reanimated'sexitingKeyframe animation can play, matching the pre-refactor behavior.What alternative solutions did you explore? (Optional)
isVisibleState: Would restore the exact old behavior but defeats the purpose of the refactor to deriveisTransitioning.Using
modalVisibilityis the minimal fix — it aligns the Container's lifecycle with the Modal's lifecycle, which is the correct semantic (the Container should be mounted whenever the Modal is visible).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.fix: keep modal content mounted during close animation to prevent con…
3 remaining items
test(ReanimatedModal): add regression tests for transition state machine
[-]Web - Search - After closing "Search" RHP. chats are briefly visible on top of screen again.[/-][+][Due for payment 2026-05-20] Web - Search - After closing "Search" RHP. chats are briefly visible on top of screen again.[/+]melvin-bot commentedon May 13, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 13, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.73-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-05-20. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 13, 2026
@abzokhattab 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]
fix(ReanimatedModal): replace isContainerOpen bool with four-state enum
[-][Due for payment 2026-05-20] Web - Search - After closing "Search" RHP. chats are briefly visible on top of screen again.[/-][+][Due for payment 2026-05-22] [Due for payment 2026-05-20] Web - Search - After closing "Search" RHP. chats are briefly visible on top of screen again.[/+]melvin-bot commentedon May 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.74-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-05-22. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 15, 2026
@abzokhattab 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]