Skip to content

Confirm new expenses with a “View” toast instead of scrolling to and highlighting the row v2 - #100015

Merged
mountiny merged 39 commits into
Expensify:mainfrom
software-mansion-labs:declarative-expense-added-growl-v2
Oct 1, 2026
Merged

mountiny merged 39 commits into
Expensify:mainfrom
software-mansion-labs:declarative-expense-added-growl-v2

Conversation

@mhawryluk

@mhawryluk mhawryluk commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

Explanation of Change

Another attempt after the previous PR has been reverted.

Shows an "Expense added" growl (with a "View" action) after an expense is created from FAB outside of its report‚ as well as when duplicating and splitting expenses on Spend. Removes the highlighting of new expenses in the Spend tab tables completely.

It's driven declaratively by a single ExpenseAddedGrowl component, which watches an Onyx signal that the creation flows write to (same as they did for highlighting). In the #94866 each creation flow triggered the growl and its navigation imperatively, passing values that could go stale before the user tapped "View". Centralizing it in one Onyx-driven component matches main more closely and solves the stale-data problem.

Fixed Issues

$ #91408
PROPOSAL: N/A

Tests

Flows from deploy blockers that caused the revert:

Expense - Report on central pane changes to not here page after deleting same report on RHP

  • Go to workspace chat. > Create an expense.
  • Go to Home. > Open the expense from Recently added section.
  • Click More > Split > Save.
  • Click View on the growl.
  • Close the first expense RHP.
  • On the report RHP, click More > Delete.
  • Verify the report on central pane returns to workspace chat.

Expense - Expense added growl does not appear after changing report and creating expense

  • Go to workspace chat.
  • Create an expense.
  • Create a new empty report.
  • Open FAB > Create expense > Manual.
  • Enter amount > Next.
  • On confirm page, enter merchant.
  • Click Report field.
  • Select the report from Step 3.
  • Click Create expense.
  • Verify the growl is NOT shown if we're in the inbox report view with a list of its expenses

Expense - No Expense added growl after splitting expense from report opened from LHN

  • Go to workspace chat.
  • Create an expense.
  • Open the expense.
  • Send a message to the expense thread.
  • Close the report.
  • Open the expense with message from LHN.
  • Click More > Split > Save.
  • Verify the growl is NOT shown if we're in the inbox report view with a list of its expenses

Report - WS avatar disappears when moving expense opened via growl to another report offline

  • Turn off internet connection.
  • Create a manual expense and submit it to workspace.
  • Tap on "View" on the displayed growl.
  • Tap on "More" > "Move to Report" > "Create Report"
  • Verify that after expense is moved, workspace avatar doesn't disappear from report header.

Expense added growl is not shown after creating per diem expense when submissions are disabled

  • Precondition: Workspace has per diem rates. Disable Submissions in Workflows settings.
  • Open FAB > Create expense > Per diem.
  • Create a per diem expense.
  • Verify the growl is shown.

Android - Expense - Report is opened a second time when tapping on growl after opening it

  • Tap on FAB > "Create Expense"
  • Create a manual expense and submit it to workspace.
  • Open report of the just created expense by tapping on preview.
  • Tap on "View" on growl displayed.
  • Tap on the back button on the top left corner on report.
  • Note that you land on report again.
  • Verify the report is not reopened after tapping on "View" on growl, clicking View just hides the growl and we stay where we are.

Android - Expense - No growl after splitting/bulk duplicating expense

  • Go to Inbox.
  • Create an expense from FAB.
  • Open the expense.
  • Tap More > Split > Save.
  • Verify the growl is NOT shown if we're in the inbox report view with a list of its expenses

Android - Workspace chat opens briefly after opening expense from growl and splitting expense

  • Go to Inbox.
  • Create an expense from FAB.
  • Tap View on Expense added growl.
  • Tap More > Split > Save.
  • Verify app does not return to workspace chat after opening expense from growl and splitting expense.

Expense - Expense added growl is hidden behind Concierge side panel

  • Go to workspace chat.
  • Open Concierge side panel.
  • Create an expense from FAB.
  • Close Concierge side panel.
  • Verify Expense added growl appears on top of Concierge side panel.

Standard test cases:

  1. Growl + "View" from global create (Inbox tab)

    • Go to the Inbox tab.
    • Tap the green + (FAB) button → Create expense.
    • Enter an amount → tap Next → select a workspace/participant → tap Next.
    • On the confirmation page, tap Create expense.
    • Verify a green "Expense added" growl with a "View" button appears.
    • Repeat the steps above for each expense type in the Create expense flow - Manual, Scan (upload a receipt), Distance (add waypoints), and Per diem (on a workspace with per-diem rates enabled).
  2. Growl in the Spend tab

    • Go to a different tab than Inbox.
    • Tap the + (FAB) → Create expense → enter an amount → Next → select a workspace/participant → Next → Create expense.
    • Verify the app lands on the Spend tab, and the same growl + working View appears there. The rows in the table should not be highlighted anymore.
  3. "View" opens the correct destination for the current surface

    • Spend (or any non-Inbox) tab: the new expense's details open in a right-hand panel over the Spend view.
    • Inbox, narrow layout: opens the thread as a full-screen report.
    • Inbox, wide, report with a single expense: the new expense's details open directly in the right-hand panel.
    • Inbox, wide, report with multiple expenses: opens the expense report super-wide with the new expense's thread RHP stacked on top.
    • Inbox, wide, tracked/self-DM expense (no expense report): opens the thread as a full-screen report.
    • With an expense/report already open in the RHP: View replaces it (does not stack a second RHP).
    • After the growl appears, switch to a different tab, then tap View: it navigates per the tab you're on now.
  4. Single growl/single navigation on a batch (skip-confirm multi-scan)

    • First, create one Scan expense for a recipient (FAB → Create expense → Scan → upload a receipt → Next → pick the recipient → Create expense) so the FAB shows a "Scan receipt" quick action for them.
    • Tap the FAB → Scan receipt quick action → add/upload 2 receipts and submit (this path has no confirmation page).
    • Verify navigation happens once (no flicker/double transition) and exactly one "Expense added" growl appears, for the last receipt of the batch.
    • Tap View and verify it opens the last created expense.
  5. Invoice

    • Tap the FAB → Send invoice (requires a workspace with Invoices enabled under More features).
    • Enter an amount → Next → pick a recipient → Next → Send invoice.
    • Verify the growl reads "Invoice sent" and its View button works.
  6. Split an existing expense into multiple (in Spend)

    • Open an existing expense in Spend → tap the ⋮ (more) menu → Split expense.
    • Split it into 2+ expenses and confirm.
    • Verify one "Expense added" growl appears (for the last split transaction); View opens that expense.
    • Do the same in Inbox and verify the growl does not appear.
  7. Bulk duplicate expenses

    • From the Spend table: select 2+ transactions (checkboxes) → "n selected" dropdown → Duplicate expenses.
    • Verify one growl appears; View opens the (last) duplicated expense.
  8. Self-DM expense

    • Tap the FAB → Create expense → enter an amount → Next → select your own account (self-DM) as the recipient → Create expense.
    • Verify the growl appears; View opens the transaction thread as a full-screen report (not an RHP).
    • Afterward, open your self-DM chat, tap the same expense preview, and verify it opens correctly.
  9. Share flow (native only)

    • From another app, Share an image into Expensify → choose submit expense → fill details → submit.
    • Verify a single "Expense added" growl appears after submission with a working View, and navigation happens once.

Offline tests

  • Go offline, then create an expense from the FAB on the Inbox tab (Create expense → amount → Next → participant → Next → Create expense).
  • Verify the "Expense added" growl still appears and View opens the optimistic transaction thread.
  • While offline on the Spend tab, create another expense; verify the list refetches once after you go back online.

QA Steps

Same as tests + offline 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 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.
  • 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
Nagranie.z.ekranu.2026-09-2.o.15.06.37.mov
Nagranie.z.ekranu.2026-09-2.o.14.41.30.mov
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Nagranie.z.ekranu.2026-09-3.o.21.02.18.mov
Nagranie.z.ekranu.2026-09-2.o.15.51.45.mov
Nagranie.z.ekranu.2026-09-1.o.17.08.07.mov
Nagranie.z.ekranu.2026-09-1.o.16.52.10.mov

@melvin-bot

melvin-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx bun ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx bun ./scripts/generateTranslations.ts --compare-ref main

@codecov

codecov Bot commented Sep 1, 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/GlobalModals.tsx 100.00% <100.00%> (ø)
src/ONYXKEYS.ts 100.00% <ø> (ø)
src/components/Search/ChatSearchView.tsx 100.00% <ø> (ø)
src/components/Search/ExpenseFlatSearchView.tsx 100.00% <ø> (ø)
src/components/Search/ExpenseGroupedSearchView.tsx 76.04% <ø> (+5.28%) ⬆️
src/components/Search/ExpenseReportSearchView.tsx 100.00% <ø> (ø)
...ponents/Search/SearchList/ListItem/GroupHeader.tsx 77.47% <100.00%> (ø)
...h/SearchList/ListItem/TransactionGroupListItem.tsx 76.81% <100.00%> (ø)
src/components/Search/TaskSearchView.tsx 100.00% <ø> (ø)
src/components/Search/hooks/useSearchSnapshot.ts 94.94% <100.00%> (-0.43%) ⬇️
... and 30 more
... and 9 files with indirect coverage changes

@mhawryluk

Copy link
Copy Markdown
Member 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: 208954f558

ℹ️ 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/GlobalModals.tsx
@mhawryluk
mhawryluk marked this pull request as ready for review September 3, 2026 19:38
@mhawryluk
mhawryluk requested review from a team as code owners September 3, 2026 19:38
@melvin-bot
melvin-bot Bot requested review from joekaufmanexpensify and situchan and removed request for a team September 3, 2026 19:38
@melvin-bot

melvin-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

@situchan 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/components/Search/SearchList/ListItem/ChatListItem.tsx Outdated
Comment thread src/components/Search/SearchList/ListItem/TaskListItem.tsx Outdated
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

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

@OSBotify

OSBotify commented Oct 1, 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.

@OSBotify OSBotify mentioned this pull request Oct 1, 2026
73 tasks done
@OSBotify

OSBotify commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

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

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

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed. The new "Expense added" growl is an in-app confirmation message, and no article under docs/articles mentions highlighting new expenses on the Spend page, so nothing in an existing article became incorrect.


view run

@mitarachim

Copy link
Copy Markdown

Deploy Blocker issue #102823 is repro on all PRs. Could you please double check if it's not introduced by #100015

@mitarachim

Copy link
Copy Markdown

Deploy Blocker #102831 was identified to be related to this PR.

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #102833 was identified to be related to this PR.

@IuliiaHerets

Copy link
Copy Markdown

Hi @mhawryluk. QA team failed this PR on Android with #99255

1790901045815.View_12.mp4

@unzig21

unzig21 commented Oct 2, 2026

Copy link
Copy Markdown

Deploy Blocker #102845 was identified to be related to this PR.

@mhawryluk

Copy link
Copy Markdown
Member Author

Hi @mhawryluk. QA team failed this PR on Android with #99255

1790901045815.View_12.mp4

this PR should fix it: #102847

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #102848 was identified to be related to this PR.

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #102850 was identified to be related to this PR.

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #102857 was identified to be related to this PR.

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #102889 was identified to be related to this PR.

@OSBotify

OSBotify commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/Julesssss in version: 9.5.1-9 🚀

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.