Fall back to live Onyx personal details for the payer in flat Search transaction rows - #98496
Fall back to live Onyx personal details for the payer in flat Search transaction rows#98496MelvinBot wants to merge 1 commit into
Conversation
…transaction rows Co-authored-by: Olly <Ollyws@users.noreply.github.com>
|
The only two failing checks here aren't code failures — they're process checks that need a human, so there's nothing for me to push a fix for:
Every actual CI check is green: So no code fix is needed — please fill out the PR Author Checklist and get a reviewer to approve, and the remaining checks will clear. |
|
Nothing has changed since my previous analysis — the same two checks are the only ones failing, and neither is fixable by pushing code:
All actual CI (tests, typecheck, ESLint, builds, codecov) is green; |
Explanation of Change
In the Spend list (and any flat Search transaction view), the payer (
from) was resolved only from the Search snapshot'spersonalDetailsList. When an expense is moved to the self-DM (Report and remove from report) while offline, the actor isn't yet in that snapshot, sofromfell back toemptyPersonalDetailsand the username/avatar rendered blank until the app reconnected and the server snapshot arrived.This gives the flat transaction path (
getTransactionsSections) the same live-Onyx fallback the grouped/expense-report path (getReportSections) already uses: it merges live Onyx personal details into the snapshot map (snapshot still wins where present, live only fills the gaps) and resolvesfrom/tofrom that merged map. Becausefromis the object handed toUserInfoCell, this fixes both the missing name and the missing avatar. On reconnect the server snapshot continues to take precedence, so nothing else changes.getSectionsalready receivesonyxPersonalDetailsList; it just wasn't forwarded togetTransactionsSections. The sharedmergePersonalDetailsListshelper was moved abovegetTransactionsSectionsso it can be referenced there.Fixed Issues
$ #97481
PROPOSAL: #97481 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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