Skip to content

EnterSignerInfo flow refactor#96321

Open
rinej wants to merge 3 commits into
Expensify:mainfrom
callstack-internal:refactor-90979-enter-signer-info
Open

EnterSignerInfo flow refactor#96321
rinej wants to merge 3 commits into
Expensify:mainfrom
callstack-internal:refactor-90979-enter-signer-info

Conversation

@rinej

@rinej rinej commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Part 2 of the useSubStepuseSubPage migration (see part 1 → #95946).

This PR migrates the EnterSignerInfo flow (src/pages/ReimbursementAccount/EnterSignerInfo/) to be URL-driven:

  1. Migrates the flow from useSubStep to useSubPage. Each sub-step (Name, Job title, Date of birth, Address, Upload documents, Confirmation) is now backed by its own URL segment, so steps are deep-linkable and back navigation works off the route rather than in-memory state. New SUB_PAGE_NAMES constants are added under CONST.ENTER_SIGNER_INFO.
  2. Parameterizes the route. BANK_ACCOUNT_ENTER_SIGNER_INFO now supports :subPage?/:action? path params (alongside the existing policyID/bankAccountID/isCompleted query params); navigation types are updated accordingly. The two existing call sites are unchanged (the new params are optional).
  3. Repoints the shared type. useEnterSignerInfoStepFormSubmit and the six sub-step components switch from SubStepProps to SubPageProps.

No user-facing behavior changes are intended - this is an architecture/refactor PR.

Fixed Issues

$ #90979
PROPOSAL:

Tests

The flow opens from Home → Time-sensitive → "Enter signer info" → Begin or the "…is connecting your bank account…" system message in a workspace expense chat.

  1. Enter the flow. Verify the URL redirects to the first sub-page (.../bank-account/enter-signer-info/name).
  2. Walk through Name → Job title → Date of birth → Address → Upload documents → Confirmation, tapping Next on each. Verify each step has its own URL segment and that reloading / deep-linking to a step restores that step.
  3. On Confirmation, tap a field to edit it (URL shows .../<sub-page>/edit), confirm the edit, and verify you're returned directly to Confirmation.
  4. Use the header back arrow from an intermediate step and verify it goes back one sub-page at a time, from the first step it exits the flow, in edit mode it returns to Confirmation.
  5. Tap Confirm on Confirmation and verify the request submits and the RHP closes on success (backend errors are surfaced on the Confirmation step, flow stays open).

Offline tests

QA Steps

  • Sam as Tests

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 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 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)
  • 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

SignerInfo.mp4
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

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 94.81% <ø> (ø)
src/hooks/useEnterSignerInfoStepFormSubmit.ts 0.00% <ø> (ø)
...tAccount/EnterSignerInfo/subSteps/Confirmation.tsx 0.00% <ø> (ø)
...count/EnterSignerInfo/subSteps/UploadDocuments.tsx 0.00% <ø> (ø)
...sementAccount/EnterSignerInfo/subSteps/Address.tsx 0.00% <0.00%> (ø)
...ntAccount/EnterSignerInfo/subSteps/DateOfBirth.tsx 0.00% <0.00%> (ø)
...ementAccount/EnterSignerInfo/subSteps/JobTitle.tsx 0.00% <0.00%> (ø)
...bursementAccount/EnterSignerInfo/subSteps/Name.tsx 0.00% <0.00%> (ø)
src/ROUTES.ts 21.07% <0.00%> (-0.12%) ⬇️
...ges/ReimbursementAccount/EnterSignerInfo/index.tsx 0.00% <0.00%> (ø)
... and 48 files with indirect coverage changes

@rinej
rinej marked this pull request as ready for review July 16, 2026 15:17
@rinej
rinej requested review from a team as code owners July 16, 2026 15:17
@melvin-bot
melvin-bot Bot requested review from joekaufmanexpensify and linhvovan29546 and removed request for a team July 16, 2026 15:17
@melvin-bot

melvin-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

@linhvovan29546 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 July 16, 2026 15:17
}, [isEditing, moveTo, pageIndex, prevPage]);

if (isRedirecting) {
return <FullScreenLoadingIndicator reasonAttributes={{context: 'EnterSignerInfo', isRedirecting}} />;

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.

❌ UI-1 (docs)

This FullScreenLoadingIndicator is rendered as an early return with no navigation component (no HeaderWithBackButton or close button) in that branch, and it omits shouldUseGoBackButton. If the redirect/loading hangs, the user is trapped with no escape route. Since no navigation is visible alongside the loader, shouldUseGoBackButton must be set explicitly so the emergency "Go Back" button appears after the timeout.

if (isRedirecting) {
    return <FullScreenLoadingIndicator shouldUseGoBackButton reasonAttributes={{context: 'EnterSignerInfo', isRedirecting}} />;
}

Reviewed at: 30272a8 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added that 👍 in practice isRedirecting resolves in a single render, so a true hang is unlikely. But it will be extra insurance

@dukenv0307

Copy link
Copy Markdown
Contributor

@rinej This is the 2nd part of #95946, right?

@rinej

rinej commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

@dukenv0307 yes, exactly. It is the parent ticket #90979

@dukenv0307

Copy link
Copy Markdown
Contributor

okay I'll review it

@dukenv0307
dukenv0307 requested review from dukenv0307 and removed request for linhvovan29546 July 16, 2026 16:28
@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

No product review needed.

@joekaufmanexpensify
joekaufmanexpensify removed their request for review July 16, 2026 20:06
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