Repository navigation
Keep angle brackets in the Search in label for reports with no parent action - #102840
Conversation
Co-authored-by: DylanDylann <DylanDylann@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. AI tests run locally: |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🤖 Web test steps verification results: ✅ pass The "Search in" suggestion for a group chat named
|
|
@MelvinBot Please fill the QA steps |
|
@MelvinBot Mark this PR as ready for review |
|
🤖 Android test steps verification results: ✅ pass On Android, the "Search in" suggestion for a group chat named
|
Reviewer Checklist
Screenshots/Videos |
|
I couldn't mark this PR as ready for review. This run doesn't have permission to change a PR's draft status, so the request was blocked. To mark it ready yourself, click Ready for review at the bottom of the PR page. |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #102388 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
@MelvinBot Please fill the QA steps |
|
I filled in the QA Steps section of the PR description. Steps 1–6 are the reproduction steps from the linked issue. They passed on Web and Android in my earlier test runs. Step 7 is a regression check on a 1:1 chat. I left the Tests section and the author checklist for you to complete. |
|
@Gonals All good to go. I can't ask Melvin to mark this PR as ready, and I'm also not able to do it myself. Could you please help mark it as ready and take a look? Thanks |
|
@DylanDylann 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd311c5002
ℹ️ 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".
| const icons = useMemoizedLazyExpensifyIcons(['Plus', 'RemoveMembers']); | ||
| const reportAction = useMemo(() => getReportAction(report?.parentReportID, report?.parentReportActionID), [report?.parentReportID, report?.parentReportActionID]); | ||
| const shouldParserToHTML = reportAction?.actionName !== CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT; | ||
| const shouldParserToHTML = !!reportAction && reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT; |
There was a problem hiding this comment.
Subscribe to the parent action before choosing title parsing
When a system-message thread is opened after its parent action is absent (the REPORT_ACTIONS collection is evictable in src/setup/index.ts:45-50), getReportAction() returns undefined. This useMemo is keyed only by the parent IDs, so it preserves that undefined value even if the action later arrives; the new guard then permanently renders the Members subtitle with raw HTML instead of the parsed system-message title. Read the parent action through useParentReportAction/useOnyx so the parsing decision updates when that collection hydrates.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@MelvinBot Please fix this comment to use useOnyx
There was a problem hiding this comment.
Fixed in d8b02cf. The Members page now reads the parent action with useParentReportAction(report). That hook wraps useOnyx on the parent report's actions, so the subtitle re-parses when that collection loads. I also removed the unused getReportAction import: src/pages/DynamicRoomMembersPage.tsx:74.
Checks: the React Compiler check passes. Typecheck shows no errors in this file; the only errors are in react-native-gesture-handler files from this local environment. ESLint shows only 2 errors that were already on lines this change didn't touch.
…tes when it loads Co-authored-by: DylanDylann <DylanDylann@users.noreply.github.com>
|
@stitesExpensify 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] |
|
🚧 Gonals has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.5.4-0 🚀
|
|
No help site update is needed. This bug fix stops chat names with angle brackets (for example, |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.5.4-3 🚀
Bundle Size Analysis (Sentry): |











Explanation of Change
The "Search in" suggestion ran the report name through
Parser.htmlToTextwhenever the report's parent action was not a comment. A report with no parent action (for example, a group chat) also matched that check, so a user-typed name like`< >`had< >stripped as if it were an HTML tag.This PR:
!!reportAction &&guard thatSearchAutocompleteList.tsxalready uses, so only threads whose parent is a system message get HTML-parsed.contextualReportdirectly. Before, it came from a variable that wasundefinedwhen the report wasn't in recent reports, so system-message threads outside recent reports would have shown raw HTML once the new guard was in place.DynamicRoomMembersPage.tsx, which had the identical unguarded check.tests/ui/SearchRouterContextualSuggestionTest.tsxcovering a report with no parent action, a comment-thread, and a system-message thread.Fixed Issues
$ #102388
PROPOSAL: #102388 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
QA Steps
`< >`and create the group.`< >`with the angle brackets, not just the backticks.`< >`.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari