Skip to content

Migrate ParticipantPicker modal to nav - #104751

Merged
mountiny merged 14 commits into
Expensify:mainfrom
software-mansion-labs:chore/migrate-participant-picker
Nov 5, 2026
Merged

mountiny merged 14 commits into
Expensify:mainfrom
software-mansion-labs:chore/migrate-participant-picker

Conversation

@jmusial

@jmusial jmusial commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

The confirmation page's "To" row, and the auto-open for a manual expense with no recipient, now navigate to the existing routed participants page (DynamicIOURequestStepParticipants, in a new isFromConfirmation mode) instead of opening the inline ParticipantPicker modal, which is deleted along with its iOS overlay, referral and focus workarounds.

Fixed Issues

$ #104753
PROPOSAL:

Tests

Scenario 1 - Change recipient from the "To" row

  1. Open app
  2. Navigate to FAB > Create expense > Manual, fill in an amount and a category, then press the "To" row
  3. Press the referral banner, go back, and verify that the "Choose recipient" page is still open
  4. Select a different workspace and verify that the app returns to the form with that workspace in "To" and the category cleared

Scenario 2 - Auto open

  1. Open app
  2. Navigate to FAB > Create expense > Manual
  3. Verify that the "Choose recipient" page slides in as an RHP screen over the form
  4. Select "You" and verify that the app returns to the form with the expense on your self DM, the app does not freeze, and the recipient page does not open again

Offline tests

Same as tests

QA Steps

Same 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 verified any copy / text that was added to the app 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 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 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 the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • 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
screen-recording-emulator-5554-1792674994226.mp4
Android: mWeb Chrome
screen-recording-emulator-5554-1792676994552.mp4
iOS: Native
screen-recording-6AB7550A-7051-41A2-BA46-CB5AA71941B5-1792677501634.mp4
iOS: mWeb Safari
screen-recording-6AB7550A-7051-41A2-BA46-CB5AA71941B5-1792677723148.mp4
MacOS: Chrome / Safari
participant-picker-migration.mp4

@codecov

codecov Bot commented Oct 22, 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/ROUTES.ts 33.65% <100.00%> (+0.04%) ⬆️
...tConfirmationList/hooks/useConfirmationListData.ts 98.90% <ø> (-0.02%) ⬇️
...eyRequestConfirmationList/sections/AmountField.tsx 86.70% <100.00%> (+2.72%) ⬆️
.../fieldGroups/detailsFields/ManualDetailsFields.tsx 100.00% <100.00%> (ø)
...tConfirmationListFooter/variants/InvoiceFooter.tsx 100.00% <ø> (ø)
...stConfirmationListFooter/variants/ManualFooter.tsx 100.00% <ø> (ø)
...uestConfirmationListFooter/variants/ScanFooter.tsx 100.00% <ø> (ø)
src/components/ReferralProgramCTA.tsx 92.10% <100.00%> (-0.21%) ⬇️
...s/iou/request/MoneyRequestParticipantsSelector.tsx 0.00% <ø> (ø)
src/pages/iou/request/ParticipantSearchResults.tsx 0.00% <ø> (-0.37%) ⬇️
... and 6 more
... and 16 files with indirect coverage changes

@jmusial

jmusial commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@MelvinBot please review

@MelvinBot

Copy link
Copy Markdown
Contributor

Review

The migration looks solid overall. The selection logic moved into useConfirmationParticipantSelection without changes, and the multi-step-only behavior is correctly gated off in isFromConfirmation mode: useParticipantSubmission focus effects, the receipt check, and isWorkspacesOnly/shouldExcludeP2P all match the old picker. I found one behavior regression and two smaller points.

1. The amount field now takes focus every time the confirmation regains focus (desktop)

AmountField.tsx:152-165 now depends on useIsFocused(). Before, it only refocused when the picker went from visible to hidden. Now isScreenFocused goes false → true on every return from a routed sub-page, such as Category, Date, Tag, or Tax. On non-touch devices, the focus jumps to Amount each time, after the focus trap has restored focus to the row you just edited. This hurts keyboard and screen-reader users.

Suggestion: refocus only on the way back from the participants page. For example, set a ref in openParticipantPicker and check it here, or add an isFromParticipantPicker-style signal.

2. returnToConfirmation updates iouType in two steps (minor)

DynamicIOURequestStepParticipants.tsx:183-199 first goes back with POP_TO, which resets the params to the old iouType from the path. It then calls setParams on the captured route key.

  • The confirmation renders briefly with the new participants but the old iouType.
  • If goUp falls back to REPLACE (no route to pop to), the route key changes. The setParams is then dropped silently, and a SUBMIT → TRACK switch (picking "You") is lost.

Building the back route with the new iouType would avoid both problems.

3. Test gap

The new tests cover auto-open and the frozen participant list. Nothing covers returnToConfirmation, meaning the back navigation plus the iouType switch to TRACK/CREATE. A test for "pick self DM from a SUBMIT confirmation → confirmation iouType becomes TRACK" would cover it.

Checked and fine
  • addParticipantFromConfirmation and onFinish both fire on a pick. hasReturnedToConfirmationRef makes sure only one goBack runs. A self-DM pick (no onFinish) still returns through onParticipantsAdded.
  • Blocked distance workspaces are stopped in onSelectRow before any callback runs, so a block does not return to the confirmation.
  • The restricted-action route now pushes over the participants page instead of closing the picker first. This is cleaner.
  • The auto-open ref is keyed by transactionID and gated on isFocused, so the embedded start-page tab doesn't open it twice. Coming back without picking doesn't reopen it.
  • useParticipantSubmission side effects are all gated on isFocused, which is forced to false in this mode, so they can't overwrite the confirmation's expense.

view run

@jmusial

jmusial commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@MelvinBot

  1. Fixed. The amount now refocuses only on mount and when coming back from the participants page.

  2. Going back doesn't apply the back path's params, so building the route with the new iouType wouldn't help. It now targets the stack instead of a stored route key, so it works whether going back pops or replaces.

  3. This is already covered.

…cipant-picker

# Conflicts:
#	src/components/MoneyRequestConfirmationList/sections/AmountField.tsx
@MelvinBot

Copy link
Copy Markdown
Contributor

Thanks. I checked the new commit, and all three points are resolved. I have no further comments.

  1. Amount refocus: fixed. The blur listener in AmountField.tsx:151-160 only lets the next focus refocus the amount when the user is leaving for the participants page. Returning from Category, Tag, or another field page now leaves focus on the row the user edited. The new AmountField refocus on return tests cover both cases.
  2. iouType after going back: agreed. DynamicIOURequestStepParticipants.tsx:183-199 now sends setParams with no source route. React Navigation then applies it to the stack's focused route. That route is the confirmation whether goUp pops back to it or replaces the participants page with it. goUp replaces within the target stack, so the stack key you capture stays valid.
  3. Test gap: my mistake. The returns to the confirmation once when… cases already checked the switch to CREATE or TRACK.

The only failing check is Check independent approval, which needs a reviewer.

@jmusial
jmusial marked this pull request as ready for review October 23, 2026 10:47
@jmusial
jmusial requested review from a team as code owners October 23, 2026 10:47
@melvin-bot
melvin-bot Bot requested review from parasharrajat and removed request for a team October 23, 2026 10:47
@melvin-bot

melvin-bot Bot commented Oct 23, 2026

Copy link
Copy Markdown

@parasharrajat 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 requested review from heyjennahay and removed request for a team October 23, 2026 10:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T11:25:05.321123Z c770606 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jmusial

jmusial commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: c770606f2a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +68 to +74
const autoOpenedForTransactionIDRef = useRef<string | undefined>(undefined);
useEffect(() => {
// The confirmation is also a tab of `IOURequestStartPage`, so only the focused tab opens it.
if (!shouldAutoOpenParticipantPicker || !isFocused || autoOpenedForTransactionIDRef.current === activeTransactionID) {
return;
}
// P2P chats don't support negative amounts. When a negative amount was entered before a participant
// was selected (e.g. "Submit it to someone" from a self DM), assigning it to a P2P participant would
// fail at submit, so keep the expense on the self DM (its default) instead of assigning the P2P
// participant, stopping the user at selection rather than at submit. This only applies while the
// expense is still on the self DM — a negative expense already bound to a policy expense chat (e.g.
// global create auto-assigned the default workspace) must stay on that workspace rather than being
// silently converted into a personal track expense.
const isTransactionOnPolicyExpenseChat = transaction?.participants?.some((participant) => participant?.isPolicyExpenseChat);
const shouldKeepOnSelfDM = !!selectedParticipant?.isSelfDM || ((transaction?.amount ?? 0) < 0 && !isTransactionOnPolicyExpenseChat && isParticipantP2P(selectedParticipant));
if (shouldKeepOnSelfDM) {
setMoneyRequestParticipantsFromReport(activeTransactionID, selfDMReport, currentUserPersonalDetails.accountID);
setTransactionReport(activeTransactionID, {reportID: CONST.REPORT.UNREPORTED_REPORT_ID}, true);

// The rate the expense picked up from a workspace does not exist outside it, so leaving it in place
// makes the Rate field read "Pending..." and the amount go blank once the expense is back on the self
// DM. Re-resolve the rate the self DM itself uses, the same way starting a track distance expense does.
if (isDistanceRequest) {
const selfDMRateID = DistanceRequestUtils.getCustomUnitRateID({
reportID: selfDMReport?.reportID,
isPolicyExpenseChat: false,
isTrackDistanceExpense: true,
policy: policyForMovingExpenses,
lastSelectedDistanceRates,
expenseDate: transaction?.created,
});
setCustomUnitRateID(
activeTransactionID,
selfDMRateID,
transaction,
policyForMovingExpenses,
false,
policyForMovingExpenses?.outputCurrency ?? personalPolicy?.outputCurrency,
);
}

if (iouType !== CONST.IOU.TYPE.TRACK) {
navigation.setParams({iouType: CONST.IOU.TYPE.TRACK});
}
} else {
if (iouType === CONST.IOU.TYPE.SUBMIT || iouType === CONST.IOU.TYPE.TRACK) {
navigation.setParams({iouType: CONST.IOU.TYPE.CREATE});
}
setMoneyRequestParticipants(activeTransactionID, participantsList);
const firstParticipant = participantsList.at(0);
if (iouType !== CONST.IOU.TYPE.SPLIT && firstParticipant) {
const isPolicyExpenseChatParticipant = !!firstParticipant.isPolicyExpenseChat;

// A brand-new recipient picked by email has no chat yet (no reportID). Reusing the route's `reportID`
// (which points at the flow's origin report - e.g. the default workspace chat this distance flow was
// seeded with) leaves the expense bound to that workspace, so the backend rejects it with
// "There is a previously existing chat between these users." Generate a fresh optimistic reportID for
// P2P recipients, mirroring the legacy participants-step flow (useParticipantSubmission).
const participantReportID = firstParticipant.reportID || (isPolicyExpenseChatParticipant ? reportID : generateReportID());
setTransactionReport(activeTransactionID, {reportID: participantReportID}, true);

// When switching from the auto-assigned default workspace to a P2P recipient we must also undo the
// workspace-specific defaults the distance step applied: reset the mileage rate to the P2P rate and
// clear the workspace's default category (and the category-derived tax). Otherwise the confirmation
// keeps the workspace "Default Rate"/category and the expense stays bound to that workspace. This
// mirrors what the legacy addParticipant/goToNextStep path does when a P2P recipient is selected.
if (!isPolicyExpenseChatParticipant) {
if (isDistanceRequest) {
const p2pRateID = DistanceRequestUtils.getCustomUnitRateID({
reportID: firstParticipant.reportID,
isPolicyExpenseChat: false,
policy: undefined,
lastSelectedDistanceRates,
expenseDate: transaction?.created,
});
setCustomUnitRateID(activeTransactionID, p2pRateID, transaction, undefined, false, personalPolicy?.outputCurrency);
}
setMoneyRequestCategory(activeTransactionID, '', undefined, getCurrencyDecimals);
setMoneyRequestTag(activeTransactionID, '');
} else {
const workspacePolicy = selectedPolicy;
if (isDistanceRequest) {
const currentRateID = transaction?.comment?.customUnit?.customUnitRateID;
const isCurrentRateFromWorkspace = !!currentRateID && !!DistanceRequestUtils.getMileageRates(workspacePolicy)[currentRateID];
if (!isCurrentRateFromWorkspace) {
const workspaceRateID = DistanceRequestUtils.getCustomUnitRateID({
reportID: participantReportID,
isPolicyExpenseChat: true,
policy: workspacePolicy,
lastSelectedDistanceRates,
expenseDate: transaction?.created,
});
setCustomUnitRateID(activeTransactionID, workspaceRateID, transaction, workspacePolicy, false, workspacePolicy?.outputCurrency);
}
}

// Switching to a different workspace: the previous workspace's category and tag no longer apply,
// so reset them to the destination workspace's defaults. This mirrors the legacy participants-step
// flow (useParticipantSubmission.goToNextStep), which resets both on every selection and passes no
// policy so the previous workspace's category-derived tax is cleared along with the category.
if (firstParticipant.policyID && firstParticipant.policyID !== policyID) {
const defaultCategory = isDistanceRequest ? (getDistanceRateCustomUnit(workspacePolicy)?.defaultCategory ?? '') : '';
setMoneyRequestCategory(activeTransactionID, defaultCategory, undefined, getCurrencyDecimals);
setMoneyRequestTag(activeTransactionID, '');
}
}
}
}
if (participantsList.length > 0) {
closeParticipantPicker();
}
};
autoOpenedForTransactionIDRef.current = activeTransactionID;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve picker dismissal across route restoration

When this routed picker is restored directly while a manual draft still has no recipient (for example, after refreshing the browser on the expense-participants URL), the confirmation either mounts behind it without running line 74 or mounts only after Back, so this component-local ref is still undefined. Pressing Back then focuses the confirmation with shouldAutoOpenParticipantPicker still true and immediately navigates to the picker again, meaning repeated Back cannot dismiss it without selecting a recipient; the dismissal/opened state needs to survive route restoration or be marked by the participants route before returning.

Useful? React with 👍 / 👎.

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.

This is very unlikely to happen in real life. It needs a web refresh while the picker is open, on a draft with no recipient and no default one, so I'll leave as is for now.

@jmusial

jmusial commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

@parasharrajat kind bump

@parasharrajat

Copy link
Copy Markdown
Member

THanks for the ping. Will check soon. I was on leave last week.

# Conflicts:
#	src/pages/iou/request/step/IOURequestStepConfirmation/index.tsx
#	tests/unit/components/MoneyRequestConfirmationList/AmountField.test.tsx
@mountiny

mountiny commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@parasharrajat can you review and test this pr please? thanks

@parasharrajat parasharrajat left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

🔲 iOS / native

02.11.2026_19.18.26_REC.mp4

🔲 iOS / Safari

02.11.2026_19.19.52_REC.mp4

🔲 MacOS / Chrome

02.11.2026_18.58.39_REC.mp4

🔲 Android / native

02.11.2026_19.11.53_REC.mp4

🎀 👀 🎀 C+ reviewed

@parasharrajat

Copy link
Copy Markdown
Member

Looks good.

# Conflicts:
#	src/pages/iou/request/step/IOURequestStepConfirmation/useParticipantPickerState.ts

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

(Vit's agent) Requesting changes for one merge blocker. The rest looks good, and the getReportOrDraftReport fixes in the last merge are correct.

Blocker: the branch conflicts with main again and won't typecheck after the merge

main landed Stop predicting a category's tax on the client. It removed the getCurrencyDecimals argument from setMoneyRequestCategory, and the 4th parameter is now isMovingFromTrackExpense?: boolean. I merged main into this branch locally and ran tsc. These are the only errors in this PR's files:

src/hooks/useConfirmationParticipantSelection.ts(154,83): error TS2345: Argument of type '(currencyCode: string | undefined) => number' is not assignable to parameter of type 'boolean | undefined'.
src/hooks/useConfirmationParticipantSelection.ts(177,100): error TS2345: Argument of type '(currencyCode: string | undefined) => number' is not assignable to parameter of type 'boolean | undefined'.

To fix:

  1. Merge main. In useParticipantPickerState.ts, keep this PR's side. The block main edited is the one this PR deletes.
  2. Remove getCurrencyDecimals from the two setMoneyRequestCategory calls in useConfirmationParticipantSelection.ts (lines 154 and 177).
  3. Remove the useCurrencyListActions import and the getCurrencyDecimals line (lines 20 and 62), so lint doesn't flag them as unused.

main made the same change in useParticipantSubmission, so dropping the argument is all that's needed.

Not blocking: one inline note on DynamicIOURequestStepParticipants.tsx about which workspace a new pick is compared against.

});
setCustomUnitRateID(transactionIDToUpdate, p2pRateID, transactionToUpdate, undefined, false, personalPolicy?.outputCurrency);
}
setMoneyRequestCategory(transactionIDToUpdate, '', undefined, getCurrencyDecimals);

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.

(Vit's agent) After merging main, this call and the one on line 177 fail typecheck. main removed getCurrencyDecimals from setMoneyRequestCategory, and the 4th parameter is now isMovingFromTrackExpense?: boolean. Drop the last argument in both calls:

setMoneyRequestCategory(transactionIDToUpdate, '', undefined);

Then remove useCurrencyListActions (line 20) and getCurrencyDecimals (line 62), since nothing else in this hook uses them.

transaction: initialTransaction,
iouType,
reportID,
policyID: getSelectedWorkspacePolicyID(initialTransaction, action) ?? getReportOrDraftReport({reportID})?.policyID,

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.

(Vit's agent) Not blocking. This policyID decides whether a pick clears the category and tag (firstParticipant.policyID !== policyID in useConfirmationParticipantSelection). It no longer matches the value the confirmation passed to the old picker.

The confirmation passed policy?.id from usePolicyForTransaction. For an unreported or self DM expense, that is policyForMovingExpenses. Here the fallback is the route report's policyID. In global create that report is usually optimistic, so the value is undefined or the self DM's _FAKE_ placeholder.

  1. Create a manual expense and pick "You" in "To".
  2. Pick a category. The list comes from the workspace in policyForMovingExpenses (call it W).
  3. Change "To" to W's workspace chat.

Expected: the category stays, as it did with the old picker.
Actual: the category is cleared.

I traced this in the code but did not reproduce it on a device. One way to fix it: resolve the policy here the same way the confirmation does, with usePolicyForTransaction, and pass its id.

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.

@mountiny

mountiny commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

conflicts

jmusial and others added 2 commits November 4, 2026 10:06
@jmusial

jmusial commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

all addressed @mountiny

@jmusial
jmusial requested a review from mountiny November 4, 2026 09:49

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

Thanks for resolving

@mountiny
mountiny merged commit 9f368d2 into Expensify:main Nov 5, 2026
36 of 37 checks passed
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

@OSBotify OSBotify mentioned this pull request Nov 6, 2026
93 tasks done
@OSBotify

OSBotify commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.33-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No FullStory changes needed. This PR refactors existing recipient selection to reuse the existing routed participants screen, preserving tracking identifiers and masking, with screen changes already tracked automatically.


view run

@OSBotify

OSBotify commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/roryabraham in version: 9.5.33-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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.

5 participants