Skip to content

fix(frontend): clear import state after save and close#528

Merged
algirdasc merged 1 commit into
mainfrom
fix/import-ui-stale-state-after-save-delete
Jul 4, 2026
Merged

fix(frontend): clear import state after save and close#528
algirdasc merged 1 commit into
mainfrom
fix/import-ui-stale-state-after-save-delete

Conversation

@algirdasc

Copy link
Copy Markdown
Owner

Problem

Two related bugs in bank statement import flow:

  1. Transaction stays in list after saveexpenseDialog.onClose used truthy check (!savedExpense) which could pass for non-Expense values. Changed to instanceof Expense for reliable detection.

  2. Pending import shown after all saved individually — when last expense was saved one-by-one, dialog closed with DIALOG_ACTION_CLOSE but processImport() had no handler for that action, so localStorage was never cleared.

Fix

  • statement-review-dialog: use instanceof Expense check; auto-close dialog when last expense is saved
  • statement-import.service: import DIALOG_ACTION_CLOSE constant and handle it — clear storage if empty, reload if not

- use instanceof Expense check instead of truthy to detect saved expense
- auto-close review dialog when last expense is saved individually
- handle DIALOG_ACTION_CLOSE in processImport to clear or reload storage
@algirdasc
algirdasc merged commit ff38633 into main Jul 4, 2026
3 checks passed
@algirdasc
algirdasc deleted the fix/import-ui-stale-state-after-save-delete branch July 4, 2026 19:29
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.

1 participant