Repository navigation
Build mention name maps lazily for the composer and Concierge drafts - #106086
luacmartins merged 14 commits into
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@MelvinBot deep review |
Deep reviewNo actionable introduced bugs found at
Automated verification: 6 targeted suites passed, 127 tests passed: composer imperative refs, Concierge draft state, both name-map hooks, edited-video cache, and Concierge draft context. No source changes made. Non-blocking test improvements:
Limits: no performance profiling was performed. Browser verification confirmed sending/rendering mentions, but could not verify editing, streaming, offline behavior, or console errors; those remain unverified, not failed product checks. |
|
🤖 Web test steps verification results: Verified sending and rendering genuine mentions; editing, streaming, offline, and console assertions remain blocked, so browser testing cannot confirm the editing fix. Deep code review found no actionable introduced bugs, and 6 targeted suites passed all 127 tests; remaining coverage suggestions and limitations are documented there.
|
c2fd9aa to
99e70f7
Compare
99e70f7 to
fdebccb
Compare
|
@MelvinBot deep review |
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deep reviewNo actionable introduced bugs found at Checked:
Validation: 9 targeted suites passed, 141 tests passed, covering composer commands, mention maps, Concierge drafts, and video caching. Non-blocking coverage improvements: test mention A → B → none without store writes; missing names arriving or being deleted; conflicting snapshot/live names; and actual render counts rather than reference identity alone. Limits: no browser verification or performance profiling in this review. Some composer/video tests mock downstream behavior, so passing tests do not establish complete attachment or offline round-trips. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@MelvinBot review |
ReviewNo actionable introduced bugs found at Rechecked scoped lookups, ArrowUp editing, video caching, and the updated Concierge personal-details ref. No new stale-data or lifecycle regression was substantiated. Optional robustness improvement: the account extraction guard rejects uppercase mention tags despite the parser accepting them. Making detection consistently case-insensitive would close that mismatch; no actual producer of uppercase tags was found, so this is non-blocking. Validation: 147 unique tests passed across 9 targeted suites. No browser verification or independent performance profiling performed. |
|
@bernhardoj 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.
Can reuse editingReportActionHtml
There was a problem hiding this comment.
Ok, I switched toif (!isEditing)to if (editingReportActionHtml === undefined) {} so it works the same way for empty strings
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safariw.mp4 |
bernhardoj
left a comment
There was a problem hiding this comment.
Small NAB suggestion left
|
This PR adds a new |
chuckdries
left a comment
There was a problem hiding this comment.
I approve this usage of Onyx.get 👍
|
@mountiny do you wanna review this one since you're assigned to the issue? |
0ae4451
|
@LukasMod we have several failing checks |
|
@luacmartins New conflicts resolved, all CI green 👍 |
|
🚧 luacmartins 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/luacmartins in version: 9.5.41-0 🚀
|
|
No help site update needed — this PR optimizes internal mention-name lookups without changing user workflows, labels, or documented behavior. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.41-2 🚀
Bundle Size Analysis (Sentry): |


Explanation of Change
ComposerWithSuggestionsandusePusherDraftPacingbuilt the report-name and user-name maps over the wholeCOLLECTION.REPORTandPERSONAL_DETAILS_LISTcollections, and the composer held both subscriptions. The maps are only needed when message HTML is converted back to markdown, so this PR builds them where the conversion happens and only for the IDs the HTML mentions.useMentionedAccountIDToNameMap, a selector that only maps the users mentioned in the last message. Report names are read once withOnyx.getin the key handler and mapped only for the mentioned rooms. That read carries arulesdir/no-onyx-get-snapshot-keydisable with a reason: Parser used to serve these names from a module-levelOnyx.connect, the composer never renders inside a Search scope, soOnyx.getreads the same live reports.useDraftMessageVideoAttributeCache): runs inside the composer, so it now uses the same scoped hooks on the edited message, only while editing.usePusherDraftPacing): keeps the personal details list in a ref instead of building the full name map on every render. When a draft event is applied,conciergeDraftStatebuilds names only for the users mentioned in that draft.@userand#roommentions are preserved in every path.Measured on a heavy account (4,109 reports, 6,828 personal details), web dev build, 10 runs per side against
main:main.ComposerProviderkeeps full subscriptions throughuseEditMessage, which this PR does not touch, so each write still reaches the composer; it is just much cheaper now.Fixed Issues
$ #104859
PROPOSAL:
Tests
#roomstays plain text) and sendhi @someone@domain.com see #admins, using a real member and picking the room from the#suggestion list.@someone@domain.comand#adminsas markdown, not@Hidden,#Hiddenor raw HTML.*bold* _italic_ ~strike~ `code` https://example.com, a quote, a heading, a code block and a mention, press ArrowUp, and verify the draft matches what you sent.Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.mov
Android: mWeb Chrome
android.web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios.web.mov
MacOS: Chrome / Safari
web.1.mov
web.2.mov