[No QA] Add debug logs for tracking infinite skeleton states#84408
Conversation
|
@hoangzinh 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: 48c21c9c0d
ℹ️ 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".
| } else if (isFullReconnect) { | ||
| commandName = 'ReconnectApp (full)'; | ||
| } else { | ||
| commandName = 'ReconnectApp (partial)'; | ||
| } |
There was a problem hiding this comment.
Record actual command for non-reconnect loading events
The fallback branch hard-codes commandName = 'ReconnectApp (partial)' for every call that is neither OpenApp nor full reconnect, but this helper is also used by getMissingOnyxUpdates() (API.makeRequestWithSideEffects(SIDE_EFFECT_REQUEST_COMMANDS.GET_MISSING_ONYX_MESSAGES, ..., getOnyxDataForOpenOrReconnect())). As a result, logs for missing-update fetches are misattributed as partial reconnects, which makes the new diagnostics inaccurate when investigating long isLoadingReportData sessions.
Useful? React with 👍 / 👎.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
PR doesn’t have any new product considerations as a performance PR. Unassigning and unsubscribing myself. |
|
@mountiny It seems we don't need a C+ here. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @mountiny 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/mountiny in version: 9.3.33-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.33-5 🚀
|
Explanation of Change
Users were experiencing persistent skeleton/loading states across the app — Search tab, ForYou/Reports screen, and avatar. Root cause investigation pointed to two issues: (1)
ReconnectAppAPI responses taking 5–7 minutes, keepingisLoadingReportData: truefor the entire duration, and (2) Search showing skeletons when online but before any search API response has completed.This PR adds targeted debug logs to help track these issues in production:
src/libs/actions/App.ts— Logs whenisLoadingReportDatais set totrue, including the triggering command name (OpenApp, ReconnectApp full/partial)src/libs/actions/OnyxUpdates.ts— Addscommandto the "stale update skipped" log so we can identify which request returned stale datasrc/components/Search/index.tsx— Logs the exact conditions causing the search skeleton to show (isOffline,isDataLoaded,isCardFeedsLoading,isSearchLoading, etc.)Fixed Issues
$ #83505
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari