Conversation
Non-existing room mentions in workspace descriptions showed a green highlight because the MentionReportContext was missing exactlyMatch: true, causing all mentions to be highlighted regardless of whether the room exists. This matches the pattern used by PureReportActionItem, ReportDetailsPage, and MoneyRequestConfirmationListFooter. Co-authored-by: truph01 <truph01@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
@eh2077 Could you take a look into this PR as well? |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
yes, it makes sense. @MelvinBot mark it ready for review |
|
Done! This PR has been marked as ready for review. 🚀 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-03-16.at.8.47.21.PM.mov |
eh2077
left a comment
There was a problem hiding this comment.
confirmed it fixes the issue.
|
🚧 @madmax330 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
I'll request a CP for you, @madmax330, don't forget next time 😆 |
…tionGreenHighlight fix: add exactlyMatch to workspace description mention context (cherry picked from commit 3617034) (cherry-picked to staging by cristipaval)
|
🚀 Cherry-picked to staging by https://github.com/cristipaval in version: 9.3.38-2 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.3.38-4 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/cristipaval in version: 9.3.39-0 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.3.39-3 🚀
|
Explanation of Change
PR #55846 added room mention highlighting to workspace descriptions by wrapping the description in a
MentionReportContext.Provider. However, the context value was missingexactlyMatch: true, which caused ALL room mentions to be highlighted — even non-existing rooms like#abc.Without
exactlyMatch, the styling condition inMentionReportRenderer(!exactlyMatch || navigationRoute) short-circuits totrue, bypassing the check for whether the room actually exists. Additionally, since bothreportID(for a non-existing room) andcurrentReportID(explicitly set toundefined) areundefined, the comparisonundefined === undefinedevaluates totrue, triggering the green "current room" highlight.This PR adds
exactlyMatch: trueto the workspace description's mention context, matching the pattern already used byPureReportActionItem,ReportDetailsPage, andMoneyRequestConfirmationListFooter. With this flag, the styling condition requires a validnavigationRoute(which only exists for rooms that actually exist), preventing non-existing rooms from being highlighted.Fixed Issues
$ #85363
PROPOSAL: #85363 (comment)
Tests
#abc#abcdoes NOT show a green highlight — it should appear as plain text#adminsif one exists in your workspace)Offline tests
N/A — this change affects rendering logic only, not network behavior. Room mentions render the same way offline.
QA Steps
#abc#abcdoes NOT show a green highlightPR 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
MacOS: Chrome / Safari
Non-existing room mention (#abc) — no green highlight, renders as plain text:
Tested on web: after saving
#abcas workspace description, the mention renders as plain text with no highlight (transparent background, standard text color).Existing room mention (#admins) — blue highlight, clickable:
Tested on web: after saving
#adminsas workspace description, the mention renders with blue highlight background (rgb(176, 217, 255)) and blue link text (rgb(1, 100, 191)), and is clickable.