Skip to content

[$250] Taxes - System-generated messages are missing in thread after updating tax settings #81791

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v9.3.15-8
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #65320
Email or phone of affected tester (no customers): n/a
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 15.4.1 Safari, Chrome, iPhone 13 iOS 26.2.1
App Component: Workspace Settings

Action Performed:

  1. Go to https://staging.new.expensify.com
  2. Create a woekspace
  3. Enable Taxes in More Features
  4. Add new Rate >> name and add the new Value then Save it
    5.Tap Settings >> select New Rate for Workspace currency default
  5. Tap Settings >> Custom tax name >> Enter new name and sace it
  6. Navigate to the Admins room
  7. Open threads

Expected Result:

All changes should be dispayed in the system-generated thread

Actual Result:

Not all system-generated messages are displayed in the thread after changing tax settings. The number of thread messages does not correspond to the thread reply count. The system messages "Changed the tax code value" and "Changed the custom tax name" are missing.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mkhutornyi
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022029615682621685240
  • Upwork Job ID: 2029615682621685240
  • Last Price Increase: 2026-03-05

Activity

  1. samranahm commented on Feb 8, 2026

    @samranahm
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    What is the root cause of that problem?

    We have defined the tax setting menu item here

    const menuItems = useMemo(
    () => [
    {
    title: policy?.taxRates?.name,
    description: translate('workspace.taxes.customTaxName'),
    action: () => Navigation.navigate(ROUTES.WORKSPACE_TAXES_SETTINGS_CUSTOM_TAX_NAME.getRoute(policyID)),
    pendingAction: policy?.taxRates?.pendingFields?.name,
    },
    {
    title: policy?.taxRates?.taxes?.[policy?.taxRates?.defaultExternalID]?.name,
    description: translate('workspace.taxes.workspaceDefault'),
    action: () => Navigation.navigate(ROUTES.WORKSPACE_TAXES_SETTINGS_WORKSPACE_CURRENCY_DEFAULT.getRoute(policyID)),
    pendingAction: policy?.taxRates?.pendingFields?.defaultExternalID,
    },
    {
    title: policy?.taxRates?.taxes?.[policy?.taxRates?.foreignTaxDefault]?.name,
    description: translate('workspace.taxes.foreignDefault'),
    action: () => Navigation.navigate(ROUTES.WORKSPACE_TAXES_SETTINGS_FOREIGN_CURRENCY_DEFAULT.getRoute(policyID)),
    pendingAction: policy?.taxRates?.pendingFields?.foreignTaxDefault,
    },
    ],
    [policy?.taxRates, policyID, translate],
    );

    When we update the value in setings BE return action with these actionName

    POLICYCHANGELOG_UPDATE_CUSTOM_TAX_NAME
    POLICYCHANGELOG_UPDATE_CURRENCY_DEFAULT_TAX
    POLICYCHANGELOG_UPDATE_FOREIGN_CURRENCY_DEFAULT_TAX

    but we have not implimented this in FrontEnd helpers setPolicyCustomTaxName, setWorkspaceCurrencyDefault, and setForeignCurrencyDefault so they does not render in PureReportActionItem but since Backend return the complete action to the reply count for thred in admins room update after each cgange in Tax settings

    What changes do you think we should make in order to solve the problem?

    1. We should add all three actions type in POLICY_CHANGE_LOG CONST
    UPDATE_TAX_CUSTOM_NAME: 'POLICYCHANGELOG_UPDATE_CUSTOM_TAX_NAME',
    UPDATE_CURRENCY_DEFAULT_TAX: 'POLICYCHANGELOG_UPDATE_CURRENCY_DEFAULT_TAX',
    UPDATE_FOREIGN_CURRENCY_DEFAULT_TAX: 'POLICYCHANGELOG_UPDATE_FOREIGN_CURRENCY_DEFAULT_TAX',
    1. Create the translation is each local
    changedTaxCustomName: ({oldValue, newValue}: {oldValue: string; newValue: string}) => 
        `changed the custom tax name from "${oldValue}" to "${newValue}"`,
    changedWorkspaceCurrencyDefaultTax: ({oldName, newName}: {oldName: string; newName: string}) => 
        `changed the workspace currency default tax rate to "${newName}" (previously "${oldName}")`,
    changedForeignCurrencyDefaultTax: ({oldName, newName}: {oldName: string; newName: string}) => 
        `changed the foreign currency default tax rate to "${newName}" (previously "${oldName}")`,
    1. Add helpers to get tax message
    function getWorkspaceTaxCustomNameUpdateMessage(translate: LocalizedTranslate, action: ReportAction): string {
        const {oldName, newName} = getOriginalMessage(action as ReportAction<typeof CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_TAX_CUSTOM_NAME>) ?? {};
    
        if (typeof oldName === 'string' && typeof newName === 'string') {
            return translate('workspaceActions.changedTaxCustomName', {oldValue: oldName, newValue: newName});
        }
    
        return getReportActionText(action);
    }
    
    function getWorkspaceCurrencyDefaultTaxUpdateMessage(translate: LocalizedTranslate, action: ReportAction): string {
        const {oldName, newName} = getOriginalMessage(action as ReportAction<typeof CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_CURRENCY_DEFAULT_TAX>) ?? {};
    
        if (typeof oldName === 'string' && typeof newName === 'string') {
            return translate('workspaceActions.changedWorkspaceCurrencyDefaultTax', {oldName, newName});
        }
    
        return getReportActionText(action);
    }
    
    function getWorkspaceForeignCurrencyDefaultTaxUpdateMessage(translate: LocalizedTranslate, action: ReportAction): string {
        const {oldName, newName} = getOriginalMessage(action as ReportAction<typeof CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_FOREIGN_CURRENCY_DEFAULT_TAX>) ?? {};
    
        if (typeof oldName === 'string' && typeof newName === 'string') {
            return translate('workspaceActions.changedForeignCurrencyDefaultTax', {oldName, newName});
        }
    
        return getReportActionText(action);
    }
    1. Add them in PureReportActionItem and LHN
    } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_TAX_CUSTOM_NAME) {
        children = <ReportActionItemBasicMessage message={getWorkspaceTaxCustomNameUpdateMessage(translate, action)} />;
    } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_CURRENCY_DEFAULT_TAX) {
        children = <ReportActionItemBasicMessage message={getWorkspaceCurrencyDefaultTaxUpdateMessage(translate, action)} />;
    } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_FOREIGN_CURRENCY_DEFAULT_TAX) {
        children = <ReportActionItemBasicMessage message={getWorkspaceForeignCurrencyDefaultTaxUpdateMessage(translate, action)} />;
    1. And in ContextMenuActions
    } else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_TAX_CUSTOM_NAME) {
        Clipboard.setString(getWorkspaceTaxCustomNameUpdateMessage(translate, reportAction));
    } else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_CURRENCY_DEFAULT_TAX) {
        Clipboard.setString(getWorkspaceCurrencyDefaultTaxUpdateMessage(translate, reportAction));
    } else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_FOREIGN_CURRENCY_DEFAULT_TAX) {
        Clipboard.setString(getWorkspaceForeignCurrencyDefaultTaxUpdateMessage(translate, reportAction));
    1. build Optimistic Tax value change action helpers and add them in
      setPolicyCustomTaxName, setWorkspaceCurrencyDefault, and setForeignCurrencyDefault

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  2. melvin-bot commented on Feb 13, 2026

    @melvin-bot

    Eep! 4 days overdue now. Issues have feelings too...

  3. melvin-bot commented on Feb 16, 2026

    @melvin-bot

    Still overdue 6 days?! Let's take care of this!

  4. samranahm commented on Feb 16, 2026

    @samranahm
    Contributor

    @jponikarchuk Can you apply the relevant labels here to assign CME.

  5. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 5, 2026
  6. 13 remaining items

  7. MelvinBot commented on Mar 9, 2026

    @MelvinBot
    Contributor

    🤖 Draft PR created: #84616
    Please mark it as "Ready for review" when it is ready for review.

  8. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 9, 2026
  9. added
    ReviewingHas a PR in review
    and removed on Mar 9, 2026
  10. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    Triggered auto assignment to @Beamanator, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  11. mkhutornyi commented on Apr 1, 2026

    @mkhutornyi
    Contributor

    Automation failed here. PR was deployed to production on Mar 11.
    cc: @jliexpensify

  12. jliexpensify commented on Apr 1, 2026

    @jliexpensify
    Contributor

    Thanks for the bump @mkhutornyi - any checklist needed?

  13. jliexpensify commented on Apr 1, 2026

    @jliexpensify
    Contributor

    Payment Summary

    • C+: @mkhutornyi $250 (to be paid via New Expensify requests)
  14. mkhutornyi commented on Apr 2, 2026

    @mkhutornyi
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: The localization never happened from the beginning

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Test:

    1. Go to a workspace and navigate to More Features
    2. Toggle a feature on or off (e.g., enable or disable Taxes)
    3. Navigate to the Admins room in the LHN
    4. Verify the LHN preview text for the Admins room shows the correct localized message (e.g., "enabled tax tracking" or "disabled tax tracking") instead of generic fallback text

    Do we agree 👍 or 👎

  15. quinthar commented on Apr 4, 2026

    @quinthar
    Contributor

    Approved $250 to @mkhutornyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions