[AI] Fix mobile category delete confirmation#8301
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hello contributor! We would love to review your PR! Before we can do that, please make sure:
A quick note on volume: please get one PR reviewed and merged before opening several more. A stack of simultaneous, similar PRs from one author is reviewed slowly, and low-effort, untested, or undisclosed-AI PRs may be closed without a detailed review. We do this to reduce the TOIL the core contributor team has to go through for each PR and to allow for speedy reviews and merges. For more information, please see our Contributing Guide. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughFixes mobile delete confirmation by collapsing the category/group menu modal synchronously before calling the delete mutation, allowing the "Confirm Delete" modal to appear when transactions exist. Adds a new ChangesMobile Category/Group Delete Confirmation Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Fixes a mobile regression where deleting a category or category group with transactions appeared to do nothing.
When the delete mutation needs to reassign existing transactions and balances, it opens the
confirm-category-deletemodal. On mobile, the category/category group menu previously passed anonSettledcallback that calledcollapseModals(...)after the mutation, which also collapsed the newly opened confirmation modal. As a result, users did not see theConfirm Delete/Transfer to:flow.This changes the flow to close the current category/category group menu before running the delete mutation. If the mutation determines that reassignment is required, the confirmation modal remains active and visible.
This PR also adds mobile Playwright regression coverage for both category and category group deletion paths, and adds a release note.
The code and tests in this PR were assisted by OpenAI Codex. I have reviewed the changes and test results.
Related issue(s)
Fixes #8230
Testing
corepack yarn install --immutable.corepack yarn oxfmt --check packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx packages/desktop-client/e2e/budget.mobile.test.ts packages/desktop-client/e2e/page-models/mobile-budget-page.ts packages/desktop-client/e2e/page-models/mobile-category-menu-modal.ts packages/desktop-client/e2e/page-models/mobile-category-group-menu-modal.ts upcoming-release-notes/fix-mobile-category-delete-confirmation.md.corepack yarn workspace @actual-app/web run typecheck.corepack yarn oxlint --type-aware --quiet packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx packages/desktop-client/e2e/budget.mobile.test.ts packages/desktop-client/e2e/page-models/mobile-budget-page.ts packages/desktop-client/e2e/page-models/mobile-category-menu-modal.ts packages/desktop-client/e2e/page-models/mobile-category-group-menu-modal.ts.BASE_REF=master node packages/ci-actions/bin/release-notes-check.mjs.corepack yarn workspace @actual-app/web run playwright test e2e/budget.mobile.test.ts --browser=chromium --grep "transfer confirmation"; 4 tests passed.Checklist
Bundle Stats
View detailed bundle stats
desktop-client
Total
Changeset
src/components/mobile/budget/BudgetPage.tsxView detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
Unchanged
loot-core
Total
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
api
Total
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
cli
Total
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
crdt
Total
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged