You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-10-28] Rules - Describe rule modal is not cleared after command fails and page is refreshed #103930
Version Number: 9.5.8-3 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.
Enable Rules.
Enable describeRule beta.
Go to staging.new.expensify.com
Go to workspace settings > Rules.
Click Add rule > Restrict card spend.
Click Describe.
Enter lala.
Click Next.
After error shows up, refresh the page.
Click Describe.
Expected Result:
Describe rule modal will be cleared after command fails and page is refreshed.
Actual Result:
Describe rule modal is not cleared after command fails and page is refreshed.
👋 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:
Identify the pull request that introduced this issue and revert it.
Root cause: The prompt input uses shouldSaveDraft (DescribeRuleModal.tsx:169), so the text persists in Onyx. The draft is only cleared by close() (DescribeRuleModal.tsx:77-81). A refresh after an error skips close(), and the reload cleanup effect (DescribeRuleModal.tsx:96-101) only runs when isLoading is still true. After a failure, isLoading is false, so the old text returns.
Recommended fix: In DescribeRuleModal.tsx, call clearNewRulePrompt() once on mount. This clears the stale prompt, error, and generatedRule, and covers the existing leftover-loading case.
clearNewRulePrompt() resets the form, draft, and generatedRule (Rules.ts:460-464).
failureData (Rules.ts:433-439) only sets isLoading: false and errors. Keeping the prompt after an error while the modal stays open matches the spec.
The persisted errors value is read by FormProvider (FormProvider.tsx:185), so the old error likely reappears after refresh too. Not verified in the app.
The modal children render only when visible (ReanimatedModal/index.tsx:256), so a mount-time clear runs before the form reads the draft.
Smaller alternative: remove shouldSaveDraft. This fixes the text but leaves the persisted error.
Impact is cosmetic and beta-gated. Nothing is saved incorrectly.
Next Steps: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.
changed the title [-]Rules - Describe rule modal is not cleared after command fails and page is refreshed[/-][+][Due for payment 2026-10-28] Rules - Describe rule modal is not cleared after command fails and page is refreshed[/+]on Oct 21, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.15-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-10-28. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
melvin-bot commentedon Oct 13, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #99624
applause-bot commentedon Oct 13, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/8f409d30c43482aa6cefdc41e25e99979b03f5e4cac8ffdb6f1c93655884df99
melvin-bot commentedon Oct 13, 2026
@luacmartins @JS00001 @Krishna2323 you have been assigned to this deploy blocker because you reviewed the offending PR: #99624
melvin-bot commentedon Oct 13, 2026
@rushatgabhane you have been assigned to this deploy blocker because you authored the offending PR: #99624
melvin-bot commentedon Oct 13, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Oct 13, 2026
👋 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:
JS00001 commentedon Oct 13, 2026
Closing because the button is behind a beta now, adding to the list though
MelvinBot commentedon Oct 13, 2026
Deploy blocker analysis
Verdict: Not a real blocker — demote and fix forward. No revert needed.
JS00001already closed this because the Describe button is now behind thedescribeRulebeta ([cp staging] Hide Describe rule button behind a client side beta).Causing PR: AI-assisted rule creation (high confidence, from code reading).
Root cause: The prompt input uses
shouldSaveDraft(DescribeRuleModal.tsx:169), so the text persists in Onyx. The draft is only cleared byclose()(DescribeRuleModal.tsx:77-81). A refresh after an error skipsclose(), and the reload cleanup effect (DescribeRuleModal.tsx:96-101) only runs whenisLoadingis stilltrue. After a failure,isLoadingisfalse, so the old text returns.Recommended fix: In
DescribeRuleModal.tsx, callclearNewRulePrompt()once on mount. This clears the stale prompt, error, andgeneratedRule, and covers the existing leftover-loading case.Investigation details
FormProviderwrites each keystroke to the draft key (FormProvider.tsx:561-562) and restores it on mount (FormProvider.tsx:434).clearNewRulePrompt()resets the form, draft, andgeneratedRule(Rules.ts:460-464).failureData(Rules.ts:433-439) only setsisLoading: falseanderrors. Keeping the prompt after an error while the modal stays open matches the spec.errorsvalue is read byFormProvider(FormProvider.tsx:185), so the old error likely reappears after refresh too. Not verified in the app.shouldSaveDraft. This fixes the text but leaves the persisted error.Next Steps: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.view run
[-]Rules - Describe rule modal is not cleared after command fails and page is refreshed[/-][+][Due for payment 2026-10-28] Rules - Describe rule modal is not cleared after command fails and page is refreshed[/+]melvin-bot commentedon Oct 21, 2026
@Krishna2323
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.15-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-10-28. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]