Skip to content

Migrate Travel workspace address to dynamic route#93765

Draft
MelvinBot wants to merge 1 commit into
mainfrom
claude-migrateTravelWorkspaceAddressDynamicRoute
Draft

Migrate Travel workspace address to dynamic route#93765
MelvinBot wants to merge 1 commit into
mainfrom
claude-migrateTravelWorkspaceAddressDynamicRoute

Conversation

@MelvinBot

Copy link
Copy Markdown
Contributor

Explanation of Change

Migrates the Travel workspace-address route (TRAVEL_WORKSPACE_ADDRESS) from the legacy static backTo-based pattern to the new dynamic-route pattern, as tracked in the dynamic-route migration effort.

What changed:

  • Removed the static TRAVEL_WORKSPACE_ADDRESS route (which relied on getUrlWithBackToParam + a backTo query param) and added a TRAVEL_WORKSPACE_ADDRESS entry to DYNAMIC_ROUTES with path: 'workspace-address/:domain/:policyID?', carrying domain and policyID as path params.
  • Renamed the screen constant WORKSPACE_ADDRESSDYNAMIC_WORKSPACE_ADDRESS and updated all registration points in sync: SCREENS.ts, navigation types.ts param list, linking config.ts, and the modal stack navigator (require binding + replace-animation config).
  • Renamed WorkspaceAddressForTravelPage.tsxDynamicWorkspaceAddressForTravelPage.tsx, wiring it to useDynamicBackPath and rebuilding the post-OTP "next step" route via createDynamicRoute(...getRoute(domain, policyID), backPath) instead of reading a backTo query param.
  • Updated the callers/entry points (BookTravelButton.tsx, DynamicDomainSelectorPage.tsx) and the layered ADDRESS_COUNTRY / TRAVEL_TCS entryScreens references to point at the new dynamic screen.

Why the previously-claimed blocker does not apply: an earlier attempt deferred this route citing a "policyID/domain query-param collision." That was a misread of createDynamicRoute's mergeQueryStrings, which only throws on duplicate query param keys. Carrying domain/policyID as path params (exactly as the adjacent TRAVEL_TCS dynamic route already does) bypasses mergeQueryStrings entirely, so there is no collision and the route is migratable.

Fixed Issues

$ #83867
PROPOSAL:

Tests

// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.

  • Verify that no errors appear in the JS console

Offline tests

// TODO: The human co-author must fill out the offline tests.

QA Steps

// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.

  • 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 followed proper code patterns (see Reviewing the code)
  • 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

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Replace the static backTo-based TRAVEL_WORKSPACE_ADDRESS route with a
DYNAMIC_ROUTES entry (path 'workspace-address/:domain/:policyID?'),
mirroring the TRAVEL_TCS pattern. domain/policyID are carried as path
params (not query params) to avoid the mergeQueryStrings collision, and
the back path is derived via useDynamicBackPath.

Co-authored-by: huult <huult@users.noreply.github.com>
@MelvinBot MelvinBot requested a review from a team June 17, 2026 02:58
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
src/SCREENS.ts 100.00% <ø> (ø)
src/components/BookTravelButton.tsx 2.35% <ø> (ø)
src/libs/Navigation/linkingConfig/config.ts 76.92% <ø> (ø)
src/pages/Travel/DynamicDomainSelectorPage.tsx 0.00% <ø> (ø)
src/ROUTES.ts 20.60% <0.00%> (ø)
...gation/AppNavigator/ModalStackNavigators/index.tsx 6.53% <0.00%> (ø)
...es/Travel/DynamicWorkspaceAddressForTravelPage.tsx 0.00% <0.00%> (ø)
... and 15 files with indirect coverage changes

@huult

huult commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot please close this PR

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Closing this PR as requested by huult.

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.

2 participants