Skip to content

[Due for Payment meow][BT-002] Implement createDynamicRoute() Helper #80907

Closed

Description

@mjasikowski

Description

Current State:

  • Navigation to verify-account routes uses direct route constants with backTo parameters
  • Example: Navigation.navigate(ROUTES.SETTINGS_WALLET_VERIFY_ACCOUNT.getRoute(backTo))
  • The backTo parameter is embedded in the URL, creating complex nested URLs

Expected State:

  • Add createDynamicRoute() function to Navigation.ts
  • Function should:
    1. Validate that the provided suffix exists in DYNAMIC_ROUTES
    2. Get the current active route via getActiveRoute()
    3. Separate the path from query parameters
    4. Append the dynamic suffix to the path
    5. Reattach query parameters
    6. Return the combined route

Implementation:

function createDynamicRoute(suffix: DynamicRouteSuffix): Route {
    if (!isValidSuffix(suffix)) {
        throw new Error(`Invalid dynamic route suffix: ${suffix}`);
    }

    const activePath = getActiveRoute();
    return combinePathAndSuffix(activePath, suffix);
}

// Helper: Combines path and suffix while preserving query params
function combinePathAndSuffix(path: string, suffix: string): Route {
    const [basePath, queryString] = path.split('?');
    const newPath = `${basePath}/${suffix}`;
    return queryString ? `${newPath}?${queryString}` : newPath;
}

Usage Example:

// Old way
Navigation.navigate(ROUTES.SETTINGS_WALLET_VERIFY_ACCOUNT.getRoute(backTo));

// New way
Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.VERIFY_ACCOUNT.path));

Scope

Files:

  • App/src/libs/Navigation/Navigation.ts - Add createDynamicRoute() and combinePathAndSuffix() functions

Dependencies:

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    InternalRequires API changes or must be handled by Expensify staff
    on Jan 29, 2026
  2. mjasikowski commented on Feb 11, 2026

    @mjasikowski
    ContributorAuthor

    Assigning @situchan as the PR reviewer

  3. mjasikowski commented on Feb 23, 2026

    @mjasikowski
    ContributorAuthor

    This seems to be merged, automation failed.

  4. mjasikowski commented on Feb 23, 2026

    @mjasikowski
    ContributorAuthor

    @Expensify/bug-zero can you handle payment to @situchan for PR review please?

  5. 1 remaining item

  6. melvin-bot commented on Feb 23, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  7. MelvinBot commented on Feb 23, 2026

    @MelvinBot
    Contributor

    🔍 Issue Analysis

    Summary: This issue's implementation is complete and deployed to production. The issue is stuck open due to an automation failure — not a code bug.

    Status: PR #81295 was merged on 2026-02-09, deployed to staging on 2026-02-10, and deployed to production on 2026-02-11.

    Implementation Verification

    The requested code exists in the codebase and matches the specification:

    Why the issue is still open

    1. PR [NO QA] Implement createDynamicRoute() Helper (BATCH-2) #81295 uses Expensify's custom $ URL format in the Fixed Issues section (not GitHub's native Fixes/Closes keywords), so GitHub's auto-close never fired.
    2. The external melvin-bot automation that normally processes the $ format and adds the Awaiting Payment label apparently failed for this specific issue. (It successfully processed the sibling issue [Due for payment 2026-02-17] [BT-001] Add Dynamic Routes Configuration #80906 via the same mechanism.)
    3. On 2026-02-23, the Bug label was added to this still-open issue, which triggered a BugZero auto-assignment to @mallenexpensify — treating an administrative oversight as an active bug.

    Recommended Action

    This issue should be closed manually and labeled Awaiting Payment. There are no remaining code changes needed. The Bug label appears to have been added in error — this was originally an Internal feature task, not a bug report.


    Note: createDynamicRoute is currently not imported or called by any consumer in the codebase (it is infrastructure for future use, marked WIP - DO NOT USE FOR NEW ROUTES in the DYNAMIC_ROUTES comment). The isDynamicRouteSuffix helper IS actively used by getStateFromPath.ts and getAdaptedStateFromPath.ts.

  8. mallenexpensify commented on Feb 24, 2026

    @mallenexpensify
    Contributor

    @situchan can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022026109698468052413

  9. changed the title [-][BT-002] Implement createDynamicRoute() Helper[/-] [+][Due for Payment meow][BT-002] Implement createDynamicRoute() Helper[/+] on Feb 24, 2026
  10. mallenexpensify commented on Feb 28, 2026

    @mallenexpensify
    Contributor

    @situchan @mjasikowski should this be $125 for PR-review only and no tests? Or $250?
    (I already paid $250, might need to ask for a partial refund)

  11. situchan commented on Feb 28, 2026

    @situchan
    Contributor

    Similar issue [BT-001] was paid standard 250 for reviewing [No QA] PR

  12. mjasikowski commented on Mar 2, 2026

    @mjasikowski
    ContributorAuthor

    @mallenexpensify let's do $250 here for consistency. The rest of the project is fixed price.

  13. mallenexpensify commented on Mar 2, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @situchan paid $250 via NewDot

    Thx!

  14. laurenreidexpensify commented on Apr 27, 2026

    @laurenreidexpensify
    Contributor

    $250 approved for @situchan

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staff

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions