fix: Empty space is shown when clearing the cache#84014
fix: Empty space is shown when clearing the cache#84014suhailpthaj wants to merge 3 commits intoExpensify:mainfrom
Conversation
|
@sobitneupane 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: 1b7dda90ed
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2fcfddc527
ℹ️ 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 reportActionsToRender = useMemo( | ||
| () => (isWaitingForInitialLoad && lastAction ? [lastAction] : sortedVisibleReportActions), | ||
| [isWaitingForInitialLoad, lastAction, sortedVisibleReportActions], |
There was a problem hiding this comment.
Preserve scroll-target action during initial loading fallback
When isWaitingForInitialLoad is true, this narrows data to only lastAction, which can drop the action referenced by reportActionID (initialScrollKey) even if it already exists in sortedVisibleReportActions. Because InvertedFlatList initializes its scroll-key state from the first data snapshot, starting with a list that omits the target causes linked-message/deep-link opens to lose their intended anchor once full data arrives, so users can land on the wrong part of the conversation during initial load.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@sobitneupane we shouldn't apply this as this case isn't practically possible I believe.
When user clears the cache or re-sign then the jump happened but when user navigated with deep link in either the same tab or in a different one then it will trigger the full page refresh which will show the complete page loading and that empty jump wouldn't happen then. So it's practically not possible to get us on Empty space when deep link or reportActionID is there in deep link.
You can test this on staging because this is the case which is expected on staging too. As we only have last action available (ocassionally with some sort of messages) when the empty space appears. I'm expecting that the deep linking anchoring is already there otherwise how we are anchoring the deep links when there is empty space?
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@heyjennahay @sobitneupane Bump for PR review. @sobitneupane The codex suggestion is an edge case which I'll handle but you can continue reviewing the PR. |
@suhailpthaj When do you expect to handle this? It would be very helpful if you could address it before the review. Also, could you please merge main? |
|
@sobitneupane Responded on the edge case, can you have a look? |
sobitneupane
left a comment
There was a problem hiding this comment.
@suhailpthaj I noticed a couple of issues in the PR:
- Screen Flicker: In the screen recrding below, the report initially renders with a few actions along with the header. Shortly after, it gets replaced by the last report action with a skeleton.
Untitled.copy.mov
- Skeleton overlaping animation.
|
@suhailpthaj when a user is offline, we show a few report actions along with a loading skeleton (and in some cases, full report). When the user goes online, this gets replaced by the last report action along with the loading skeleton. Screen.Recording.2026-03-24.at.18.00.38.movUntitled.movI can still see blank spaces above few report actions on slow internet. Untitled.copy1.mov |
|
Bump @suhailpthaj |
Explanation of Change
In this PR, we are solving the empty space appearing in the chat after clearing the cache or re-signing issue.
Fixed Issues
$ #76666
PROPOSAL: #76666 (comment)
Tests
Offline tests
Same as Test
QA Steps
Same as Test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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-native.mp4
Android: mWeb Chrome
Android-mWeb.mov
iOS: Native
iOS-native.mp4
iOS: mWeb Safari
iOS-mWeb.mp4
MacOS: Chrome / Safari
macOS.mp4