Skip to content

83865 migrate workspace workflows members#94482

Open
huult wants to merge 16 commits into
Expensify:mainfrom
huult:83865-migrate-workspace-workflows-members
Open

83865 migrate workspace workflows members#94482
huult wants to merge 16 commits into
Expensify:mainfrom
huult:83865-migrate-workspace-workflows-members

Conversation

@huult

@huult huult commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Fixed Issues

$ #83865
PROPOSAL:

Tests

Same QA step

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

WORKSPACE_WORKFLOWS_APPROVALS_EXPENSES_FROM

From Workflows list

  1. Go to workspaces/{policyID}/workflows
  2. Tap "Add approval workflow" (or equivalent create action)
  3. Verify that the approve expense from page opens and navigates back normally
  4. Verify member selection screen renders

From New approval confirm page

  1. Start creating a workflow and reach the confirm/new page
  2. Tap "Expenses from" in the approval editor
  3. Verify that the approve expense from page opens and navigates back normally

From Edit approval page

  1. Open an existing custom approval workflow for editing
  2. Tap "Expenses from"
  3. Verify that the approve expense from page opens and navigates back normally

WORKSPACE_PAY_AND_DOWNGRADE

Precondition:

  • Use an account on a paid plan with an outstanding bill when deleting a workspace or

Navigation from workspace profile

  1. Open workspaces/{policyID} (workspace overview)
  2. Delete the workspace and trigger the paid-workspace billing flow
  3. Verify workspace owner change error page opens and navigates back normally

Navigation from workspaces list

  1. Open the workspaces list
  2. Delete a paid workspace from the three-dots menu
  3. Verify workspace owner change error page opens and navigates back normally

WORKSPACE_OWNER_CHANGE_SUCCESS

Precondition: Add a member to the workspace as an admin.

  1. Log in to the admin member account created above.
  2. Open Workspace Overview.
  3. Navigate to More > Transfer Owner.
  4. Complete until success
  5. Verify that the Transfer Owner Success page opens correctly and that navigation back works normally.

WORKSPACE_OWNER_CHANGE_CHECK

Precondition: Add a member to the workspace as an admin.

  1. Log in to the admin member account created above.
  2. Open Workspace Overview.
  3. Navigate to More > Transfer Owner.
  4. Verify that the Transfer Owner page opens correctly and that navigation back works normally.
  • 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 there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (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 shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • 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)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • 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)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • 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 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 a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • 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

WORKSPACE_WORKFLOWS_APPROVALS_EXPENSES_FROM

Screen.Recording.2026-06-25.at.10.41.08.mov
Screen.Recording.2026-06-25.at.13.57.21.mov

@huult huult requested review from a team as code owners June 24, 2026 16:06
@melvin-bot melvin-bot Bot requested review from heyjennahay and suneox and removed request for a team June 24, 2026 16:06
@melvin-bot

melvin-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

@suneox 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]

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Comment thread src/pages/workspace/members/DynamicWorkspaceOwnerChangeErrorPage.tsx Outdated
Comment thread src/pages/workspace/members/DynamicWorkspaceOwnerChangeSuccessPage.tsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5c5061b76

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/pages/workspace/workflows/approvals/ApprovalWorkflowEditor.tsx Outdated
@huult

huult commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Hello @blimpich, regarding #59070 (comment), I'd like to test the WORKSPACE_PAY_AND_DOWNGRADE flow. Could you help me set up an account/workspace for it?

cc @mjasikowski

@suneox

suneox commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Manual test cases based on current code change


A — DYNAMIC_ROUTES.WORKSPACE_WORKFLOWS_APPROVALS_EXPENSES_FROM

A.1 — Workflows list → "Add approval" → expenses-from → back

Target: WorkspaceWorkflowsPage.tsx:291 (addApprovalAction, Control branch)

Precondition: Control workspace (policy.type==='corporate') + areWorkflowsEnabled + ≥1 eligible member.

// Control policy → isControlPolicy true → goes to expenses-from (not upgrade)
Onyx.merge("policy_<POLICY_ID>", { type: "corporate" });
Onyx.merge("policy_<POLICY_ID>", {
  moreFeatures: { areWorkflowsEnabled: true },
});
// DERIVED: employeeList (≥1 eligible member) — test account must have ≥1 active member.

Steps:

  1. Open app, log into the test account, open the Control workspace.
  2. Open workspace SettingsWorkflows.
  3. Tap Add approval workflow.
  4. Verify the "Expenses from" page opens, URL = …/workflows/expenses-from.
  5. Tap Back → verify it returns to the Workflows list, URL no longer has the suffix (…/workflows).

Expected: expenses-from opens from WORKFLOWS; back → WORKFLOWS (suffix stripped correctly).

A.2 — New approval confirm page → "Expenses from" → back → new page

Target: ApprovalWorkflowEditor.tsx:149

Precondition: as A.1; mid new-approval flow, on the confirm/new page.

Onyx.merge("policy_<POLICY_ID>", {
  type: "corporate",
  moreFeatures: { areWorkflowsEnabled: true },
});
// DERIVED: must have started a create-workflow flow (approvalWorkflow state action=CREATE).

Steps:

  1. Workflows → Add approval workflow → pick a member → Next (land on the New approval confirm page).
  2. Tap Expenses from in the editor.
  3. Verify expenses-from opens, URL = …/workflows/approvals/new/expenses-from.
  4. Tap Back → verify it returns to the New approval confirm page (draft preserved, no new instance pushed), URL suffix gone.

Expected: expenses-from layered on NEW; back → NEW (draft preserved via compareParams:false).

A.3 — Edit approval page → "Expenses from" → back → edit page

Target: WorkspaceWorkflowsPage.tsx:550 + ApprovalWorkflowEditor.tsx:149

Precondition: Control workspace with ≥1 existing custom approval workflow.

Onyx.merge("policy_<POLICY_ID>", {
  type: "corporate",
  moreFeatures: { areWorkflowsEnabled: true },
});
// DERIVED: needs ≥1 saved approval workflow to tap Edit on.

Steps:

  1. Workflows → tap Edit on an existing custom workflow (land on the Edit page).
  2. Tap Expenses from.
  3. Verify expenses-from opens, URL = …/workflows/approvals/<email>/edit/expenses-from.
  4. Tap Back → verify it returns to the Edit page, selection preserved, URL suffix gone.

Expected: expenses-from layered on EDIT; back → EDIT (selection preserved).

A.4 — Non-Control (Collect) policy → Upgrade redirect with backTo = expenses-from

Target: WorkspaceWorkflowsPage.tsx:285 (!isControlPolicy branch)

Precondition: Collect workspace (policy.type!=='corporate') + areWorkflowsEnabled + canAccessSubmit2026Features false.

Onyx.merge("policy_<POLICY_ID>", { type: "free" }); // Collect → isControlPolicy false
Onyx.merge("policy_<POLICY_ID>", {
  moreFeatures: { areWorkflowsEnabled: true },
});
// DERIVED: canAccessSubmit2026Features is server gating — account must lack the Submit2026 flag.

Steps:

  1. Open the Collect workspace → Workflows.
  2. Tap Add approval workflow.
  3. Verify it goes to the Upgrade page (not expenses-from directly).
  4. (Verify logic) the upgrade backTo contains …/workflows/expenses-from. After upgrade → verify it lands on expenses-from.

Expected: Collect policy → redirect to Upgrade; backTo points at the dynamic expenses-from URL.

A.5 — Invite message: header reflects expenses-from source

Target: WorkspaceInviteMessageComponent.tsx:73 (endsWith('/expenses-from'))

Precondition: on expenses-from → tap to invite a new member → invite-message page.

Onyx.merge("policy_<POLICY_ID>", {
  type: "corporate",
  moreFeatures: { areWorkflowsEnabled: true },
});
// DERIVED: must reach invite-message from expenses-from (backTo ends with /expenses-from).

Steps:

  1. Reach expenses-from (A.1/A.2).
  2. Tap to invite a new member → invite-message page.
  3. Verify the header title = workflowsExpensesFromPage.title (not workspace.inviteMessage.confirmDetails).

Expected: invite-message detects the expenses-from source correctly (regex endsWith('/expenses-from') matches the new dynamic URL).

A.6 ⚠️ — Old link redirect workspaces/<pid>/workflows/approvals/expenses-from (P2)

Target: OldRoutes.ts (no entry yet — P2 in review.md)

Precondition: an old link/bookmark/tab to workspaces/<pid>/workflows/approvals/expenses-from.

Steps:

  1. Open the old URL directly: https://dev.new.expensify.com:8082/workspaces/<pid>/workflows/approvals/expenses-from.

Expected: old link redirects to the new dynamic URL (…/workflows/approvals/new/expenses-from), opening expenses-from.
⚠️ Caveat: the PR does not add this redirect yet → currently the old URL does not match the new pattern → falls to NotFound/Home. Verify after the redirect is added. If it still shows NotFound before the fix, that confirms the bug — capture it.


B — DYNAMIC_ROUTES.WORKSPACE_PAY_AND_DOWNGRADE

B.1 — Delete paid workspace from Workspaces list → pay-and-downgrade → back

Target: usePayAndDowngrade.ts:34 + caller DeleteWorkspaceFlow.tsx:218

Precondition: a paid workspace with an outstanding bill when downgrading (shouldBillWhenDowngrading=true).

// DERIVED/server-driven: shouldBillWhenDowngrading + isLoadingBill are server-set when a paid workspace delete is triggered.
// Cannot be set via Onyx — test account must have a paid workspace with an outstanding bill.

Steps:

  1. Workspaces list (account with a paid workspace + bill).
  2. Tap on the paid workspace → Delete workspace.
  3. Verify the Pay and downgrade page opens, URL = workspaces/pay-and-downgrade.
  4. Tap Back → verify it returns to the Workspaces list.

Expected: pay-and-downgrade opens from the list; back → list (suffix stripped).

B.2 — Delete paid workspace from Workspace profile → pay-and-downgrade → back

Target: as B.1 (usePayAndDowngrade.ts:34), entry = WORKSPACE.PROFILE

Precondition: as B.1.

// DERIVED/server-driven: needs a paid workspace + outstanding bill (see B.1).

Steps:

  1. Open the paid workspace → overview (profile).
  2. Delete workspace.
  3. Verify Pay and downgrade opens, URL = workspaces/<pid>/pay-and-downgrade.
  4. Tap Back → verify it returns to the Workspace overview (workspaces/<pid>).

Expected: pay-and-downgrade opens from the profile; back → profile.


C — DYNAMIC_ROUTES.WORKSPACE_OWNER_CHANGE_CHECK

C.1 — Workspaces list → Transfer Owner (TransferOwnershipFlow) → check → back

Target: TransferOwnershipFlow.tsx:41

Precondition: workspace with ≥1 admin member (to transfer ownership to); current user is the owner.

Onyx.merge("policy_<POLICY_ID>", { role: "admin" }); // user is admin/owner
// DERIVED: needs ≥1 admin member in the workspace to pick as transfer target.

Steps:

  1. Workspaces list → tap on the workspace → Transfer Owner.
  2. Verify the Transfer Owner / change-owner page opens, URL = workspaces/change-owner/<pid>/<aid>/amountOwed.
  3. Tap Back → verify it returns to the Workspaces list.

Expected: check opens from the list (explicit WORKSPACES_LIST base); back → list.

C.2 — Workspace overview → More → Transfer Owner → check → back

Target: WorkspaceOverviewPage.tsx:310

Precondition: as C.1.

Onyx.merge("policy_<POLICY_ID>", { role: "admin" });
// DERIVED: needs ≥1 admin member in the workspace.

Steps:

  1. Open the workspace → overview.
  2. MoreTransfer Owner.
  3. Verify the check page opens, URL = workspaces/<pid>/change-owner/<pid>/<aid>/amountOwed.
  4. Tap Back → verify it returns to the Workspace overview (workspaces/<pid>).

Expected: check opens from PROFILE (PROFILE ∈ entryScreens); back → overview.

C.3 — Member details → Transfer Owner → check → back

Target: WorkspaceMemberDetailsPage.tsx:262

Precondition: workspace with ≥1 admin member; current user is owner.

Onyx.merge("policy_<POLICY_ID>", { role: "admin" });
// DERIVED: needs the target member (accountID) to exist in the workspace.

Steps:

  1. Workspace → Members → open an admin member.
  2. Tap Transfer Owner / Make Owner.
  3. Verify the check page opens, URL = workspaces/<pid>/members/<aid>/change-owner/<pid>/<aid>/amountOwed.
  4. Tap Back → verify it returns to Member details.

Expected: check opens from MEMBER_DETAILS; back → member details.


D — DYNAMIC_ROUTES.WORKSPACE_OWNER_CHANGE_SUCCESS

D.1 — Transfer succeeds → success page → back (to member details, NOT re-entering check)

Target: WorkspaceOwnerChangeWrapperPage.tsx (success forceReplace branch) + WorkspaceOwnerChangeSuccessPage.tsx

Precondition: on the CHECK page (C.3), ownership transfer completed → server sets policy.isChangeOwnerSuccessful=true, no errorFields.changeOwner.

// DERIVED/server-driven: isChangeOwnerSuccessful is server-set after a successful transfer.
// Cannot be set via Onyx (gets re-synced) — run the real transfer flow to completion.

Steps:

  1. Reach CHECK from Member details (C.3), complete the transfer (enter card / confirm) → success.
  2. Verify the Success page opens, URL = …/owner-change-success.
  3. Tap Back/Close → verify it returns to Member details (NOT re-entering the change-owner form).
  4. Verify the stack is correct: pop SUCCESS → member details (URL no longer has the change-owner suffix).

Expected: success page opens; back → member details (pop wins, fallback check-url not used). ⚠️ If back re-enters the change-owner form, that's a bug — capture it.


E — DYNAMIC_ROUTES.WORKSPACE_OWNER_CHANGE_ERROR

E.1 — Transfer fails → error page → back (to member details)

Target: WorkspaceOwnerChangeWrapperPage.tsx (error forceReplace branch) + WorkspaceOwnerChangeErrorPage.tsx

Precondition: on the CHECK page, transfer fails → server sets policy.isChangeOwnerFailed=true, no errorFields.

// DERIVED/server-driven: isChangeOwnerFailed is server-set. Trigger a real failure (e.g. missing billing card / SCA auth required).

Steps:

  1. Reach CHECK, trigger a transfer failure (e.g. missing billing card, or SCA auth required not completed).
  2. Verify the Error page opens, URL = …/owner-change-failure.
  3. Tap Back/Close → verify it returns to Member details (not re-entering the check form).

Expected: error page opens; back → member details.

E.2 ⚠️ — Old link redirect workspaces/<pid>/change-owner/<aid>/success|failure (P2)

Target: OldRoutes.ts (no entry yet — P2, lower risk than A.6 since the pages are transient)

Precondition: an old link/tab to workspaces/<pid>/change-owner/<aid>/success (or /failure).

Steps:

  1. Paste the old URL: https://dev.new.expensify.com:8082/workspaces/<pid>/change-owner/<aid>/success.

Expected: old link redirects to the new dynamic URL, opening the success page.

@suneox

suneox commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@huult Test case A6 failed

CleanShot.2026-06-25.at.15.26.06.1.mp4

@blimpich

Copy link
Copy Markdown
Contributor

Hello @blimpich, regarding #59070 (comment), I'd like to test the WORKSPACE_PAY_AND_DOWNGRADE flow. Could you help me set up an account/workspace for it?

cc @mjasikowski

Please have the assigned CME setup an account for you to test. I wrote a stack overflow here for how to setup a local test account on an internal engineer's backend: https://stackoverflowteams.com/c/expensify/questions/23797/23798#23798

@huult

huult commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@mjasikowski When you’re back, could you help set this up: #94482 (comment)? I need to verify the WORKSPACE_PAY_AND_DOWNGRADE case.

@huult

huult commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@huult Test case A6 failed

CleanShot.2026-06-25.at.15.26.06.1.mp4

Screen.Recording.2026-06-30.at.12.47.05.mov

@suneox it's done

@huult huult force-pushed the 83865-migrate-workspace-workflows-members branch from 31c0f16 to fbaca16 Compare July 1, 2026 03:41
@melvin-bot melvin-bot Bot requested a review from mjasikowski July 1, 2026 10:38

@suneox suneox 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.

I'll update pr checklist soon

@suneox

suneox commented Jul 2, 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
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari

Manual test cases — #83865 [BT-143] → PR #94482

Lean English version of test.md for pasting into the PR comment. Each case in its own <details>.

How to use: each <details> is one test case (Precondition + Steps + Expected). Onyx scripts go in the DevTools console. DERIVED = state that can't be set via Onyx (server-driven) — the test account must already have it.


A — DYNAMIC_ROUTES.WORKSPACE_WORKFLOWS_APPROVALS_EXPENSES_FROM

A.1 — Workflows list → "Add approval" → expenses-from → back A 1-1-before-workflows-list A 1-2-entry-expenses-from A 1-3-back-workflows-list
A.2 — New approval confirm page → "Expenses from" → back → new page A 2-1-before-new-confirm A 2-2-entry-expenses-from A 2-3-back-new-confirm
A.3 — Edit approval page → "Expenses from" → back → edit page A 3-1-before-edit-page A 3-2-entry-expenses-from A 3-3-back-edit-page
A.4 — Non-Control (Collect) policy → Upgrade redirect with backTo = expenses-from A 4-1-before-workflows-control-add-approval A 4-2-entry-collect-no-add-button-blocked
A.5 — Invite message: header reflects expenses-from source
A.6 ⚠️ — Old link redirect workspaces/<pid>/workflows/approvals/expenses-from (P2) A 6-1-before-workflows A 6-2-entry-old-url-redirect-result

B — DYNAMIC_ROUTES.WORKSPACE_PAY_AND_DOWNGRADE

B.1 — Delete paid workspace from Workspaces list → pay-and-downgrade → back B-1-before B-2-entry-new-url B-3-back-workspaces-list
B.2 — Delete paid workspace from Workspace profile → pay-and-downgrade → back

C — DYNAMIC_ROUTES.WORKSPACE_OWNER_CHANGE_CHECK

C.1 — Workspaces list → Transfer Owner (TransferOwnershipFlow) → check → back
C.2 — Workspace overview → More → Transfer Owner → check → back
C.3 — Member details → Transfer Owner → check → back C 3-1-before-member-details-transfer-owner C 3-2-entry-check-route-amountOwed C 3-2-entry-owner-change-success-transition

D — DYNAMIC_ROUTES.WORKSPACE_OWNER_CHANGE_SUCCESS

D.1 — Transfer succeeds → success page → back (to member details, NOT re-entering check) D 1-1-before-member-details-transfer-owner D 1-2-entry-owner-change-success D 1-3-back-back-to-member-details
CleanShot.2026-07-02.at.14.06.19.1.mp4

E — DYNAMIC_ROUTES.WORKSPACE_OWNER_CHANGE_ERROR

E.1 — Transfer fails → error page → back (to member details)
E.2 ⚠️ — Old link redirect workspaces/<pid>/change-owner/<aid>/success|failure (P2)

@suneox

suneox commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@huult test case E1, E2 are failed

CleanShot.2026-07-02.at.14.20.53.1.mp4

@huult

huult commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author
Screen.Recording.2026-07-02.at.15.29.27.mov

The issue where the page reloads and shows the crash page has been fixed. For the first issue, where the page shows a "Not Found" page, I can't reproduce it. Do we have any specific preconditions to reproduce it?

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