Move short mention logins cache out of PersonalDetailsUtils - #98157
Conversation
PR Expensify#96500 added an allPersonalDetailLogins cache to the PERSONAL_DETAILS_LIST Onyx.connect in PersonalDetailsUtils. That subscription is being removed by Expensify#66391, so the new consumer set that refactor back. Move the cache to its own thin store, ShortMentionLogins, following the CurrentUserStore pattern, and subscribe with connectWithoutView since Onyx documents connect as pending deprecation. PersonalDetailsUtils returns to its pre-Expensify#96500 shape and the two call sites import from the new module. The list cannot come from a hook yet: getParsedComment resolves short mentions from non-React code across roughly thirty callers. No behaviour change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
This PR adds a new |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-07-21.15.44.00.movAndroid: mWeb Chrome2026-07-21.15.34.17.moviOS: HybridApp2026-07-21.15.44.00.moviOS: mWeb Safari2026-07-21.15.34.17.movMacOS: Chrome / Safari2026-08-11.15.42.50.mov |
|
LGTM! |
|
Verify peer review is stuck, so I'm gonna close and reopen the PR |
mountiny
left a comment
There was a problem hiding this comment.
Thanks for cleaning this up
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 Valforte 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Valforte in version: 9.4.53-0 🚀
|
|
🤖 I reviewed the changes in this PR and no help site changes are required. This is a pure internal refactor that moves the
As the PR states, there is no behavior change — same list, same construction, same consumers. There's no new feature, no UI change, and no modified setting, label, or user-facing flow that would need to be documented in @adhorodyski, if you believe a customer-facing behavior did change here and warrants a docs update, let me know what it is and I'll draft the help site PR. |
Explanation of Change
Follow-up to #96500, addressing this review comment from @bernhardoj.
#96500 added an
allPersonalDetailLoginscache to thePERSONAL_DETAILS_LISTOnyx.connectinPersonalDetailsUtils. That subscription is being removed by #66391, so a new consumer on it sets that refactor back.This moves the cache into its own thin store,
src/libs/ShortMentionLogins.ts, following the existingsrc/libs/CurrentUserStore.tspattern.PersonalDetailsUtilsreturns to its pre-#96500 shape; the two call sites (ReportUtils.getParsedCommentanduseComposerSubmit) import from the new module instead.Two notes on the shape:
Onyx.connectWithoutView, which react-native-onyx's own typings recommend overconnect("This method will be deprecated soon"). It is also outsiderulesdir/no-onyx-connect, so this adds no seatbelt entry and no new lint debt.getParsedCommentresolves short mentions from non-React code and has around thirty callers; until those thread personal details in themselves, a module-level read is the only option.useComposerSubmitdeliberately reads it imperatively at submit time so the composer input and send button don't subscribe to the personal details collection on render — that was part of fix: task assignee resolution for composer short mentions #96500 and is preserved here.No behaviour change: same list, same construction, same consumers.
Fixed Issues
$ #96612
PROPOSAL:
Tests
Same as #96500, since behaviour is unchanged:
[] @coworker Some task(short mention, without the domain).[] @nosuchuser Some taskand verify the task is created unassigned, titled@nosuchuser Some task.@coworkerand verify the mention renders as a resolved mention, not plain text.Offline tests
Same as Tests. Task creation is optimistic and works offline.
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionnpm run compress-svg)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.