Skip to content

[CP Staging] Revert "Fix reveal navigation under RHP + re-land reveal workspace route under RHP before dismissing on workspace creation "#90982

Closed
mountiny wants to merge 1 commit into
mainfrom
revert-90044-korytko/improve-replace-rhp
Closed

[CP Staging] Revert "Fix reveal navigation under RHP + re-land reveal workspace route under RHP before dismissing on workspace creation "#90982
mountiny wants to merge 1 commit into
mainfrom
revert-90044-korytko/improve-replace-rhp

Conversation

@mountiny
Copy link
Copy Markdown
Contributor

@mountiny mountiny commented May 18, 2026

Reverts #90044

Fixed issues

$ #90880

…ute under RHP before dismissing on workspace creation "
@mountiny mountiny requested review from a team as code owners May 18, 2026 14:52
@melvin-bot melvin-bot Bot requested review from danieldoglas and joekaufmanexpensify and removed request for a team May 18, 2026 14:53
@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented May 18, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

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

@mountiny
Copy link
Copy Markdown
Contributor Author

Asking QA to confirm the testers cannot reproduce on the adhoc build

Copy link
Copy Markdown

@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: 1955751f32

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

const rehydrated = rehydrate(newState, configOptions);
return applyRevealPaddingOffset(state, rehydrated);
// @ts-expect-error newState may be partial, but getRehydratedState handles both partial and full states correctly.
return getRehydratedState(newState, configOptions);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve reveal history through modal dismissal

When Navigation.revealRouteBeforeDismissingModal() runs on web, it dispatches REPLACE_FULLSCREEN_UNDER_RHP and then DISMISS_MODAL; this branch freezes history only for the replace, but the following dismiss falls through here and rebuilds history from the shortened route stack. In the common [fullscreen, RHP] -> [target] reveal flow, useLinking observes a negative history delta and pops browser history instead of replacing the current RHP entry, so the browser Back stack skips or loses the previous fullscreen entry after submitting/navigating from an RHP.

Useful? React with 👍 / 👎.

Comment on lines +384 to 386
...r,
...(focusedTargetTab.params !== undefined ? {params: focusedTargetTab.params} : {}),
...(mergedNestedState !== undefined ? {state: mergedNestedState as typeof r.state} : {}),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Drop stale deep-link params before replacing tab state

For tab-target reveals, spreading r keeps any existing params.screen/params.params deep-link hints on the tab route when the new focused tab has no params. If the tab was previously hydrated from a deep link, React Navigation will process those stale params after mount and issue a nested navigate that can override the freshly spliced state, so revealing a workspace/search tab under an RHP can land back on the old nested screen instead of the requested route.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Copy Markdown
Contributor

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

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

👀 View the workflow run that generated this build 👀

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/CONST/index.ts 92.30% <ø> (ø)
.../routerExtensions/addRootHistoryRouterExtension.ts 100.00% <100.00%> (ø)
...ateRootStackNavigator/GetStateForActionHandlers.ts 24.59% <0.00%> (-5.95%) ⬇️
src/libs/Navigation/Navigation.ts 51.55% <0.00%> (ø)
src/libs/actions/App.ts 52.59% <0.00%> (+0.57%) ⬆️
... and 9 files with indirect coverage changes

@JakubKorytko
Copy link
Copy Markdown
Contributor

Reproduced on the above ad-hoc (post-revert).

repro.mp4

@joekaufmanexpensify
Copy link
Copy Markdown
Contributor

No product review needed

@joekaufmanexpensify joekaufmanexpensify removed their request for review May 18, 2026 18:41
@mountiny
Copy link
Copy Markdown
Contributor Author

This was not the offending PR in the end, the reproduction steps were inconsistent

@mountiny mountiny closed this May 19, 2026
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.

3 participants