Skip to content

fix: keep the side panel closed after onboarding for every intent - #104916

Merged
neil-marcellini merged 3 commits into
Expensify:mainfrom
laveshfonix:fix/104027-close-side-panel-all-intents
Oct 30, 2026
Merged

neil-marcellini merged 3 commits into
Expensify:mainfrom
laveshfonix:fix/104027-close-side-panel-all-intents

Conversation

@laveshfonix

@laveshfonix laveshfonix commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

After onboarding, some exits opened the side panel automatically, so users were onboarded in two places at once: Getting started on Home, and a chat in the side panel.

  • handleRHPVariantNavigation opened it for Track users (trackExpensesWithConcierge) on wide screens, and for the retired rhpHomePage, rhpAdminsRoom and rhpConciergeDm arms. On small screens, Track users were sent to the Concierge DM instead.
  • navigateToSubmitWorkspaceAfterOnboarding opened it for Employer users, when auto-joining a Submit workspace, and for already-onboarded users who accept the Submit plan welcome modal or open the intent=submit link.

This PR stops these flows from opening the side panel:

  • Track: lands on Home on every screen size, including small screens that used to open the Concierge DM. The Track fallback in useAutoCreateTrackWorkspace now runs in finally, so a failed CompleteGuidedSetup request also gets it.
  • Retired arms: keep their pages, without the side panel. The live inboxAdminsBespoke / homePageNoRHP arms are unchanged.
  • Employer, auto-joining a Submit workspace, the Submit plan welcome modal and the intent=submit link: still land on Spend > Expenses, with the side panel closed, so new and existing Employer users get the same experience. rhpAdminsRoom is still stored, so admins who open the side panel later see #admins.

Fixed Issues

$ #104027
PROPOSAL: #104027 (comment)

Tests

  1. Sign up with a new account and skip the work email step
  2. Select "Track expenses for my business", enter a name and press Continue
  3. Verify you land on Home and the side panel doesn't open. On small screens, verify you land on Home instead of the Concierge DM
  4. Open Concierge from the top bar and verify the side panel opens with the Concierge chat. On native, verify the Concierge DM opens
  5. Sign out, sign up with a new account, select "Submit expenses to my employer", enter a name and press Continue
  6. Verify you land on Spend > Expenses and the side panel doesn't open
  7. Sign out and repeat steps 1-2 with "Organize my personal spending" (pick any goal). Verify you land on Home and the side panel doesn't open
  8. Sign out, sign up with a new account, select "Manage my team's expenses" and finish the setup questions. Verify the side panel doesn't open. The landing page comes from the onboarding experiment and is unchanged
  9. Sign out and repeat steps 1-2 with "Something else". Verify the side panel doesn't open
  10. As the account from step 5, invite a new email from Workspaces > the workspace > Members > Invite member
  11. Sign out and sign in as the invited email. Verify onboarding is skipped and the side panel doesn't open
  12. Sign in to an already-onboarded account that has no workspace and paste https://dev.new.expensify.com:8082/onboarding?intent=submit into the browser's address bar. Don't tap it inside a chat: links opened while the app is running don't apply the intent (Add a one-click deeplink that signs the user in and creates a Submit workspace #98887)
  13. Verify a Submit workspace is created, you land on Spend > Expenses and the side panel doesn't open

I ran steps 1-3 and 5-6 on all platforms, and the other steps and the offline test on MacOS Chrome.

Notes:

  • Opening the intent=submit link while logged out and signing up as a new user goes through onboarding and lands on Home, because Link.ts replays the parked /onboarding link. This is the same on main.

  • Joining through the "Join my company workspace" step needs a private-domain account, so it's covered by the updated WorkspaceOnboarding UI tests. The retired arms can't be assigned to new accounts, so RHPVariantTest.test.ts covers them. The Submit plan welcome modal is covered by useAutoCreateSubmitWorkspace.test.ts.

  • Ask to join or Skip with a retired arm at a micro company size can still reach workspaces/undefined/overview, with the side panel closed. That's unchanged and left as the agreed follow-up.

  • The console errors I saw aren't from this change. RESET not handled on sign-out also happens on main. The others, a wasm fetch and a nested-button warning on page load and React unknown-prop warnings at sign-in, appear before any onboarding code runs.

  • Verify that no errors appear in the JS console

Offline tests

  1. Sign up with a new account, select "Track expenses for my business" and enter a name
  2. Go offline and press Continue
  3. Verify you land on Home and the side panel doesn't open
  4. Go back online and verify you stay on Home and the side panel stays closed

QA Steps

Same as tests, pasting https://staging.new.expensify.com/onboarding?intent=submit into the browser's address bar for step 12

  • 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 verified any copy / text that was added to the app 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)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • 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)
  • 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.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • 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.

Not applicable: this PR changes no UI elements, copy, assets, markdown, Storybook stories or generic components.

Screenshots/Videos

Android: Native
6-android-native.mp4
Android: mWeb Chrome
5-android-mweb-chrome.mp4
iOS: Native
4-ios-native.mp4
iOS: mWeb Safari
3-ios-mweb-safari.mp4
MacOS: Chrome / Safari
1-mac-chrome-track-employer-manageteam.mp4
2-mac-chrome-invited-employee.mp4
7-mac-chrome-intent-submit.mov

@laveshfonix
laveshfonix requested review from a team as code owners October 23, 2026 23:02
@melvin-bot
melvin-bot Bot requested a review from rojiphil October 23, 2026 23:02
@melvin-bot
melvin-bot Bot requested review from heyjennahay and removed request for a team October 23, 2026 23:02
@melvin-bot

melvin-bot Bot commented Oct 23, 2026

Copy link
Copy Markdown

@rojiphil 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 October 23, 2026 23:02
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T23:16:17.392714Z 216ebb6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@laveshfonix

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@rojiphil

Copy link
Copy Markdown
Contributor

We agreed the panel should stay closed for every intent,

@laveshfonix The issue OP states that panel should stay closed for every intent. Why then would we want to open the side panel as per step 13 in PR OP?

@laveshfonix

Copy link
Copy Markdown
Contributor Author

@rojiphil Step 13 isn't an onboarding exit. The intent=submit link and the Submit plan welcome modal only act for users who have already finished guided setup (ApplySubmitOnboardingIntent, SubmitPlanWelcomeModalGuard), so the "after onboarding" change doesn't reach them. The approved proposal kept their current behavior, and step 13 checks that it didn't change.

If you'd prefer the side panel closed for those two as well, it's a small change. Happy to make it if you and @neil-marcellini want that.

@flaviadefaria
flaviadefaria requested review from flaviadefaria and removed request for heyjennahay October 26, 2026 11:41
@rojiphil

Copy link
Copy Markdown
Contributor

If you'd prefer the side panel closed for those two as well, it's a small change. Happy to make it if you and @neil-marcellini want that.

@neil-marcellini what do you think?

@neil-marcellini

Copy link
Copy Markdown
Contributor

@laveshfonix @rojiphil Yes I think we should keep the side panel closed for that too. I think we want the same experience for new Employer users and existing Employer users that accept the modal.

@laveshfonix

Copy link
Copy Markdown
Contributor Author

@neil-marcellini Sounds good. I'll update the PR so the side panel stays closed for both the Submit plan welcome modal and the intent=submit link, since they use the same flow. I'll also merge main to resolve the conflict, and push the update today.

…-panel-all-intents

# Conflicts:
#	src/hooks/useAutoCreateSubmitWorkspace.ts
@laveshfonix

Copy link
Copy Markdown
Contributor Author

Updated:

  • Merged main to resolve the conflict in useAutoCreateSubmitWorkspace.ts.
  • The side panel now stays closed for the Submit plan welcome modal and the intent=submit link too, so they land on Spend > Expenses like new Employer users. Updated step 13 and added a video for it under MacOS.

@rojiphil ready for another look.

@rojiphil

rojiphil commented Oct 28, 2026 •

Copy link
Copy Markdown
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 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 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)
  • 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)
  • 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.
  • 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
104916-android-hybrid-001.mp4
Android: mWeb Chrome
104916-mweb-chrome-001.mp4
104916-mweb-chrome-002.mp4
iOS: HybridApp
104916-ios-hybrid-001.mp4
iOS: mWeb Safari
104916-mweb-safari-001.mp4
MacOS: Chrome / Safari
104916-web-chrome-001.mp4
104916-web-chrome-002.mp4
104916-web-chrome-003.mp4
104916-web-chrome-004.mp4

@rojiphil rojiphil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @laveshfonix for the PR.

@neil-marcellini Changes LGTM and works well too.
All yours now. Thanks.

@melvin-bot
melvin-bot Bot requested a review from neil-marcellini October 29, 2026 23:38

@neil-marcellini neil-marcellini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the updates, good to go from me.

@neil-marcellini

Copy link
Copy Markdown
Contributor

(Neil's AI agent)

The failing Knip check is not caused by this PR, so it's safe to merge with it failing.

New issues introduced:
  files (1):
    src/setup/moduleInitPolyfill.ts::src/setup/moduleInitPolyfill.ts
  unlisted (1):
    metro.config.js::metro-config
##[error]PR introduces 2 new knip finding(s) (resolved 0, delta +2).

Why it failed: The job was a rerun on Oct 30 of a run created on Oct 27. A rerun reuses the original merge commit, so the PR side ran knip on f23b36cb, which is this PR merged into main as of Oct 27 (a6d53bc6). The base side fetches main fresh, so it used Oct 30 main. In between, Remove Metro (#104065) merged on Oct 29 and deleted metro.config.js and src/setup/moduleInitPolyfill.ts. Both findings come from those two files: they still exist on the stale PR side and are gone on the main side, so the compare script counts them as new.

Why it's unrelated: This PR doesn't touch either file. Merging main into the branch and pushing would make the check pass, but it isn't needed.

@neil-marcellini
neil-marcellini merged commit 0bdcade into Expensify:main Oct 30, 2026
38 of 41 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 neil-marcellini has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
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.

@melvin-bot melvin-bot Bot added the Emergency label Oct 30, 2026
@melvin-bot

melvin-bot Bot commented Oct 30, 2026

Copy link
Copy Markdown

@neil-marcellini looks like this was merged without a test passing. These checks had not passed on da1d1dd when it was merged:

Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@github-actions

Copy link
Copy Markdown
Contributor

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.5.27-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed. No help article says the side panel or the Concierge chat opens after onboarding, and the Submit flows still land on Spend > Expenses, which matches the existing Submit Workspace article.


view run

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #105574 was identified to be related to this PR.

@neil-marcellini

Copy link
Copy Markdown
Contributor

Removing the emergency label because of what I noted here.

@OSBotify

OSBotify commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/blimpich in version: 9.5.27-2 🚀

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

Bundle Size Analysis (Sentry):

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