Skip to content

Issue 86223 update cta and workspace chat copy for track intent users#92254

Open
jayeshmangwani wants to merge 19 commits into
Expensify:mainfrom
jayeshmangwani:issue-86223-update-CTA-and-Workspace-Chat-Copy-For-Track-intent-users
Open

Issue 86223 update cta and workspace chat copy for track intent users#92254
jayeshmangwani wants to merge 19 commits into
Expensify:mainfrom
jayeshmangwani:issue-86223-update-CTA-and-Workspace-Chat-Copy-For-Track-intent-users

Conversation

@jayeshmangwani
Copy link
Copy Markdown
Contributor

Explanation of Change

For users who onboarded with the Organize my personal spending / Track expenses for my business intent (PERSONAL_SPEND / TRACK_WORKSPACE), the product copy still uses generic expense management language. This PR updates three areas to reflect the track-intent workflow:

  1. Workspace chat welcome text — changed from "This is where X will submit expenses to Y" to "This is where you'll track expenses."
  2. CTA buttons — Submit buttons now display "Mark as done" instead of "Submit" (and "Done" in search list items). The Approve button also shows "Mark as done" for these users.
  3. System messages — "submitted" and "approved" messages now display "marked as done"
  4. Submit animation — The post-submit status text shows "Marked as done" instead of "Submitted"
  5. LHN action badges — The Submit action badge shows "Mark as done" instead of "Submit"
  6. Search bulk actions — The bulk Submit option shows "Mark as done" for track-intent users

These changes only apply when both conditions are met:

  • The user selected "Organize my personal spending" / "Track expenses for my business" during onboarding (TRACK_WORKSPACE or PERSONAL_SPEND)
  • The workspace policy has submit-and-close approval mode (no approvals)

Fixed Issues

$ #86223
PROPOSAL: #86223 (comment)

Tests

Test 1:

  1. Create a new account and select "Organize my personal spending" / "Track expenses for my business" during onboarding
  2. Navigate to the workspace chat and verify the welcome text says "This is where you'll track expenses."
  3. Create an expense in the workspace
  4. Verify the Submit CTA says "Mark as done"
  5. Click "Mark as done" and verify the animation status shows "Marked as done" and the system message says "marked as done"
  6. Open Search, find a submittable expense, and verify the action button shows "Done"
  7. Select multiple submittable expenses in Search and verify the bulk Submit action says "Mark as done"
  8. Check the LHN and verify the action badge for a submittable report says "Mark as done"
  9. Log in with a different account that selected "Manage team expenses" during onboarding
  10. Verify all standard copy appears: "Submit", "submitted", and the normal workspace chat welcome message

Test 2:

  1. Go to staging.new.expensify.com
  2. Log in with new Gmail account.
  3. Skip work email step.
  4. Select "Organize my personal spending" / "Track expenses for my business".
  5. Complete the onboarding.
  6. Go to workspace chat.
  7. Create an expense.
  8. Open the report.
  9. Click Mark as done.
  10. Right click on "marked as done" system message > Copy to clipboard.
  11. Paste the content.
  12. Verify that "marked as done" will be pasted.

Test 3:

  1. Go to staging.new.expensify.com
  2. Log in with new Gmail account.
  3. Skip work email step.
  4. Select "Organize my personal spending" / "Track expenses for my business".
  5. Complete the onboarding.
  6. Go to workspace settings > Members.
  7. Invite a member to the workspace.
  8. Go to Inbox.
  9. Open search router.
  10. Open member's workspace chat.
  11. Verify that Member's workspace chat should display "This is where X will track expenses to Workspace. Just use the + button.".

Test 4:

Prerequisites:

  • "Organize my personal spending" / "Track expenses for my business" selected during onboarding.
  • Account has at least one workspace.
  • Approvals and payments disabled.

Steps:

  1. Open the Expensify app.
  2. Navigate to "Reports" > "Expenses"
  3. Turn off internet connection.
  4. Create a manual expense and submit it to workspace.
  5. Verify that expense is created while on "Expenses" section while offline, action button on preview, should display "Done", if workspace has approvals and payments disabled.

Test 5:

  1. Go to staging.new.expensify.com
  2. Log in with new Gmail account.
  3. Skip work email step.
  4. Select Organize my personal spending / Track expenses for my business
  5. Complete the onboarding.
  6. Go to workspace chat.
  7. Create an expense.
  8. Open the report.
  9. Click Mark as done.
  10. Verify that Mark as done button will change to Marked as done in the expense report.

Test 6:

Prerequisite:

  • Login new gmail account via track & budget expense

Steps:

  1. Launch app
  2. Open workspace chat
  3. Create track distance manual expense
  4. Long press preview and select hold
  5. Hold the expense entering a reason
  6. Open the expense - header and pin the report
  7. Navigate back to LHN and open the chat
  8. Tap more - mark as done
  9. Note header shows hold message after mark as done.
  10. Note system message below shows mark as done as last message
  11. Verify that: After marking the held expense as done, the header must not show the hold message and the LHN would reflect the correct latest status ('marked as done')

Test 7:

  1. Go to staging.new.expensify.com
  2. Log in with new Gmail account.
  3. Skip work email step.
  4. Select Organize my personal spending / Track expenses for my business
  5. Complete the onboarding.
  6. Create another workspace and enable approvals.
  7. Create an expense in both workspace chats.
  8. Go to Reports > Reports.
  9. Bulk select both reports.
  10. Click dropdown button.
  11. Verify that Dropdown button will not show Submit since one of the reports can only be marked as done instead of submitting.

Test 8:

Prerequisite:

  • Log in with a Track Expense-enabled user.

Steps:

  1. Go to the Workspace Chat.
  2. Create an expense.
  3. Open the expense.
  4. Verify that the Mark as Done button is displayed.
  5. Click More > Hold.
  6. Enter a reason and save it.
  7. Click the More menu.
  8. Verify that the Mark as Done option is displayed in the More menu.
  • Verify that no errors appear in the JS console

Offline tests

Same as Tests

QA Steps

Same as Tests

  • 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 any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented Jun 1, 2026

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 ts-node ./scripts/generateTranslations.ts --help

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

@jayeshmangwani
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

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

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: 958b6c0981

ℹ️ 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/hooks/useSearchBulkActions.ts Outdated
options.push({
icon: expensifyIcons.Send,
text: translate('common.submit'),
text: selectedReports.length > 0 && allReportsShouldMarkAsDone ? translate('common.markAsDone') : translate('common.submit'),
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 Use Mark as done for transaction bulk submits

When a track-intent user selects submit-able transaction rows rather than report rows, selectedReports.length is 0, so this always labels the bulk action as Submit even when every selected transaction belongs to a report where the per-row CTA is now Done/Mark as done. This leaves the search bulk CTA out of the new copy for transaction-search selections; derive the mark-as-done state from the selected transactions' report IDs as well, and apply the same mixed-selection guard there.

Useful? React with 👍 / 👎.

@jayeshmangwani
Copy link
Copy Markdown
Contributor Author

@MelvinBot, why is the tests/unit/NextStepUtilsTest.ts test failing? Which changes in this PR are affecting that test?

@MelvinBot
Copy link
Copy Markdown
Contributor

Root cause: The change to the "Self review" branch in buildNextStepNew (src/libs/NextStepUtils.ts:650) is what breaks the test. That branch previously read:

text: hasTransactions ? 'submit' : 'add',

and this PR replaced it with:

text: shouldShowMarkAsDoneCopy ? 'mark this as done' : 'submit',

This dropped the 'add' fallback for reports with no transactions. The non‑track‑intent path now always returns 'submit'.

The failing test Correct next steps message (NextStepUtilsTest.ts:94) builds an empty report with no transactions (buildOptimisticEmptyReport), so hasTransactions is false and it expects the word 'add'. With the ternary removed, the code now returns 'submit':

   Object {
-    "text": "add",       <- expected by the test
+    "text": "submit",    <- produced by the new code
   },

The test file itself wasn't touched in this PR — only NextStepUtils.ts — so this is a behavior regression, not a stale assertion.

Recommended fix: restore the hasTransactions fallback inside the non‑mark‑as‑done branch:

text: shouldShowMarkAsDoneCopy ? 'mark this as done' : hasTransactions ? 'submit' : 'add',
Why only this block (and not the isReopen / Manual submission blocks)

The other two blocks you changed in the same file only ever emitted 'submit' (they never had the hasTransactions ? 'submit' : 'add' distinction), so swapping 'submit'shouldShowMarkAsDoneCopy ? 'mark this as done' : 'submit' there is behavior‑preserving for non‑track users. The Self review block is the only one that carried the empty‑report 'add' copy, which is exactly the scenario this test exercises.


Next Steps: Reply with @MelvinBot implement this to push the one-line fix to this PR, or @MelvinBot <feedback> to refine.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

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/CONST/index.ts 93.79% <ø> (ø)
...NOptionsList/OptionRowLHN/OptionRow/ErrorBadge.tsx 100.00% <100.00%> (ø)
...HNOptionsList/OptionRowLHN/OptionRow/InfoBadge.tsx 100.00% <100.00%> (ø)
...HNOptionsList/OptionRowLHN/OptionRow/Pressable.tsx 92.68% <100.00%> (ø)
...nents/LHNOptionsList/OptionRowLHN/OptionRowLHN.tsx 100.00% <100.00%> (ø)
...s/LHNOptionsList/OptionRowLHN/OptionRowLHNData.tsx 87.83% <100.00%> (+0.33%) ⬆️
src/components/ReportWelcomeText.tsx 96.72% <100.00%> (+0.11%) ⬆️
src/components/utils/getActionBadgeText.ts 100.00% <100.00%> (ø)
src/hooks/useSearchTypeMenuSections.ts 87.03% <ø> (-0.24%) ⬇️
src/hooks/useSelectionModeReportActions.ts 85.96% <100.00%> (+0.08%) ⬆️
... and 20 more
... and 40 files with indirect coverage changes

@jayeshmangwani jayeshmangwani marked this pull request as ready for review June 3, 2026 13:39
@jayeshmangwani jayeshmangwani requested review from a team as code owners June 3, 2026 13:39
@melvin-bot melvin-bot Bot requested review from ZhenjaHorbach and heyjennahay and removed request for a team June 3, 2026 13:39
@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented Jun 3, 2026

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

Copy link
Copy Markdown

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

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: e7db15ea83

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

options.push({
icon: expensifyIcons.Send,
text: translate('common.submit'),
text: allReportsShouldMarkAsDone ? translate('common.markAsDone') : translate('common.submit'),
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 marking transaction-only submits as done

For transaction-only selections selectedReports is empty, so allReportsShouldMarkAsDone comes from selectedReports.every(...) and is true by vacuous truth. That makes every transaction search bulk-submit CTA render as “Mark as done”, even for non-track users or reports that should still say “Submit”; derive this label from the selected transactions' reports or guard the report-only boolean with selectedReports.length > 0.

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.

@MelvinBot any suggestion for this comment, If we add the selectedReports.length > 0 length check here, we got this comment #92254 (comment), and do you think this change is needed here ?

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 two bot comments aren't actually contradictory — they're two symptoms of the same root cause, and the selectedReports.length > 0 guard does fix a real bug.

Root cause: allReportsShouldMarkAsDone is selectedReports.every(...), which is true by vacuous truth when selectedReports is empty (i.e. transaction-row selections). So at line 1473 a transaction-only selection always renders "Mark as done" — even for non-track users. That's the regression r3348950734 is flagging, and it's worth fixing.

So yes, add the guard:

text: selectedReports.length > 0 && allReportsShouldMarkAsDone ? translate('common.markAsDone') : translate('common.submit'),

This restores "Submit" for every transaction-only selection. Report-row selections are unaffected (length is truthy, and that branch is already guarded inside shouldShowSubmitOption).

About the opposite comment (r3346664959): it only matters if you intend track-intent transaction-row selections to also show "Mark as done". That's beyond this PR's scope — the feature is built around report-row selection (see Test 7), so treating transaction-row selections as plain "Submit" is a reasonable, intentional limitation, and that bot nit can be dismissed. This is the same scoping call you already made for the approve case in useSelectionModeReportActions.ts.

If you do want to support it later, the clean way is to derive the state from selectedTransactionReportIDs (already computed) when selectedReports is empty, rather than hardcoding "Submit" — but that's optional and not needed to ship this PR.

if (hasSubmitAction && !shouldBlockSubmit) {
actions[idx++] = {
text: translate('common.submit'),
text: shouldShowMarkAsDone({policy, report, isTrackIntentUser}) ? translate('common.markAsDone') : translate('common.submit'),
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 Apply Mark as done copy to approve selection actions

This only updates the submit entry in the report selection toolbar, but the approve entry in the same selectionModeReportLevelActions still uses translate('iou.approve'). For a track-intent submit-and-close report where the user is also the next approver, selecting all expenses exposes the APPROVE action via MoneyRequestReportView/SelectionToolbar, so this path still shows “Approve” while the header/dropdown primary actions now show “Mark as done”.

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.

It's fine not to use it for the approve case, since we won't have a scenario where the policy is set to "submit and close" and the "Approve" button is displayed at the same time.

@jayeshmangwani
Copy link
Copy Markdown
Contributor Author

Sorry for the ping, @ZhenjaHorbach . @mananjadhav will review this PR, as previous PR was reverted and had already been reviewed by Manan.

@jayeshmangwani
Copy link
Copy Markdown
Contributor Author

@mananjadhav, I was thinking that we should temporarily add a feature flag to control the "Mark as done" functionality.

Since it's currently enabled, having a flag would allow us to quickly disable it if this PR ends up causing multiple regressions. That way, we wouldn't need to revert the PR or raise another large PR with extensive changes. Instead, we could simply disable the feature and focus on fixing the regressions.

WDYT ?

@dylanexpensify dylanexpensify requested review from mananjadhav and removed request for ZhenjaHorbach June 3, 2026 18:23
@jayeshmangwani
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

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

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: ceaf2366ae

ℹ️ 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/hooks/useSearchBulkActions.ts Outdated
Comment on lines 1500 to 1504
(selectedReports.length
? selectedReports.every((report) => report.canSubmit)
? selectedReports.every((report) => report.canSubmit) &&
// Disable for mixed selections: all must be the same submit type
(isTrackIntentUser ? allReportsShouldMarkAsDone || noReportsShouldMarkAsDone : true)
: selectedTransactionsKeys.every((id) => selectedTransactions[id].action === CONST.SEARCH.ACTION_TYPES.SUBMIT));
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 Disable mixed submit/done transaction selections

When the selection comes from transaction rows, selectedReports.length is zero, so this branch only checks that every row has the SUBMIT action and ignores the new allReportsShouldMarkAsDone || noReportsShouldMarkAsDone guard. A track-intent user can therefore select transactions from both a submit-and-close/self report and a regular submit report and still get one bulk Submit option, even though the report-selection path explicitly disables mixed submit types; apply the same mark-as-done consistency check to the transaction branch.

Useful? React with 👍 / 👎.

@jayeshmangwani
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

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

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: 35eb6ffcf3

ℹ️ 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 +45 to +52
if (
shouldShowMarkAsDone({
isTrackIntentUser,
policy,
report: originalReport,
})
) {
return <ReportActionItemBasicMessage message={translate('iou.markedAsDone', getOriginalMessage(action)?.message)} />;
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 automatic-submit/DEW messages before mark-done copy

For track-intent submit-and-close reports, this new early return runs before the existing wasSubmittedViaHarvesting and pending DEW checks, so an auto-submitted or queued-DEW submit action is rendered as “marked as done” instead of “automatically submitted” / “queued to submit via DEW”. The LHN/copy-message paths still check harvesting/DEW first, so the main report action content becomes inconsistent and hides the explanation for those environments.

Useful? React with 👍 / 👎.

Comment thread src/libs/NextStepUtils.ts Outdated
text: actionText,
},
{
text: shouldShowMarkAsDoneCopy ? '.' : ' %expenses.',
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 Keep the expense noun when the report is empty

When a track-intent submit-and-close report has no transactions, shouldShowMarkAsDoneCopy can still be true because shouldShowMarkAsDone does not check hasTransactions, while actionText remains add. This line then drops the %expenses. suffix and renders the deprecated next step as “Waiting for … to add.” instead of “Waiting for … to add expenses.”

Useful? React with 👍 / 👎.

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.

2 participants