Skip to content

Open the agent DM via an optimistic reportID - #95631

Open
mjasikowski wants to merge 25 commits into
mainfrom
agent-dm-optimistic-reportid
Open

Open the agent DM via an optimistic reportID#95631
mjasikowski wants to merge 25 commits into
mainfrom
agent-dm-optimistic-reportid

Conversation

@mjasikowski

@mjasikowski mjasikowski commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Enables opening agent DM immediately after creation

Depends on

Fixed Issues

$ #94395

Tests

  1. Create a new agent (Settings > Agents > Create Agent)
  2. Verify you're taken directly to a DM with the new agent, immediately after tapping "Create"
  3. Verify the DM shows the agent's welcome message once it arrives
  4. Repeat with an avatar image and with a policy selected
  • Verify that no errors appear in the JS console

Offline tests

  1. Turn off your network connection
  2. Create a new agent
  3. Verify you're taken directly to the (offline) DM immediately, exactly as when online
  4. Reconnect and verify the DM reconciles normally (welcome message appears, no duplicate/broken reports)

QA Steps

Same as Tests. Requires the two backend PRs above to be deployed to staging/production first.

  • 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 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 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)
  • 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.
  • 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

…identity

Generate the owner<->agent DM's reportID client-side, the same way any
other new chat's reportID is generated, and write the DM to Onyx
optimistically alongside the agent itself. CreateAgent (see
Expensify/Auth#22772 and Expensify/Web-Expensify#54367) creates the DM
under that exact reportID, so the client can navigate to it immediately
after submitting, online or offline, without waiting for the response
or reconstructing the agent's identity from Onyx collection diffs.

This replaces the previous approach of polling the agent-prompt
collection to detect the newly created agent, which produced multiple
race-condition bugs across review rounds.
dismissModal() and the delayed navigate() were scheduled independently via
setTimeout + isNavigationReady(), which only checks the nav ref exists and
doesn't wait for the dismiss transition to settle. Under load (e.g. creating
several agents in quick succession) the dismissal's own delayed navigation
could land after our navigate() and send the user back to the previous
screen instead of the report they just opened.

Sequence the navigate through dismissModal's afterTransition callback
instead, matching the existing dismissModalWithReport pattern.
getDisplayNameForParticipant short-circuited to the formatted login for
any optimistic personal detail, on the assumption that a login is the only
thing known about it (true for invite-by-email flows). Agent creation is
different: the display name the user chose is already known, but login is
intentionally omitted (it's server-assigned), so the DM title resolved to
an empty string.

Since CREATE_AGENT's response usually lands within a second online, this
was an imperceptible flicker there, but offline the write stays queued
indefinitely and the blank title persists.

Only take the login-based shortcut when no display name is already known,
which existing optimistic-personal-detail callers already set to the same
value as the login anyway, so their behavior is unchanged.
@codecov

codecov Bot commented Jul 9, 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/SCREENS.ts 100.00% <ø> (ø)
src/libs/Navigation/linkingConfig/config.ts 66.66% <ø> (ø)
src/libs/ReportUtils.ts 86.59% <100.00%> (+0.45%) ⬆️
src/libs/actions/Agent.ts 67.04% <100.00%> (+1.98%) ⬆️
src/pages/inbox/HeaderView.tsx 97.00% <100.00%> (+0.03%) ⬆️
src/pages/settings/Agents/AddAgentPage.tsx 93.42% <100.00%> (+0.17%) ⬆️
src/ROUTES.ts 22.22% <0.00%> (+0.15%) ⬆️
src/components/Tables/AgentsTable/index.tsx 0.00% <0.00%> (ø)
...on/AppNavigator/Navigators/RightModalNavigator.tsx 0.00% <0.00%> (ø)
src/pages/settings/Agents/AgentsPage.tsx 76.63% <71.42%> (-0.79%) ⬇️
... and 97 files with indirect coverage changes

Matches the Auth/Web-Expensify rename: CreateAgent's primary subject is the
agent account, not a report, so the owner<->agent DM's client-supplied ID
follows the optimisticReportID naming SharePolicy and
MoveIOUReportToExistingPolicy already use for the same kind of auxiliary,
side-effect report ID.
dismissModalWithReport is the established pattern for "dismiss the modal and
open a report" (used by WorkspaceNewRoomPage, NewChatPage, Split, TeachersUnite,
etc.) and already sequences the navigate through dismissModal's afterTransition
correctly, so it isn't affected by the race that motivated exporting and
patching navigateToReport. That patch is no longer needed, so revert
navigateToReport back to its prior implementation and drop its export.
createAgent() already builds an optimistic CREATED action for the DM
report (reportActions_<optimisticReportID>), but left its ID random and
never forwarded it, so the server generated a different, duplicate CREATED
action instead of reconciling onto the client's optimistic one.

Generate the ID up front and pass it as createdReportActionID, the same way
openReport() forwards its optimistic CREATED action's ID.
Preserve the deferred write and post-create navigation changes while retaining
the upstream 1-to-2 transaction highlighting logic so creating a distance
expense continues to navigate and highlight the new transaction correctly.
…eportid

# Conflicts:
#	src/libs/ReportUtils.ts
#	tests/unit/ReportUtilsTest.ts
@mjasikowski
mjasikowski marked this pull request as ready for review July 20, 2026 11:50
@mjasikowski
mjasikowski requested review from a team as code owners July 20, 2026 11:50
@melvin-bot
melvin-bot Bot requested review from eVoloshchak and heyjennahay and removed request for a team July 20, 2026 11:50
@melvin-bot

melvin-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

@eVoloshchak 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 removed the request for review from a team July 20, 2026 11:50

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

ℹ️ 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 thread src/libs/actions/IOU/Split.ts Outdated
Comment on lines +2248 to +2252
if (shouldHandleNavigation) {
const navigationActiveReportID = backToReport ?? activeReportID;
highlightTransactionOnSearchRouteIfNeeded(isFromGlobalCreate, parameters.transactionID, CONST.SEARCH.DATA_TYPES.EXPENSE);
handleNavigateAfterExpenseCreate({
activeReportID: navigationActiveReportID,

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 Avoid navigating before distance callers clean up

The current distance submit callers still own post-submit navigation: for example, useExpenseSubmission.ts calls createDistanceRequestIOUActions(...) and then immediately calls performPostBatchCleanup(...), which delegates to cleanupAndNavigateAfterExpenseCreate. Since none of the callers pass the new shouldHandleNavigation/backToReport fields, this default-true block now runs handleNavigateAfterExpenseCreate first and the caller navigates again afterward, which can double-dismiss/race the modal flow and ignore the caller's backToReport target for distance expenses.

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.

Weird conflict resolution and some unwanted changes slipped in

@mjasikowski mjasikowski changed the title Open the agent DM via an optimistic reportID instead of guessing its identity Open the agent DM via an optimistic reportID Jul 20, 2026
@eVoloshchak

eVoloshchak commented Jul 22, 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 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
    • 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
    • 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 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
screen-20260803-002656-1785709587636.mp4
Android: mWeb Chrome
Screen.Recording.2026-08-03.at.00.09.11.mov
iOS: HybridApp
Screen.Recording.2026-08-03.at.00.05.37.mov
iOS: mWeb Safari
Screen.Recording.2026-08-03.at.00.07.22.mov
MacOS: Chrome / Safari
Screen.Recording.2026-08-03.at.00.10.00.mov
Screen.Recording.2026-08-03.at.00.09.35.mov

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

The code looks good and this works well!
I think the animation could be improved a bit, though. Currently, the following happens

  1. You create a new agent (Settings > Agents > Create Agent)
  2. The create agent page/model is closed, you're navigated back to agents page
  3. After a small delay you're navigated to the agent DM

This isn't critical, but we could navigate directly to the agent Dm witout closing the create agent page. That's how it works when creating a workspace, you're navigated directly to the workspace settings after pressing create (video below)

Screen.Recording.2026-07-22.at.22.27.58.mov

Reveal the DM route under the AddAgentPage modal before dismissing,
instead of dismissing to the agents list first and navigating
afterward. Matches the pattern used for workspace creation and
expense submission navigation.
@mjasikowski
mjasikowski requested review from a team and stephanieelliott as code owners July 23, 2026 12:35
@shawnborton

Copy link
Copy Markdown
Contributor

Hmm cc @Expensify/design @Expensify/product for eyes on this - I don't feel strongly but it does feel slightly odd that you are navigated away from Account as soon as you create an agent. Maybe it makes more sense to open up the agent DM in the RHP next to Account?

Resolved AddAgentPage.tsx / AddAgentPageTest.tsx conflicts between
this PR's optimistic-reportID navigation and main's Onyx-based avatar
draft management, keeping both.
@mjasikowski

mjasikowski commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

There's a ad-hoc web build cache problem, so it still uses old files. I'll find someone to fix it

@mjasikowski

Copy link
Copy Markdown
Contributor Author

@MelvinBot merge main and resolve conflicts

…eportid

Co-authored-by: Michał Jasikowski <mjasikowski@users.noreply.github.com>

# Conflicts:
#	src/pages/settings/Agents/AddAgentPage.tsx
@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Merged main and resolved the conflict. Pushed as 2360cab.

One conflicting file: src/pages/settings/Agents/AddAgentPage.tsx

The two sides were orthogonal, so I kept both:

  • From main: the landscape refactor — useIsInLandscapeMode() hook → isInLandscapeModeUtil(windowWidth, windowHeight), plus useKeyboardState/isKeyboardActive/shouldShrinkPromptInput for keyboard-aware prompt shrinking.
  • From this PR: the getIsNarrowLayout import + its use in handleSubmit, and the {accountID: ownerAccountID, login: ownerLogin, displayName} destructure feeding the optimistic-reportID createAgent call.

npm run typecheck-tsgo passes clean. The PR is no longer conflicting (MERGEABLE).

Resolved lines
const {isKeyboardActive} = useKeyboardState();
const isInLandscapeMode = isInLandscapeModeUtil(windowWidth, windowHeight);
const shouldUseScrollableLayout = isInLandscapeMode || (isMobile() && windowWidth > windowHeight);
const shouldShrinkPromptInput = shouldUseScrollableLayout && isKeyboardActive;
const {accountID: ownerAccountID, login: ownerLogin, displayName} = useCurrentUserPersonalDetails();

Imports kept both getIsNarrowLayout and isInLandscapeModeUtil; the now-unused useIsInLandscapeMode hook import was dropped (main removed it as part of the refactor).

Please re-verify the Test steps since main touched this file's layout logic.

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@mjasikowski

mjasikowski commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

@dubielzyk-expensify @dannymcclain @shawnborton check out the latest web ad hoc here and let me know how this works for you

Screenshot 2026-07-28 at 13 47 50

@shawnborton

Copy link
Copy Markdown
Contributor

I think that feels okay? It's so abrupt (which I guess is good). Maybe we can highlight the row being added to the table in the background? We already do that pattern when adding expenses to a table, etc.

@dubielzyk-expensify

Copy link
Copy Markdown
Contributor

Would we consider making the Chat buttons also open it in the RHP or do we want that to go to Inbox still?

@mjasikowski

Copy link
Copy Markdown
Contributor Author

@MelvinBot merge main and resolve conflict

…eportid

Co-authored-by: Michał Jasikowski <mjasikowski@users.noreply.github.com>

# Conflicts:
#	src/pages/settings/Agents/AddAgentPage.tsx
#	tests/unit/pages/settings/AddAgentPageTest.tsx
@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Merged main and resolved the conflicts. Pushed as merge commit ed0b818.

Two files conflicted — both because main reworked AddAgentPage concurrently with this PR:

src/pages/settings/Agents/AddAgentPage.tsx — I combined both sides:

  • Kept main's layout refactor (useIsInLandscapeMode(), dropped the useKeyboardState/shouldShrinkPromptInput/CollapsibleHeaderOnKeyboard scroll logic) and its template support (template?.name/template?.prompt defaults, clearNewAgentTemplate()).
  • Kept this PR's optimistic-reportID flow (ownerAccountID/ownerLogin args + getIsNarrowLayout() reveal/navigate). This side is mandatory: the auto-merged createAgent already carries this PR's new signature (returns optimisticReportID, takes owner args), so main's old createAgent(...)/dismissModal() submit path would no longer compile.
  • Net handleSubmit: create the agent with owner args → clearNewAgentTemplate() + clearNewAgentAvatarDraft() → reveal the DM (narrow) or navigate to the RHP DM (wide).

tests/unit/pages/settings/AddAgentPageTest.tsx — aligned to the merged runtime:

  • Merged the mocks/beforeEach from both sides (mockIsNarrowLayout + mockTemplate + owner personal details).
  • Kept this PR's submit-branching tests (owner args, revealRouteBeforeDismissingModal, wide-layout navigate) and folded main's clearNewAgentTemplate() assertion into the primary submit test.
  • Dropped two now-obsolete main tests that contradicted the merged behavior: the dismissModal/goBack "dismisses the whole creation flow" test, and a duplicate policyID test still using the old createAgent signature.
Note on verification

I couldn't execute the Jest runner in this environment, so the merged unit test wasn't run locally — CI will validate it. I did confirm the tree is free of conflict markers, all referenced symbols exist post-merge, and the test assertions match the merged createAgent signature and navigation behavior.

@shawnborton

Copy link
Copy Markdown
Contributor

Would we consider making the Chat buttons also open it in the RHP or do we want that to go to Inbox still?

I could go either way. For all other profile views (the Details view in RHP), I think the "Message User" row goes to the Inbox. No strong feelings here.

Since the RHP approach keeps the Agents table visible underneath the
new agent's DM, forward a ref from AgentsTable and use it to highlight
(and scroll to) the new row once it appears, mirroring the same
pattern already used for newly-invited workspace members in
WorkspaceMembersPage.
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@dubielzyk-expensify

dubielzyk-expensify commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Cool. One thing though, aren't we supposed to have a back arrow here and not an X in the top right. I thought the top right X was only reserved for Concierge RHPs as that's something you can kinda pin to the side. I believe we want a regular back arrow here. @Expensify/design for gut check

CleanShot 2026-07-30 at 09 20 14@2x

@mjasikowski

Copy link
Copy Markdown
Contributor Author

per @shawnborton:

I would think that back arrow should just close the pane, or maybe even better, we reuse what we do for Concierge with an "X" in the top right

X makes more sense IMO, because the agent is already created at that point and the back arrow usually means "one step back" - and that would be the agent description prompt

@dubielzyk-expensify

Copy link
Copy Markdown
Contributor

Sorry for missing that. Fair enough 👍

Settings uses a split navigator on wide layouts, so AgentsPage is the
central pane and stays mounted/visible while the new agent's DM opens
in the RHP alongside it, but react-navigation reports it as unfocused
in that state (unlike WorkspaceMembersPage, which returns to being the
focused screen after its invite modal is dismissed). Gating on
useIsFocused silently skipped the highlight every time.
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
Built from App PR #95631.

Android 🤖 iOS 🍎
❌ FAILED ❌ https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-ios-device-AdHoc-2ca5970-87b05b5-222015b20e137502949daab4d6eef51893b6810a/index.html
The QR code can't be generated, because the Android build failed iOS
Web 🕸️
https://95631.pr-testing.expensify.com
Web

👀 View the workflow run that generated this build 👀

@mjasikowski

Copy link
Copy Markdown
Contributor Author

Failing test is unrelated.
@eVoloshchak can you please give this one more pass?

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

LGTM!

@melvin-bot
melvin-bot Bot requested a review from chuckdries August 2, 2026 22:28
@melvin-bot

melvin-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown

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

Comment thread src/ROUTES.ts
getRoute: (accountID: number) => `settings/agents/${accountID}/edit/avatar` as const,
},
AGENT_REPORT: {
route: 'settings/agents/report/:reportID',

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.

this is definitely a NIT but can we make the route settings/agents/r/:reportID? Just for consistency with the main inbox report route

Comment thread src/libs/ReportUtils.ts
// (e.g. an agent pending creation, or an imported device contact) fall through to the normal name
// resolution below instead, so that name is shown rather than an empty/placeholder login.
if (personalDetails.isOptimisticPersonalDetail === true && !personalDetails.displayName) {
return formattedLogin;

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.

This seems like it probably has a wide blast radius, is it strictly necessary? If I'm reading the comment right, pending agents don't take this codepath, so why are we changing the return value here

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.

7 participants