You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Payment due] [$250] "Total" is not aligned correctly with "Out-of-pocket spend" and "Company spend" in SWRHP #79847
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: 9.3.4-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#77657 Email or phone of affected tester (no customers):sdiosnjoijsojdsjos@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.1 / Chrome App Component: Search
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create a reimbursable expense.
Create a non-reimbursable expense.
Open the expense report.
Expected Result:
"Total" will align correctly with "Out-of-pocket spend" and "Company spend".
Actual Result:
"Total" is not aligned correctly with "Out-of-pocket spend" and "Company spend" in SWRHP.
What alternative solutions did you explore? (Optional)
Since MoneyRequestReportTransactionList.tsx uses useResponsiveLayoutOnWideRHP we can pass shouldUseNarrowLayout from MoneyRequestReportTransactionList.tsx to MoneyRequestReportTotalSpend.tsx as a prop to keep the layout calculation consistent between the components.
changed the title [-]"Total" is not aligned correctly with "Out-of-pocket spend" and "Company spend" in SWRHP[/-][+][$250] "Total" is not aligned correctly with "Out-of-pocket spend" and "Company spend" in SWRHP[/+]on Jan 19, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-01-26 16:32:19 UTC.
Proposal
Restate the problem this issue is trying to solve.
When viewing an expense report in Super Wide RHP, the layout is wrong. The app applies narrow layout styles to Total, Out-of-pocket spend, and Company spend. This causes bad alignment in Super Wide RHP.
What is the root cause of that problem?
The earliest wrong assumption is that every RHP inside RIGHT_MODAL_NAVIGATOR must use a narrow layout. In src/hooks/useResponsiveLayout/index.ts, isInNarrowPaneModal is true for all RHPs, including Super Wide RHP. This makes shouldUseNarrowLayout true even when the RHP is wide. Because of this wrong assumption, wide RHPs are treated as narrow and get the wrong styles.
What changes do you think we should make in order to solve the problem?
Update layout usage in components that render spend and totals.
Do not change useResponsiveLayout.
Exclude Super Wide RHP from narrow layout logic at the component level.
Changes in src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsx:
// Add imports at top:import{useIsFocused,useRoute}from'@react-navigation/native';import{useContext,useMemo}from'react';import{WideRHPContext}from'@components/WideRHPContextProvider';// Inside component function, after line 47:constroute=useRoute();const{superWideRHPRouteKeys}=useContext(WideRHPContext);constisInSuperWideRHP=route.key ? superWideRHPRouteKeys.includes(route.key) : false;consteffectiveShouldUseNarrowLayout=useMemo(()=>shouldUseNarrowLayout&&!isInSuperWideRHP,[shouldUseNarrowLayout,isInSuperWideRHP],);// Replace shouldUseNarrowLayout with effectiveShouldUseNarrowLayout on:// Line 63:shouldUseNarrowLayout&&[styles.justifyContentBetween,styles.w100]// Line 65:shouldUseNarrowLayout ? styles.mnw64p : styles.mnw100p
Changes in src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx:
// Add import at top:import{useFocusEffect,useRoute}from'@react-navigation/native';// Inside component function, after line 170:constroute=useRoute();const{superWideRHPRouteKeys}=useContext(WideRHPContext);constisInSuperWideRHP=route.key ? superWideRHPRouteKeys.includes(route.key) : false;consteffectiveShouldUseNarrowLayout=useMemo(()=>shouldUseNarrowLayout&&!isInSuperWideRHP,[shouldUseNarrowLayout,isInSuperWideRHP],);// Replace shouldUseNarrowLayout with effectiveShouldUseNarrowLayout on:// Line 596:shouldUseNarrowLayout&&styles.w100// Line 611:shouldUseNarrowLayout&&[styles.justifyContentBetween,styles.w100]// Line 622:shouldUseNarrowLayout ? styles.mnw64p : styles.mnw100p// Do NOT change lines 460 and 576
What alternative solutions did you explore? (Optional)
Updating useResponsiveLayout was considered. It was not chosen because it affects all RHPs and increases risk. This fix limits the change only to components that control the broken layout.
Please re-state the problem that we are trying to solve in this issue.
"Total" is not aligned correctly
What is the root cause of that problem?
We use shouldUseNarrowLayout to determine when to apply mobile-style layouts, either on mobile devices or when the view is rendered in the RHP. In this case, the page is displayed in the RHP, so the mobile layout styles are applied.
What changes do you think we should make in order to solve the problem?
To resolve this issue, we should update the condition so that mobile-style layouts are applied only on mobile devices, by checking isSmallScreenWidth instead.
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-][$250] "Total" is not aligned correctly with "Out-of-pocket spend" and "Company spend" in SWRHP[/-][+][Payment due] [$250] "Total" is not aligned correctly with "Out-of-pocket spend" and "Company spend" in SWRHP[/+]on Feb 23, 2026
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Jan 18, 2026
Triggered auto assignment to @garrettmknight (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.etCoderDysto commentedon Jan 18, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Total" is not aligned correctly with "Out-of-pocket spend" and "Company spend" in SWRHP
What is the root cause of that problem?
We are using
useResponsiveLayoutto getshouldUseNarrowLayoutinstead ofuseResponsiveLayoutOnWideRHPhereApp/src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsx
Line 47 in 75c85ae
Then
styles.mnw64pwill be applied on amount, andjustifyContentBetweenwill be applied on the view container.App/src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsx
Lines 63 to 65 in 75c85ae
useResponsiveLayoutOnWideRHPchecks if the report is opened in wide RHP butuseResponsiveLayoutdoesn't have the same logic.App/src/hooks/useResponsiveLayoutOnWideRHP/index.ts
Lines 21 to 25 in 75c85ae
What changes do you think we should make in order to solve the problem?
We should use
useResponsiveLayoutOnWideRHPsince it validates if the layout is opened in wide RHP or narrow RHPApp/src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsx
Line 47 in 75c85ae
What alternative solutions did you explore? (Optional)
Since
MoneyRequestReportTransactionList.tsxusesuseResponsiveLayoutOnWideRHPwe can passshouldUseNarrowLayoutfromMoneyRequestReportTransactionList.tsxtoMoneyRequestReportTotalSpend.tsxas a prop to keep the layout calculation consistent between the components.[-]"Total" is not aligned correctly with "Out-of-pocket spend" and "Company spend" in SWRHP[/-][+][$250] "Total" is not aligned correctly with "Out-of-pocket spend" and "Company spend" in SWRHP[/+]melvin-bot commentedon Jan 19, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022013251097766453967
melvin-bot commentedon Jan 19, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra (
External)yatin-italy commentedon Jan 19, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-01-26 16:32:19 UTC.
Proposal
Restate the problem this issue is trying to solve.
When viewing an expense report in Super Wide RHP, the layout is wrong. The app applies narrow layout styles to Total, Out-of-pocket spend, and Company spend. This causes bad alignment in Super Wide RHP.
What is the root cause of that problem?
The earliest wrong assumption is that every RHP inside RIGHT_MODAL_NAVIGATOR must use a narrow layout. In
src/hooks/useResponsiveLayout/index.ts,isInNarrowPaneModalis true for all RHPs, including Super Wide RHP. This makesshouldUseNarrowLayouttrue even when the RHP is wide. Because of this wrong assumption, wide RHPs are treated as narrow and get the wrong styles.What changes do you think we should make in order to solve the problem?
useResponsiveLayout.Files to modify:
src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsxsrc/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsxChanges in
src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsx:Changes in
src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx:What alternative solutions did you explore? (Optional)
Updating
useResponsiveLayoutwas considered. It was not chosen because it affects all RHPs and increases risk. This fix limits the change only to components that control the broken layout.huult commentedon Jan 20, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Total" is not aligned correctly
What is the root cause of that problem?
We use
shouldUseNarrowLayoutto determine when to apply mobile-style layouts, either on mobile devices or when the view is rendered in the RHP. In this case, the page is displayed in the RHP, so the mobile layout styles are applied.App/src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsx
Line 47 in 7406d2e
App/src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsx
Line 63 in 7406d2e
App/src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsx
Line 65 in 7406d2e
What changes do you think we should make in order to solve the problem?
To resolve this issue, we should update the condition so that mobile-style layouts are applied only on mobile devices, by checking
isSmallScreenWidthinstead.App/src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsx
Line 47 in 7406d2e
App/src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsx
Line 63 in 7406d2e
App/src/components/MoneyRequestReportView/MoneyRequestReportTotalSpend.tsx
Line 65 in 7406d2e
update to:
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
melvin-bot commentedon Jan 26, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
14 remaining items
etCoderDysto commentedon Feb 2, 2026
@shubham1206agra PR is ready for review
etCoderDysto commentedon Feb 20, 2026
Hi @garrettmknight , this is ready for payment - the pr was deployed to prod 2 weeks ago.
[-][$250] "Total" is not aligned correctly with "Out-of-pocket spend" and "Company spend" in SWRHP[/-][+][Payment due] [$250] "Total" is not aligned correctly with "Out-of-pocket spend" and "Company spend" in SWRHP[/+]garrettmknight commentedon Feb 23, 2026
Don't think we need a checklist here.
garrettmknight commentedon Feb 23, 2026
Payment Summary
trjExpensify commentedon Apr 2, 2026
Payment summary here is correct.
garrettmknight commentedon Apr 2, 2026
$250 approved for @shubham1206agra