Skip to content

Rules - No error message when command is not supported for Restrict card spend rule #103862

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.8-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #99624
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  • Create a Control workspace.
  • Create Rules.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Rules.
  3. Click Add rule.
  4. Click Restrict card spend.
  5. Click Describe.
  6. Enter "Flag expenses over $50" and click Next.

Expected Result:

Error message should appear when the command is not supported for Restrict card spend rule.

Actual Result:

No error message appears when the command is not supported for Restrict card spend rule.
The describe modal disappears as if the command is applied when nothing is applied.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7285216_1791888813035.5.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7285216

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 13, 2026
  2. applause-bot commented on Oct 13, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/86fd2e7910a1ead77b4b1182d5e1a2659b12c6b95df51672ba0df4c1b4c9b788

  3. melvin-bot commented on Oct 13, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #99624

  4. melvin-bot commented on Oct 13, 2026

    @melvin-bot

    @luacmartins @JS00001 @Krishna2323 you have been assigned to this deploy blocker because you reviewed the offending PR: #99624

  5. github-actions commented on Oct 13, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. melvin-bot commented on Oct 13, 2026

    @melvin-bot

    @rushatgabhane you have been assigned to this deploy blocker because you authored the offending PR: #99624

  7. melvin-bot commented on Oct 13, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  8. MelvinBot commented on Oct 13, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR: AI-assisted rule creation (high confidence). It added the Describe button and modal to the Restrict card spend editor, and it is in Deploy Checklist: New Expensify 2026-10-13.

    Root cause (frontend): The backend picks the rule type from the description, not the open editor. "Flag expenses over $50" comes back as a successful Flag for review rule. DescribeRuleModal.tsx:83-94 only shows an error when generation fails, so any success closes the modal. The spend form ignores the returned fields, so nothing appears to change.

    Recommendation: fix forward, revert as fallback. The open draft PR Keep the rule editor's form when Describe returns another rule type adds ruleType back to GeneratedRule. It shows the existing "isn't supported yet" error when the type doesn't match the editor. If it can't merge and be verified before the deploy, revert 99624.

    Investigation details
    • Request path: The spend editor passes restrictCardSpend (SpendRulePageBase.tsx:477-486), and generateRule sends it (Rules.ts:417-446). Per discussion on 99624, the backend does not honour it yet.
    • No type check possible today: 99624 removed ruleType from GeneratedRule during review because nothing read it (GeneratedRule.ts:16-25).
    • Side effect: applyGeneratedRule (SpendRulePageBase.tsx:110-114) calls setDraftSpendRule, which replaces the whole draft (User.ts:1938-1940). Cards or merchants picked before using Describe may be cleared. Saved rules are not affected.
    • Known before merge: A reviewer reported this behaviour on the PR, and the author confirmed the backend gap.
    • Caveat for the fix: 103809 treats a missing ruleType as a mismatch. Before merging, confirm on staging that the response includes ruleType. For example, Flag for review + "Flag meals over $500" should still fill the form.

    view run

  9. rushatgabhane commented on Oct 13, 2026

    @rushatgabhane
    Member

    not a frontend bug

  10. kavimuru commented on Oct 13, 2026

    @kavimuru

    Describe button is not showing with "describerule" disabled.

    Screenrecorder-2026-10-13-20-28-13-84.mp4
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.EngineeringHourlyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions