Skip to content

[CP Staging] Revert "Confirm new expenses with a “View” toast instead of scrolling to and highlighting the row" - #99277

Merged
luacmartins merged 1 commit into
mainfrom
revert-96496-declarative-expense-added-growl
Aug 23, 2026
Merged

luacmartins merged 1 commit into
mainfrom
revert-96496-declarative-expense-added-growl

Conversation

@mountiny

Copy link
Copy Markdown
Contributor

Reverts #96496

Fixed issues

$ #99264
$ #99262
$ #99261
$ #99258
$ #99257
$ #99255
$ #99253
$ #99252
$ #99249
$ #99248

@mountiny mountiny self-assigned this Aug 23, 2026
@mountiny
mountiny requested review from a team as code owners August 23, 2026 20:48
@melvin-bot
melvin-bot Bot requested review from JmillsExpensify and situchan and removed request for a team August 23, 2026 20:48
@melvin-bot

melvin-bot Bot commented Aug 23, 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]

@OSBotify

Copy link
Copy Markdown
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/el.ts b/src/languages/el.ts
index e2c13634..d4091d95 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -1258,7 +1258,6 @@ const translations: TranslationDeepObject<typeof en> = {
             if (count === 0) {
                 return duplicates > 0 ? 'Δεν προστέθηκαν κανόνες εμπόρων, καθώς υπάρχουν ήδη όλοι.' : 'Δεν έχουν προστεθεί κανόνες εμπόρου.';
             }
-
             return {
                 one: 'Προστέθηκε 1 κανόνας εμπόρου.',
                 other: `Έχουν προστεθεί ${count} κανόνες εμπόρων.`,
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 5e635d42..3288b80c 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -1182,7 +1182,6 @@ const translations: TranslationDeepObject<typeof en> = {
             if (count === 0) {
                 return duplicates > 0 ? 'No se han añadido reglas de comerciante, ya que todas ya existen.' : 'No se han añadido reglas de comerciante.';
             }
-
             return {
                 one: 'Se ha añadido 1 regla de comerciante.',
                 other: `Se han añadido ${count} reglas de comerciante.`,
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index f85b3cb1..68401cfd 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -9004,9 +9004,6 @@ ${reportName}`,
             reject: '却下',
             duplicateExpense: () => ({
                 one: '経費を複製',
-                // Japanese has no grammatical plural, so `Intl.PluralRules` selects `other` for every count,
-                // including 1. The single/bulk distinction here is semantic rather than grammatical, so `other`
-                // branches on the count itself to keep 一括 (bulk) on the multi-expense action only.
                 other: (count: number) => (count === 1 ? '経費を複製' : '経費を一括複製'),
             }),
             noOptionsAvailable: '選択した経費グループには利用できるオプションがありません。',

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

@melvin-bot
melvin-bot Bot requested a review from justinpersaud August 23, 2026 20:51
@melvin-bot

melvin-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

@justinpersaud 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 Aug 23, 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% <ø> (ø)
src/ONYXKEYS.ts 100.00% <ø> (ø)
src/components/Search/ChatSearchView.tsx 100.00% <100.00%> (ø)
src/components/Search/ExpenseFlatSearchView.tsx 100.00% <100.00%> (ø)
src/components/Search/ExpenseReportSearchView.tsx 100.00% <100.00%> (ø)
...ponents/Search/SearchList/ListItem/GroupHeader.tsx 76.85% <100.00%> (+0.19%) ⬆️
...h/SearchList/ListItem/TransactionGroupListItem.tsx 75.73% <100.00%> (+0.17%) ⬆️
src/components/Search/TaskSearchView.tsx 100.00% <100.00%> (ø)
src/libs/ExportOnyxState/common.ts 80.95% <ø> (ø)
...s/Navigation/helpers/navigateAfterExpenseCreate.ts 86.95% <ø> (-3.19%) ⬇️
... and 22 more
... and 6 files with indirect coverage changes

@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: 47ece0230e

ℹ️ 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 +301 to +302
if (!ref || !triggeredByHookRef.current || !newSearchResultKey) {
return;

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 Allow manually queued highlights to trigger scrolling

When Search is not already mounted—such as on wide layouts or the narrow-layout slow path—the create action queues a manual highlight before navigating, but triggeredByHookRef remains false because the hook did not observe the transaction being added. Although newSearchResultKeys is populated from the queued ID, this guard prevents scrolling, so an expense outside the visible viewport is never brought into view and its highlight is effectively invisible. Manual highlight keys should be permitted to drive the scroll independently of the auto-refetch trigger.

Useful? React with 👍 / 👎.

Comment on lines +15 to +16
if (!isFromGlobalCreate || isReportTopmostSplitNavigator() || !transactionID) {
return;

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 highlights for LOOKING_AROUND self-DM routing

In the LOOKING_AROUND self-DM global-create flow, navigateAfterExpenseCreate() intentionally treats the user as not being on Inbox and sends them to Search, but this helper still returns whenever the Reports split navigator is topmost. That same context is excluded from Search pre-insertion, so Search mounts only after the transaction exists and cannot auto-detect the addition; without the manual flag, the newly created expense is not highlighted after navigation. This check needs to follow the same LOOKING_AROUND/self-DM exception as the navigation decision.

Useful? React with 👍 / 👎.

@luacmartins
luacmartins merged commit 493585a into main Aug 23, 2026
46 of 51 checks passed
@luacmartins
luacmartins deleted the revert-96496-declarative-expense-added-growl branch August 23, 2026 21:30
@github-actions

Copy link
Copy Markdown
Contributor

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

OSBotify pushed a commit that referenced this pull request Aug 23, 2026
…ense-added-growl

[CP Staging] Revert "Confirm new expenses with a “View” toast instead of scrolling to and highlighting the row"

(cherry picked from commit 493585a)

(cherry-picked to staging by luacmartins)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Aug 23, 2026
@OSBotify OSBotify mentioned this pull request Aug 23, 2026
61 tasks done
@OSBotify

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.

@os-botify

os-botify Bot commented Aug 23, 2026

Copy link
Copy Markdown

🔁 Filed a Staging retest request for deploy blockers #99264, #99262, #99261, #99258, #99257, #99255, #99253, #99252, #99249, #99248 after this PR was cherry-picked to staging.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.4.59-1 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 No help site changes required.

This PR reverts #96496, restoring the previous behavior where a newly confirmed expense scrolls to and highlights its row instead of showing a View toast. That is an internal UI micro-interaction (toast/growl vs scroll-and-highlight) — it isn't described in any article under App/docs/articles.

How I verified
  • Reviewed the PR diff: changes are confined to app code/tests (ExpenseAddedGrowl, Search list items, useSearchHighlightAndScroll, IOU navigation helpers) and removal of the growl string from src/languages/*.ts. No user-facing feature, setting, or workflow is added or removed — the UX simply returns to its prior form.
  • Searched App/docs/articles for growl, toast, and expense scroll/highlight behavior — no article documents either the toast or the highlight interaction. The only "highlight" matches are unrelated (Concierge spend insights, QBO/Intacct export-error docs).

Since no article describes this behavior, there's nothing to update and I did not create a draft PR.

@mountiny, let me know if you expected an article to cover this confirmation behavior and I'll take another look.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/AndrewGable in version: 9.4.59-5 🚀

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

Bundle Size Analysis (Sentry):

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.4.60-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 I reviewed the changes and no help site changes are required under App/docs/articles, so I did not create a docs PR.

Why: This PR reverts #96496. That change had replaced the "scroll to and highlight the newly-added expense row" confirmation with a transient Expense added toast (the ExpenseAddedGrowl component) that had a View action. This revert removes the toast and restores the scroll-and-highlight behavior.

Both the toast and the restored scroll-and-highlight are transient UI feedback shown right after creating an expense — a momentary micro-interaction, not a documented feature. I searched App/docs/articles for the affected surfaces ("toast", "growl", "highlight", "View", "expense added") and confirmed no help article describes either the old or the restored confirmation behavior. Articles such as Add an expense document how to create an expense, not the transient confirmation that appears afterward, so there's nothing to update.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/AndrewGable in version: 9.4.60-2 🚀

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

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants