Skip to content

[CP Staging] Revert "Fix opening an expense report from Reports page shows the same report when open Inbox"#79331

Merged
mountiny merged 1 commit intomainfrom
revert-67437-fix/67122-open-existing-report
Jan 12, 2026
Merged

[CP Staging] Revert "Fix opening an expense report from Reports page shows the same report when open Inbox"#79331
mountiny merged 1 commit intomainfrom
revert-67437-fix/67122-open-existing-report

Conversation

@mountiny
Copy link
Contributor

Reverts #67437

Fixed issues

$ #79249
$ #79315

@mountiny mountiny self-assigned this Jan 12, 2026
@mountiny mountiny requested review from a team as code owners January 12, 2026 09:55
@melvin-bot melvin-bot bot requested review from Pujan92 and trjExpensify and removed request for a team January 12, 2026 09:56
@melvin-bot
Copy link

melvin-bot bot commented Jan 12, 2026

@Pujan92 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 removed the request for review from a team January 12, 2026 09:56
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
Built from App PR #79331.

Android 🤖 iOS 🍎
⏩ SKIPPED ⏩ ⏩ SKIPPED ⏩
The build for Android was skipped The build for iOS was skipped
Web 🕸️
https://79331.pr-testing.expensify.com
Web

👀 View the workflow run that generated this build 👀

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

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

Files with missing lines Coverage Δ
...c/components/Navigation/NavigationTabBar/index.tsx 50.00% <0.00%> (+4.01%) ⬆️
... and 8 files with indirect coverage changes

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: b1fef686ba

ℹ️ 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 161 to 164
name: CONST.TELEMETRY.SPAN_NAVIGATE_TO_INBOX_TAB,
op: CONST.TELEMETRY.SPAN_NAVIGATE_TO_INBOX_TAB,
});

if (shouldUseNarrowLayout) {
Navigation.navigate(ROUTES.HOME);
return;
}

const lastReportRoute = getLastRoute(NAVIGATORS.REPORTS_SPLIT_NAVIGATOR, SCREENS.REPORT);
if (lastReportRoute) {
const {reportID, reportActionID, referrer, backTo} = lastReportRoute.params as ReportsSplitNavigatorParamList[typeof SCREENS.REPORT];
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(reportID, reportActionID, referrer, backTo));
return;
}

Navigation.navigate(ROUTES.HOME);

Choose a reason for hiding this comment

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

P2 Badge Preserve last inbox report when switching to Inbox

Always navigating to ROUTES.HOME here drops the preserved ReportsSplitNavigator state and rebuilds the split with only the HOME route; on wide layout, SplitRouter fills the central pane with the default SCREENS.REPORT, which uses ReportUtils.findLastAccessedReport for initialReportID (ReportsSplitNavigator.tsx lines 36–51). If the user just opened a report from the Search tab, that report becomes the last accessed, so switching to Inbox shows the same report again instead of the last Inbox report/list—reintroducing the “Inbox shows the report opened from Reports” regression.

Useful? React with 👍 / 👎.

@mountiny
Copy link
Contributor Author

@melvin-bot melvin-bot bot requested a review from grgia January 12, 2026 10:29
@melvin-bot
Copy link

melvin-bot bot commented Jan 12, 2026

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

@mountiny mountiny merged commit 3be066b into main Jan 12, 2026
33 of 37 checks passed
@mountiny mountiny deleted the revert-67437-fix/67122-open-existing-report branch January 12, 2026 11:35
@melvin-bot melvin-bot bot added the Emergency label Jan 12, 2026
@melvin-bot
Copy link

melvin-bot bot commented Jan 12, 2026

@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@mountiny
Copy link
Contributor Author

Straight revert

OSBotify pushed a commit that referenced this pull request Jan 12, 2026
…existing-report

[CP Staging] Revert "Fix opening an expense report from Reports page shows the same report when open Inbox"

(cherry picked from commit 3be066b)

(cherry-picked to staging by mountiny)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Jan 12, 2026
@OSBotify
Copy link
Contributor

🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.2.99-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/francoisl in version: 9.2.99-8 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify
Copy link
Contributor

🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.3.0-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

bernhardoj added a commit to bernhardoj/Expensify that referenced this pull request Jan 13, 2026
…7-fix/67122-open-existing-report"

This reverts commit 3be066b, reversing
changes made to d78636c.
@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/francoisl in version: 9.3.0-8 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify
Copy link
Contributor

🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.3.17-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@IuliiaHerets
Copy link

Hi @mountiny. Can we check it off?

@mountiny
Copy link
Contributor Author

Yes

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/lakchote in version: 9.3.17-9 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 failure ❌

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

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants