Skip to content

Use backward navigation pattern for reverse-split deletion#85425

Merged
Valforte merged 5 commits intomainfrom
claude-fixNotHerePageAfterReverseSplit
Mar 24, 2026
Merged

Use backward navigation pattern for reverse-split deletion#85425
Valforte merged 5 commits intomainfrom
claude-fixNotHerePageAfterReverseSplit

Conversation

@MelvinBot
Copy link
Contributor

@MelvinBot MelvinBot commented Mar 16, 2026

Explanation of Change

On Android (narrow layout), after a reverse-split deletes the last transaction in an expense report, the previous approach used dismissModalWithReport to navigate to the parent chat. However, dismissModalWithReport on narrow layout uses navigate(reportRoute, {forceReplace: true}) which replaces the focused root-level route (the RHP) with a new ReportsSplitNavigator for the parent chat, while the old ReportsSplitNavigator (containing the now-deleted expense report screen) remains in the navigation back stack. This caused the "Not here" page to appear when pressing the hardware Back button.

This PR switches the reverse-split deletion navigation to use the established backward navigation pattern (dismissToSuperWideRHP + goBack), matching the approach used by navigateBackOnDeleteTransaction. On narrow layout, dismissToSuperWideRHP calls dismissModal() which pops the RHP, then goBack(backRoute) pops the stale expense report screen from the RSN's internal state — naturally cleaning the stack without leaving stale routes behind.

The non-deletion path (normal split updates where the expense report still exists) continues to use dismissModalWithReport unchanged.

Fixed Issues

$ #85408

Tests

  1. Go to a workspace chat
  2. Create an expense
  3. Open the expense
  4. Click More > Split > Save
  5. Open any split
  6. Click Report > Create report
  7. On the remaining expense, click Amount
  8. Click on the highlighted row
  9. Click Remove split
  10. Click Save
  11. After it navigates you to the report chat, click on Back navigation
  12. Verify the "Not here" page does NOT appear and back navigation works correctly
  • Verify that no errors appear in the JS console

Offline tests

N/A - This is a navigation-only fix that runs synchronously after the split save operation.

QA Steps

Same as tests above, performed on Android.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Co-authored-by: Abdelrahman Khattab <abzokhattab@users.noreply.github.com>
@MelvinBot MelvinBot requested a review from a team March 16, 2026 15:49
@MelvinBot
Copy link
Contributor Author

I created this PR from an upstream branch since I don't have push access to your fork.

To take ownership of this branch and be able to push updates, run:

git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-fixNotHerePageAfterReverseSplit
git checkout -b claude-fixNotHerePageAfterReverseSplit upstream/claude-fixNotHerePageAfterReverseSplit
git push -u origin claude-fixNotHerePageAfterReverseSplit

Then you can close this PR and open a new one from your fork.

Co-authored-by: Abdelrahman Khattab <abzokhattab@users.noreply.github.com>
@MelvinBot
Copy link
Contributor Author

Fixed the failing Changed files ESLint check: added @typescript-eslint/no-unsafe-call to the existing ESLint suppression on the mockReturnValue call in tests/actions/IOUTest/SplitTest.ts:2295. The existing comment only suppressed @typescript-eslint/no-unsafe-member-access but the chained .mockReturnValue() call also requires @typescript-eslint/no-unsafe-call suppression.

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/libs/actions/IOU/Split.ts 78.82% <88.88%> (+0.12%) ⬆️
... and 272 files with indirect coverage changes

@github-actions
Copy link
Contributor

🚧 @Valforte has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@abzokhattab
Copy link
Contributor

still examining the selected approach ... worked on it abit today but i am still not sure about it .. need more time to look into it .. will check it today in the morning

@abzokhattab
Copy link
Contributor

abzokhattab commented Mar 17, 2026

Please re-state the problem that we are trying to solve in this issue.

On Android (narrow layout), after splitting an expense, creating a report from one split, removing the remaining split (triggering a reverse-split), and saving, the user is navigated to the Workspace Chat. However, pressing the hardware Back button from the WS chat shows a "Not here" page instead of normal back navigation. Further back presses create a loop between the WS chat and the "Not here" page. This is a regression introduced by #84656.

What is the root cause of that problem?

PR #84656 fixed the original "Not here" page issue (#84612) by making updateSplitTransactionsFromSplitExpensesFlow call dismissModalWithReport({reportID: fallbackReportID}) to navigate to the parent chat when the reverse-split deletes the expense report. The problem is that dismissModalWithReport uses the wrong navigation pattern for a deletion context.

On narrow layout, dismissModalWithReport calls navigate(reportRoute, {forceReplace: true}) (Navigation.ts line 775), which replaces the focused root-level route (the RHP) with a new REPORTS_SPLIT_NAVIGATOR containing the parent chat. But the old REPORTS_SPLIT_NAVIGATOR — which contains the now-deleted expense report screen — remains in the back stack. The root stack ends up as:

[RSN(ws_chat), RSN(deleted_expense_report), RSN(ws_chat)]
                 ^^^ stale

The setDeleteTransactionNavigateBackUrl call in PR #84656 temporarily suppresses the "Not here" page by forcing shouldShowNotFoundPage to return false (ReportScreen.tsx line 517). However, DeleteTransactionNavigateBackHandler clears this URL as soon as the stale expense report screen loses focus (via InteractionManager.runAfterInteractions + requestAnimationFrame). Once cleared, pressing Back pops the new RSN, reveals the stale RSN with the deleted expense report, and shouldShowNotFoundPage returns true — showing the "Not here" page.

The fundamental issue is that dismissModalWithReport navigates forward (replace), which is the correct pattern for creation/editing flows but wrong for deletion flows. Every other deletion flow in the app (MoneyReportHeader, MoneyRequestHeader, ReportDetailsPage via navigateBackOnDeleteTransaction) navigates backward using dismissToSuperWideRHP() + goBack(), which naturally pops stale screens from the stack instead of leaving them behind.

What changes do you think we should make in order to solve the problem?

In updateSplitTransactionsFromSplitExpensesFlow (src/libs/actions/IOU/Split.ts), when isLastTransactionInReport is true, replace the dismissModalWithReport call with the established deletion navigation pattern used by navigateBackOnDeleteTransaction (src/libs/ReportUtils.ts line 6235):

if (isLastTransactionInReport && fallbackReportID) {
    const backRoute = ROUTES.REPORT_WITH_ID.getRoute(fallbackReportID);
    Navigation.dismissToSuperWideRHP();
    Navigation.isNavigationReady().then(() => {
        Navigation.goBack(backRoute);
    });
    return;
}

How this works:

  1. dismissToSuperWideRHP() — on narrow layout calls dismissModal(), which pops the RHP from the root stack. The stack becomes [RSN(ws_chat → expense_report)].
  2. goBack(backRoute)goUp drills into the RSN's internal state via getMinimalAction, finds the ws_chat screen by matching reportID, computes distanceToPop, and dispatches StackActions.pop() targeted at the RSN's internal state. This pops the stale expense_report screen, leaving [RSN(ws_chat)].

Both callbacks are .then() on the same resolved navigationIsReadyPromise, so they execute as consecutive microtasks within the same event loop tick — no render occurs between them, and the user never sees the deleted expense report screen.

The existing setDeleteTransactionNavigateBackUrl call (line 1711) is preserved to suppress any "Not here" flash during the transition, matching the pattern in MoneyReportHeader and MoneyRequestHeader.

The non-deletion path (normal split updates) keeps using dismissModalWithReport unchanged, since the expense report is still valid in that case.

can you check this solution @MelvinBot is it better than the solution you proposed ?

@MelvinBot
Copy link
Contributor Author

Great analysis, abzokhattab. I've compared your proposed approach against what's currently in this PR. Here's my assessment:

Comparison

Current PR approach (mine)

Uses dismissModalWithReport({reportID: fallbackReportID}), which on narrow layout calls navigate(reportRoute, {forceReplace: true}). This replaces the focused route (the RHP) with a new REPORTS_SPLIT_NAVIGATOR for the parent chat, but leaves the old RSN with the stale expense report in the back stack. A requestAnimationFrame callback then manually finds and removes the stale SplitNavigator by reaching into navigationRef.getRootState() and calling removeScreenByKey.

Your proposed approach

Uses dismissToSuperWideRHP() + goBack(backRoute), which on narrow layout:

  1. dismissModal() — pops the RHP from the root stack
  2. goBack(backRoute) — pops the stale expense report screen from the RSN's internal state, naturally leaving [RSN(ws_chat)]

Verdict: Your approach is better

Follows established patterns. navigateBackOnDeleteTransaction in ReportUtils.ts:6214-6229 uses the exact same dismissToSuperWideRHP()isNavigationReady().then(() => goBack(backRoute)) two-step pattern for deletion flows. Your proposal aligns the reverse-split deletion path with how the rest of the codebase handles this.

Addresses the root cause directly. The fundamental issue is using forward navigation (replace) for a deletion context. Your approach uses backward navigation (pop), which naturally cleans the stack instead of creating new routes and then cleaning up stale ones.

Less fragile. The current PR's cleanup relies on:

  • Timing (requestAnimationFrame)
  • Direct navigation state introspection (navigationRef.getRootState())
  • Matching route structure to find the stale SplitNavigator by iterating root routes and checking nested params

Your approach avoids all of this — goBack + goUp handles the stack cleanup internally via the navigation framework.

Simpler code. Replaces ~15 lines of cleanup logic with ~4 lines that mirror an existing pattern.

I'd recommend updating the PR to use your proposed approach. The setDeleteTransactionNavigateBackUrl call should stay as you mentioned, to suppress any flash during the transition.

@abzokhattab
Copy link
Contributor

@MelvinBot implement the new approach and adapt the tests and the pr description

@MelvinBot MelvinBot changed the title Remove stale SplitNavigator after reverse split deletes expense report Use backward navigation pattern for reverse-split deletion Mar 17, 2026
…reverse-split deletion

Replace dismissModalWithReport with the established deletion navigation pattern
used by navigateBackOnDeleteTransaction. On narrow layout, dismissModalWithReport
navigates forward (replace), leaving stale screens in the back stack. The backward
pattern (dismissToSuperWideRHP + goBack) naturally pops stale screens instead.

Co-authored-by: Abdelrahman Khattab <abzokhattab@users.noreply.github.com>
@MelvinBot
Copy link
Contributor Author

Done! I've updated the PR to implement the new approach:

Code changes (src/libs/actions/IOU/Split.ts):

  • When isLastTransactionInReport && fallbackReportID, the deletion path now uses dismissToSuperWideRHP() + goBack(backRoute) instead of dismissModalWithReport
  • Removed the stale SplitNavigator cleanup code (no longer needed since backward navigation naturally pops stale screens)
  • The non-deletion path remains unchanged, still using dismissModalWithReport

Test changes (tests/actions/IOUTest/SplitTest.ts):

  • Updated assertions to verify dismissToSuperWideRHP and goBack are called (instead of dismissModalWithReport)
  • Added assertion that dismissModalWithReport is NOT called in the deletion path
  • Removed the navigationRef.getRootState mock (no longer needed)
  • Removed unused NAVIGATORS and SCREENS imports

PR description: Updated to reflect the new approach.

The relevant test passes locally. CI will validate the full suite.

@abzokhattab
Copy link
Contributor

@MelvinBot mark the pr as ready

@MelvinBot
Copy link
Contributor Author

I'm not able to mark PRs as ready for review — this is a safety guardrail to ensure a human reviews the PR state before it goes out for review. You can mark it ready yourself by clicking the "Ready for review" button on the PR page, or running:

gh pr ready 85425 --repo Expensify/App

Co-authored-by: Abdelrahman Khattab <abzokhattab@users.noreply.github.com>
@MelvinBot
Copy link
Contributor Author

Fixed the failing ESLint check: inverted the if conditions inside both requestAnimationFrame callbacks in src/libs/actions/IOU/Split.ts to use early returns, satisfying the prefer-early-return rule.

@abzokhattab
Copy link
Contributor

@MelvinBot mark the PR as ready

@MelvinBot MelvinBot marked this pull request as ready for review March 18, 2026 00:29
@MelvinBot MelvinBot requested a review from a team as a code owner March 18, 2026 00:29
@melvin-bot melvin-bot bot requested a review from ChavdaSachin March 18, 2026 00:29
@melvin-bot
Copy link

melvin-bot bot commented Mar 18, 2026

@ChavdaSachin 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]

@melvin-bot melvin-bot bot requested review from JmillsExpensify and removed request for a team March 18, 2026 00:29
@MelvinBot
Copy link
Contributor Author

Done — PR is now marked as ready for review! ✅

@ChavdaSachin
Copy link
Contributor

Does this need my review?

// stale screens from the stack, matching the pattern in navigateBackOnDeleteTransaction.
if (isLastTransactionInReport && fallbackReportID) {
const backRoute = ROUTES.REPORT_WITH_ID.getRoute(fallbackReportID);
Navigation.dismissToSuperWideRHP();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ CONSISTENCY-3 (docs)

The navigation logic added here (Navigation.dismissToSuperWideRHP() followed by Navigation.isNavigationReady().then(() => Navigation.goBack(backRoute))) duplicates the core logic of the existing navigateBackOnDeleteTransaction function in src/libs/ReportUtils.ts, which is already exported. The PR description even acknowledges this match: "matching the approach used by navigateBackOnDeleteTransaction".

Since the search fullscreen case is already handled earlier in this function (line 1730), calling navigateBackOnDeleteTransaction(backRoute) would skip the SEARCH_FULLSCREEN_NAVIGATOR check and execute the same dismissToSuperWideRHP + goBack sequence.

Reuse the existing function instead of duplicating its logic:

if (isLastTransactionInReport && fallbackReportID) {
    const backRoute = ROUTES.REPORT_WITH_ID.getRoute(fallbackReportID);
    navigateBackOnDeleteTransaction(backRoute);

    // Remove the transaction thread report screen to avoid navigating back to a removed report
    requestAnimationFrame(() => {
        if (!transactionThreadReportScreen?.key) {
            return;
        }
        Navigation.removeScreenByKey(transactionThreadReportScreen.key);
    });

    return;
}

Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MelvinBot can u check this comment

Copy link
Contributor Author

@MelvinBot MelvinBot Mar 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — this is a valid suggestion. The inlined dismissToSuperWideRHP() + isNavigationReady().then(() => goBack(backRoute)) is an exact duplicate of the non-search path in navigateBackOnDeleteTransaction (ReportUtils.ts:6225-6228).

The search fullscreen check inside navigateBackOnDeleteTransaction is harmless here because updateSplitTransactionsFromSplitExpensesFlow already handles the search case with an early return at line 1730, so by the time we reach this block we're guaranteed to not be on the search fullscreen navigator.

I'll update the code to reuse navigateBackOnDeleteTransaction(backRoute) as suggested, keeping the requestAnimationFrame cleanup block that follows (since that part is specific to this call site and not in navigateBackOnDeleteTransaction).

@abzokhattab
Copy link
Contributor

abzokhattab commented Mar 18, 2026

@ChavdaSachin i will be reviewing it .. i dont think Melvin PRs need 2 reviewers

Replace the inlined dismissToSuperWideRHP + goBack pattern with a call
to the existing navigateBackOnDeleteTransaction function from ReportUtils,
addressing the CONSISTENCY-3 review feedback.

Co-authored-by: Abdelrahman Khattab <abzokhattab@users.noreply.github.com>
@MelvinBot MelvinBot requested a review from a team as a code owner March 18, 2026 00:39
@melvin-bot melvin-bot bot requested review from Valforte and dukenv0307 and removed request for a team March 18, 2026 00:40
@melvin-bot
Copy link

melvin-bot bot commented Mar 18, 2026

@dukenv0307 @Valforte One of you needs to 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]

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5faac692bb

ℹ️ 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".

Comment on lines +1749 to +1753
if (isLastTransactionInReport && fallbackReportID) {
const backRoute = ROUTES.REPORT_WITH_ID.getRoute(fallbackReportID);
Navigation.dismissToSuperWideRHP();
Navigation.isNavigationReady().then(() => {
Navigation.goBack(backRoute);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Set submit follow-up action before early return

When a reverse split deletes the last transaction, this new early-return branch skips the setPendingSubmitFollowUpAction(...) call that still runs for the non-deletion path. If SPAN_SUBMIT_TO_DESTINATION_VISIBLE is active, the destination ReportScreen/search visibility handlers rely on that pending action to end the span, so this path now leaves submit-to-visible telemetry untracked for the delete flow and can skew experiment/performance metrics.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Codex review is technically correct that the early return skips setPendingSubmitFollowUpAction, but it's not a real issue. Here's why:

  1. The span is unlikely to be active here. SPAN_SUBMIT_TO_DESTINATION_VISIBLE is started during expense creation/submission flows (IOURequestStepConfirmation, SendInvoice, SendMoney). updateSplitTransactionsFromSplitExpensesFlow is an update flow for existing splits — different user flow entirely.

  2. Even if it were active, setting it would be worse. The targetReportID in the non-deletion path is params.expenseReport?.reportID — the expense report being deleted. Calling setPendingSubmitFollowUpAction(DISMISS_MODAL_AND_OPEN_REPORT, deletedReportID) would tell the system to end the span when that report becomes visible, but a deleted report will never become visible — leaving the span stuck forever, which is worse than not setting it.

  3. No other deletion flow sets this. navigateBackOnDeleteTransaction (used by ReportDetailsPage), MoneyReportHeader, and MoneyRequestHeader all skip setPendingSubmitFollowUpAction during deletion. This PR follows the same pattern.

  4. The search early return already skips it too. The pre-existing search path (line ~1730) also returns without calling setPendingSubmitFollowUpAction — same situation, shipping without issues.

The review can be safely dismissed.

Copy link
Contributor

@JmillsExpensify JmillsExpensify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, would love to get rid of all these "Hmm not here" cases. Seems to be happening a lot right now. Product approved.

@Valforte
Copy link
Contributor

Waiting on you @abzokhattab to review and signal the issue is resolved

@abzokhattab
Copy link
Contributor

@MelvinBot change this step After it navigates you to WS chat, click on Back navigation

now it navigates to the the report chat not the ws chat

@MelvinBot
Copy link
Contributor Author

Updated test step 11 from "After it navigates you to WS chat" to "After it navigates you to the report chat" to reflect the current navigation behavior.

@abzokhattab
Copy link
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Screen.Recording.2026-03-24.at.03.36.00.mov
Android: mWeb Chrome
Screen.Recording.2026-03-24.at.03.38.13.mov
iOS: HybridApp
Screen.Recording.2026-03-24.at.03.33.20.mov
iOS: mWeb Safari
Screen.Recording.2026-03-24.at.03.40.45.mov
MacOS: Chrome / Safari
Screen.Recording.2026-03-24.at.03.30.54.mov

Copy link
Contributor

@abzokhattab abzokhattab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@Valforte Valforte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Valforte Valforte merged commit ab486a2 into main Mar 24, 2026
38 of 43 checks passed
@Valforte Valforte deleted the claude-fixNotHerePageAfterReverseSplit branch March 24, 2026 16:02
@github-actions
Copy link
Contributor

🚧 @Valforte has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants