Skip to content

[Due for payment 2026-08-07] [$250] Book Travel enablement flow has no progress stepper #95649

Closed

Description

@blimpich

Background

We decided in this thread that the travel enablement flow should probably be turned into a dynamic stepper. This way it'll have a progress bar as the user moves through the steps to enable travel.

Problem

The "Book Travel" workspace-enablement flow walks a workspace admin through a series of separate full-screen steps before travel is enabled. Depending on the workspace, the user sees some subset of: enter your legal name, verify your account (magic code), choose a booking domain, enter the workspace address, enter a legal-entity tax ID, and accept the terms. These are disconnected screens that each decide the next screen on their own, and there is no progress indicator — so the user has no idea how many steps remain or where they are in the process, and the number of steps varies invisibly by workspace.

What we want

Turn the enablement flow into a single multi-step flow with a dynamic progress stepper ("step N of M") at the top, where M reflects only the steps that actually apply to that workspace. A workspace that needs 3 steps shows a 3-dot bar; one that needs 5 shows 5.

Requirements

Steps and when each applies

The flow presents these steps, in this order, each included only when its condition holds:

  1. Legal name — when the user's legal first/last name is missing.
  2. Verify account (magic code) — when the account is not yet validated.
  3. Domain selector — when the admin belongs to more than one private email domain.
  4. Workspace address — when the workspace has no address on file.
  5. Legal-entity tax ID — when the workspace currency is non-USD, the workspace is not already provisioned, and no tax ID is stored. (This step was recently added in App #94604.)
  6. Terms & conditions — always. This is the terminal step that accepts the Spotnana terms and opens TravelDot.

Stepper behavior

  • The progress bar is shown on every step, and the number of dots equals the number of applicable steps for that workspace.
  • If only one step applies (e.g. only terms remain), show the flow without the progress bar (a single-dot stepper is meaningless).
  • The user can go back a step, and tapping a completed dot lets them edit that step and return to the end (standard stepper edit behavior).
  • The current step must be reflected in the URL so a page refresh keeps the user in place.
  • Entering the flow must be access-guarded to the workspace (admins only) — a direct deep link by a non-member must not render it.

Terminal step must preserve existing outcomes exactly

The terms step currently handles several backend responses; all must be preserved:

  • Permission denied → navigate to the domain-permission-info screen.
  • Additional verification required → show the verify-company modal and, on confirm, create the concierge enablement issue.
  • Success → close the flow and open TravelDot.
  • Errors surfaced inline on the terms step.

Out of scope / constraints (do not change)

  • The legacy request-access path (used when the IS_TRAVEL_VERIFIED beta is off) must be preserved unchanged.
  • The Travel-Invoicing toggle (WorkspaceTravelInvoicingSection) must be untouched — it independently reuses the legal-name and public-domain-error screens and is not part of this flow.
  • The AcceptSpotnanaTerms API command and its parameters must be unchanged.
  • The pre-checks in BookTravelButton (blocked-feature beta, phone/SMS login error, public-domain error, no-admin-domains, upgrade, non-paid-workspace error, already-enabled) must be preserved.

How to see the current behavior (staging)

On staging.new.expensify.com, as an admin of a paid group workspace that has not enabled travel: open the workspace → More features → enable Travel (or use a Book Travel button), and step through. Observe that each step is its own screen with no progress indicator, and that the set of screens shown differs by workspace state (currency, account validation, address on file, number of admin domains).

Extra context — implementation guidance (recommended, not mandatory)

We investigated this and built a working reference implementation; notes for whoever picks it up.

Template & mechanism

  • Use the useSubPage hook (src/hooks/useSubPage/index.tsx) + InteractiveStepSubPageHeader. This is the current, non-deprecated multi-step pattern (useSubStep is deprecated per App #79039); it's documented in contributingGuides/NAVIGATION.md under "Multi-step flows with URL synchronization".
  • src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx is the closest existing template — it builds its pages conditionally with a matching step-name list and passes pageIndex straight to the stepper header.

Build the pages array conditionally — do NOT use skipPages

  • No flow in the codebase combines skipPages with InteractiveStepSubPageHeader. useSubPage's pageIndex is an index into the full pages array; skipPages only affects next/prev traversal, so feeding pageIndex to the stepper while skipping earlier pages misreports "N of M", and there is no helper to remap it. Building pages conditionally makes pages === visible steps, so the stepper index is correct for free.

Rendering model

  • The orchestrator owns the ScreenWrapper + header + stepper; each step is a chrome-less subpage (no ScreenWrapper/header of its own), like the MissingPersonalDetails subpages.
  • BookTravelButton should, after its existing pre-checks, navigate to the new flow route instead of doing per-screen navigation. The old cross-screen nextStepRoute hand-off in Onyx TRAVEL_PROVISIONING (src/libs/actions/Travel.ts) can be deleted once useSubPage owns ordering. The selected domain / tax ID should ride in TRAVEL_PROVISIONING (Onyx) so they survive a refresh.

Current flow files (logic to port)

  • Entry: src/components/BookTravelButton.tsx (the bookATrip cascade).
  • Screens: src/pages/Travel/TravelLegalNamePage.tsx, VerifyAccountPage.tsx, DynamicDomainSelectorPage.tsx, WorkspaceAddressForTravelPage.tsx, TravelLegalEntityTaxIDPage.tsx, DynamicTravelTerms.tsx.

The verify (magic-code) step is the tricky one

  • VerifyAccountPageBase and ValidateCodeActionContent render their own ScreenWrapper, so they can't be dropped in as chrome-less subpages. Their inner primitive ValidateCodeForm is chrome-less: compose that + replicate the validation wiring, and call the subpage's onNext() when account.validated flips. That keeps the stepper visible on the OTP step without forking the shared magic-code component.

Caveat if you also remove the old routes/pages

  • The old routes are entangled: the legacy beta-off path still routes through the old verify page → getTravelAcceptTermsRoute → the tax-ID/TCS routes, and the shared entryScreens arrays on the permission-info / TCS dynamic routes reference screens you'd be deleting. Untangle carefully (simplify the legacy verify page's now-dead forward-navigation first, then delete), or leave the dead pages and remove them in a focused follow-up. After BookTravelButton is rewired, the old pages are unreachable through the UI.

Reference implementation

  • A complete, validated implementation of everything above (the new flow + BookTravelButton wiring) is on branch blimpich-travelDynamicStepper, stacked on App #94604. It passes prettier, tsgo typecheck, eslint, and React Compiler compliance. Use it as a starting point or reference. Note it does not yet remove the old routes/pages (see caveat above) and has not had manual/jest verification.

– written by Claude on Ben's behalf

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit

Activity

  1. self-assigned this
    on Jul 8, 2026
  2. blimpich commented on Jul 8, 2026

    @blimpich
    ContributorAuthor

    FYI I started working on this but don't have the time to see it through. My WIP PR is here. Feel free to re-use it / modify it.

  3. blimpich commented on Jul 8, 2026

    @blimpich
    ContributorAuthor

    Asked for volunteers here

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 8, 2026
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 8, 2026
  6. samranahm commented on Jul 8, 2026

    @samranahm
  7. melvin-bot commented on Jul 8, 2026

    @melvin-bot

    Current assignee @huult is eligible for the External assigner, not assigning anyone new.

  8. changed the title [-]Book Travel enablement flow has no progress stepper[/-] [+][$250] Book Travel enablement flow has no progress stepper[/+] on Jul 8, 2026
  9. melvin-bot commented on Jul 8, 2026

    @melvin-bot
  10. wildan-m commented on Jul 8, 2026

    @wildan-m
  11. 17 remaining items

  12. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Aug 3, 2026
  13. melvin-bot commented on Aug 6, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  14. melvin-bot commented on Aug 6, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
  15. mallenexpensify commented on Aug 10, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @linhvovan29546 due $250 via NewDot
    Contributor+: @huult due $250 via NewDot

  16. twisterdotcom commented on Aug 11, 2026

    @twisterdotcom
    Contributor

    $250 approved for @linhvovan29546 in Report ID: R00JCIUSXAuJ.

    Zapier Logs Run ID: 00040eee-9151-a5e3-9769-9eee09f27ca4

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

  17. JmillsExpensify commented on Sep 6, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @huult

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributorImprovementItem broken or needs improvement.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions