fix: Unable to Scroll in Right-Hand Panel (RHP) for Certain Expenses.#83944
fix: Unable to Scroll in Right-Hand Panel (RHP) for Certain Expenses.#83944mountiny merged 11 commits intoExpensify:mainfrom
Conversation
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
Nice, confirmed that this works well on the affected report, lets get the PR ready for a review |
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
This comment was marked as outdated.
This comment was marked as outdated.
|
I’ll continue working/testing on this tomorrow. I ran into an Android issue and had to change the approach. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@Krishna2323 how is this looking |
…fic preview Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6fab9d8d3c
ℹ️ 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".
| <View style={[styles.pt4]}> | ||
| <ScrollView>{children}</ScrollView> | ||
| </View> |
There was a problem hiding this comment.
Bound native preview scroll area
On iOS/Android this preview uses <View style={[styles.pt4]}> with a child <ScrollView> that has no explicit height/flex constraint, while ReportActionsList now forces the backing InvertedFlatList to flex0 during shouldScrollToEndAfterLayout. For long expense details, this makes the preview expand with its content instead of becoming a bounded scroll region, so users cannot reliably scroll through the RHP content in that loading state.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The native preview is bounded by its parent View which has flex: 1 and the sibling InvertedFlatList collapsed to flex: 0 during loading. The wrapper View provides the layout frame and the ScrollView inside handles scrolling when content overflows. Tested on both iOS and Android — scrolling works correctly for long expense details during the loading phase.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@eVoloshchak 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] |
|
@eVoloshchak this will require a very thorough review from your side. I’ve done as much testing as I could, but this would need a thorough second pair of eyes since this could potentially cause regressions. |
|
🚧 @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! 🧪🧪
|
|
Scrolling looks good, Chrome, Xiaomi Redmi Note 10 / Android 12, App 9.3.32-3 PR: 83944 Ad-Hoc Screenrecorder-2026-03-07-17-00-45-896.mp4Screen.Recording.2026-03-07.at.11.53.43.mp4 |
|
The original issue is resolved (you can scroll while expense details are loading), but there is still one inconsistency: the scroll position gets reset when the loading is finished (native only, both iOS and Android) Screen.Recording.2026-03-09.at.10.03.52.mov |
|
@eVoloshchak I think that's expected and also not caused by this PR since we only added scroll functionality. |
It's not expected, web (and mWeb) doesn't have this bug
It might not be caused by this PR (no way to check as scrolling was not possible before), but I do believe we also need to resolve it for the issue to be resolved, otherwise the behavior will be inconsistent between native and web (and it's objectively bad UX when the list you've just scrolled scrolls back) |
|
@eVoloshchak The scroll position reset during the transition from the static preview to the InvertedFlatList is a pre-existing behavior — the Preserving scroll position across the transition would require mapping coordinates between a top-down ScrollView and an inverted FlatList, which adds significant complexity. Since the loading phase is typically brief (a few seconds), I'd suggest addressing that as a follow-up improvement (if needed) rather than blocking this PR. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-12.at.13.43.58.movAndroid: mWeb ChromeScreen.Recording.2026-03-12.at.13.42.20.moviOS: HybridAppScreen.Recording.2026-03-12.at.13.37.19.moviOS: mWeb SafariScreen.Recording.2026-03-12.at.13.31.22.movMacOS: Chrome / SafariScreen.Recording.2026-03-12.at.13.19.07.mov |
eVoloshchak
left a comment
There was a problem hiding this comment.
LGTM!
Agree with not blocking this PR, let's address the scroll reset issue in a follow-up PR
mountiny
left a comment
There was a problem hiding this comment.
The showSpacer boolean flag on StaticReportActionsPreview violates our composition-over-configuration pattern (CLEAN-REACT-PATTERNS-1). Its sole purpose is to conditionally render a spacer View inside the component — that's a layout decision owned by the parent, not an intrinsic capability of the preview wrapper.
The fix is to keep the spacer at the call site and let StaticReportActionsPreview focus purely on providing a scrollable preview container:
const renderTopReportActions = useCallback(() => {
const previewItems = sortedVisibleReportActions.slice(initialNumToRender ? -initialNumToRender : 0).reverse();
return (
<>
{!shouldShowReportRecipientLocalTime && !hideComposer && (
<View style={[styles.stickToBottom, styles.appBG, styles.zIndex10, styles.height4]} />
)}
<StaticReportActionsPreview>
{previewItems.map((action) => (
<View key={action.reportActionID}>
{renderItem({item: action, index: sortedVisibleReportActions.indexOf(action)} as ListRenderItemInfo<OnyxTypes.ReportAction>)}
</View>
))}
</StaticReportActionsPreview>
</>
);
}, [hideComposer, initialNumToRender, renderItem, shouldShowReportRecipientLocalTime, sortedVisibleReportActions]);Then remove the showSpacer prop from the component and its types entirely.
|
|
||
| return ( | ||
| <> | ||
| {showSpacer && <View style={[styles.stickToBottom, styles.appBG, styles.zIndex10, styles.height4]} />} |
There was a problem hiding this comment.
yeah this should be catched during AI review according to the /coding-standards skill.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@mountiny updated. |
mountiny
left a comment
There was a problem hiding this comment.
@Krishna2323 Thank you! @eVoloshchak can you please re-review and re-test?
src/pages/inbox/report/StaticReportActionsPreview/index.native.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
eVoloshchak
left a comment
There was a problem hiding this comment.
Re-tested, looks good!
|
🚧 @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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.39-0 🚀
|
|
Hi @Krishna2323 Web passed. Console option is no longer available in native. We need to check only Web, right? |
@izarutskaya Correct, but it can still be tested on native by opening an expense for the first time and scrolling immediately while the expense details are being loaded. |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.3.39-3 🚀
|

Explanation of Change
Fixed Issues
$ #81195
PROPOSAL: #81195 (comment)
Tests
Same as QA Steps
Verify that no errors appear in the JS console
Offline tests
QA Steps
Precondition: Maximize visible fields - Create an expense on a workspace that has categories, multiple tag levels, tax tracking, and attendee tracking all enabled. Fill in all fields, attach a receipt with long description, and add multiple tags
Testing area: Report Actions List — specifically the loading/transition phase when opening an expense report in the RHP.
Troubleshootpage > Clear cache and restartPR 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_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4