Repository navigation
Fix report table header is larger than rest of the table - #104066
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@dmkt9 test steps don't mention merging a report. Did you merge that report before you recorded in the web video? |
@garrettmknight We don't need those steps because this bug isn't caused by our PR. |
Because the bug is also reproducible in non-merge flow. But yes let's add merge report as Case 2. |
| ListFooterComponentStyle={shouldShowActionsLoadingSkeletonInFooter ? [styles.flexGrow1, styles.flexShrink1, styles.flexBasis0, styles.mnh0] : undefined} | ||
| ListEmptyComponent={shouldShowActionsLoadingSkeleton ? <ReportActionsListLoadingSkeleton /> : undefined} | ||
| ListFooterComponent={ | ||
| <> | ||
| {shouldInlineTransactions && shouldShowActionsLoadingSkeleton && <ReportActionsListLoadingSkeleton />} | ||
| {shouldShowActionsLoadingSkeletonInFooter && ( | ||
| <ReportActionsListLoadingSkeleton style={[styles.flexGrow1, styles.flexShrink1, styles.flexBasis0, styles.mnh0, styles.overflowHidden]} /> | ||
| )} |
There was a problem hiding this comment.
Bug: The comment loading skeleton doesn't appear when the expenses fill the screen
- Use a report with enough expenses that the table is taller than the screen (about 12 on desktop).
- Clear cache and restart so the report's comments have not loaded yet in this report.
- Go to Spend > Reports and open that report.
- While the comments are still loading, scroll to the bottom of the report.
Expected: the comment loading skeleton shows below the totals, as it does on main.
Actual: the report ends at the totals with no loading indicator.
bug.mov
|
I am not sure the fix is in the right direction. this branch: Screen.Recording.2026-10-15.at.2.40.01.PM.movmain: Screen.Recording.2026-10-15.at.2.39.05.PM.movcc: @MelvinBot |
|
Otherwise, just set diff --git a/src/components/MoneyRequestReportView/MoneyRequestReportUnifiedList.tsx b/src/components/MoneyRequestReportView/MoneyRequestReportUnifiedList.tsx
index a1c1a466fc5c..bdfaf052e8bb 100644
--- a/src/components/MoneyRequestReportView/MoneyRequestReportUnifiedList.tsx
+++ b/src/components/MoneyRequestReportView/MoneyRequestReportUnifiedList.tsx
@@ -1,6 +1,7 @@
import FlashList from '@components/FlashList';
import type FlatListRefType from '@components/FlashList/types';
+import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import useScrollToEditingReportAction from '@pages/inbox/report/useScrollToEditingReportAction';
@@ -154,6 +155,8 @@ function MoneyRequestReportUnifiedList({
onLastItemIndexChange,
listFooterComponent,
}: MoneyRequestReportUnifiedListProps) {
+ const styles = useThemeStyles();
+
// When the table is wider than the viewport it can't share the horizontally-scrolled container with the chat (chat
// would drift sideways / jump on web). Instead the FlashList keeps ONLY the report actions virtualized, and the table is
// rendered as the list header via ExternalScrollFlashListTable — a nested FlashList in its own single native
@@ -350,6 +353,8 @@ function MoneyRequestReportUnifiedList({
ref={listRef}
accessibilityLabel={accessibilityLabel}
testID="money-request-report-actions-list"
+ // Keeps the row width fixed when the scrollbar toggles, so FlashList's scrollbar lock never narrows the rows
+ overrideProps={{style: styles.moneyRequestReportListScrollView}}
data={data}
extraData={reportActionsExtraData}
renderItem={dispatchRenderItem}
diff --git a/src/styles/index.ts b/src/styles/index.ts
index 447f31c0a549..6f1180de2e00 100644
--- a/src/styles/index.ts
+++ b/src/styles/index.ts
@@ -7737,6 +7737,10 @@ const plainStyles = (theme: ThemeColors) =>
...scrollbarGutterStable,
},
+ moneyRequestReportListScrollView: {
+ ...scrollbarGutterStable,
+ },
+
insightsPageControlsContainer: {
...scrollbarGutterStable,
overflow: 'hidden',test.mov |
|
I agree. This PR treats the symptom. The page should stay scrollable while the skeleton shows. Root cause: FlashList patch 012 locks the row width. The header sits in Recommended fix:
With the gutter in place, the measured width never changes, so the lock never kicks in. The header and rows then always have the same width. Pass the style through Trade-off: Windows Chrome always keeps about 15px free on the right, even on short reports. Rows and header still line up. Getting true full width would mean changing patch 012, which is shared by every list. That risks bringing back the "Maximum update depth exceeded" crash it fixed. Fix sketch and evidenceSketch
Why the rows lock
Options I ruled out
Not verified: I didn't capture the exact flip sequence at runtime. To confirm it, log Next Steps: |
I tested this approach before. Since it always leaves some padding on the right, even when the scrollbar disappears, I'm not sure whether it would look good from a product perspective. |
|
@MelvinBot Is |
|
It's an existing pattern. No other file in |
|
|
|
@situchan Remove the previous fix and add a mechanism to reset the lock when the footer layout changes. chrome.mp4 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariBefore: before-fix.movAfter: after-fix.mov |
|
@codex review |
|
I found no blocking issues. The fix matches the root cause, and I have one optional suggestion. The fix works in two steps. When the footer's height changes at the same width, it clears the patch 012 width lock. Then the new Suggestion (optional): Only reset the lock when the footer gets shorter. Right now, any vertical web FlashList footer that changes height clears the lock. That includes "loading more" spinners. Clearing the lock also resets Nit: The |
|
I didn't find a confirmed regression. I reviewed the code at
Gap (not a regression): Search and the chat list render their footer only some of the time ( Native and horizontal lists are unchanged. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37179ff524
ℹ️ 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".
garrettmknight
left a comment
There was a problem hiding this comment.
Looks good from a product perspective
|
🚧 Gonals has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.5.28-4 🚀
|
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.5.30-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.5.30-0 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
FlashList patch 012 prevents scrollbar oscillation crashes by locking cells to the narrower viewport width. When the loading skeleton finishes its exit animation, the scrollbar can disappear while cells retain that width, leaving the report table header wider than the rows.
Updated FlashList to release the lock when the footer’s height changes independently of its width, then request a fresh layout measurement. The inner measuring view also detects scrollbar width changes that do not resize the outer viewport.
The fix preserves the existing oscillation guard, avoids resets caused by recreated props or JSX, and only requests an additional layout pass when an active lock is released. The added layout handlers apply only to vertical web lists.
Fixed Issues
$ #103719
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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
chrome.mp4