Money: Cancel import leaves progress sheet open during upload #1301

Closed
opened 2026-10-07 02:56:56 +00:00 by kayg · 5 comments
Owner

Steps

  1. Open Money import with an Actual export or another import file of about 500 KB.
  2. Throttle the browser to a slow online connection.
  3. Start the import and choose Cancel import while the progress sheet shows the upload stage at 502 KB of 502 KB.

Expected

The import job stops and the progress sheet closes so the User can return to Money.

Actual

The server returns HTTP 204 for DELETE /api/v1/money/imports/jobs/{id}, but after 30 seconds the sheet remains open on the reading step with “Uploading — In progress” and Cancel import still visible.

Evidence

artifacts/money/money-import-cancel-state-light-390.png (captured after cancellation; 390 px, light theme). Reproduced in the local production build using the Money E2E flow.

Severity: major

## Steps 1. Open Money import with an Actual export or another import file of about 500 KB. 2. Throttle the browser to a slow online connection. 3. Start the import and choose **Cancel import** while the progress sheet shows the upload stage at 502 KB of 502 KB. ## Expected The import job stops and the progress sheet closes so the User can return to Money. ## Actual The server returns HTTP 204 for `DELETE /api/v1/money/imports/jobs/{id}`, but after 30 seconds the sheet remains open on the `reading` step with “Uploading — In progress” and Cancel import still visible. ## Evidence `artifacts/money/money-import-cancel-state-light-390.png` (captured after cancellation; 390 px, light theme). Reproduced in the local production build using the Money E2E flow. Severity: major
Author
Owner

Fixed on branch in e8e616072 (fix(money): close import after server cancellation). The session now waits for server cancellation and then closes without waiting for staged Files cleanup; reset() continues cleanup in the background. Regression: import-session.svelte.test.ts test “closes after server cancellation while staged-file cleanup is pending” passes. Real production-server cancellation passed at 390 / 820 / 1440 px in both themes; screenshots are in artifacts/money/money-import-cancel-state-*.png.

Fixed on branch in `e8e616072` (`fix(money): close import after server cancellation`). The session now waits for server cancellation and then closes without waiting for staged Files cleanup; `reset()` continues cleanup in the background. Regression: `import-session.svelte.test.ts` test “closes after server cancellation while staged-file cleanup is pending” passes. Real production-server cancellation passed at 390 / 820 / 1440 px in both themes; screenshots are in `artifacts/money/money-import-cancel-state-*.png`.
Author
Owner

Starting the separate Money number review on branch job/bash-money. Head: cc161522ac. Current origin/dev base: 3601719b80. Scope includes Money commits #1288, #1301 and #1307 plus the #1206 test-readiness change.

Starting the separate Money number review on branch job/bash-money. Head: cc161522ac29b8a7add9fc833c5dfa6840ed5960. Current origin/dev base: 3601719b80a39f712daf07b37879b22929dfffa0. Scope includes Money commits #1288, #1301 and #1307 plus the #1206 test-readiness change.
Author
Owner

Number-review finding F-1, with no product defect found: the requested monthly equation uses Assignment where the ledger identity uses Available. For inflow 250000 minor units, Assignment 40000 and outflow 4550, Assignment + Ready to Assign is 250000 while inflow − outflow is 245450. The DESIGN-consistent identity is Ready to Assign + Available = on-budget Account balance: 210000 + 35450 = 245450. I am preserving the established model and testing exact minor-unit imports.

Number-review finding F-1, with no product defect found: the requested monthly equation uses Assignment where the ledger identity uses Available. For inflow 250000 minor units, Assignment 40000 and outflow 4550, Assignment + Ready to Assign is 250000 while inflow − outflow is 245450. The DESIGN-consistent identity is Ready to Assign + Available = on-budget Account balance: 210000 + 35450 = 245450. I am preserving the established model and testing exact minor-unit imports.
Author
Owner

NUMBERS-OK

Review branch: job/bash-money
Head: a6d40efebdd07d89332d399e470c045be12fe4fb
Refreshed origin/dev base: 0419170fe456b58614befcb12d9c9d255118f1c0

Built

This review adds integer-only properties for CSV imports, exact minor-unit totals across durable import confirmation and replay, and Undo back to the pre-import state. A production E2E imports tricky CSV amounts and compares every displayed month and Account balance with the real API. Money product logic was not changed by this review.

Files

  • crates/plugins/money/tests/import_review.rs
  • crates/plugins/money/src/durable_import_tests.rs
  • apps/web/e2e/money-number-review.mjs
  • Screenshot evidence: 111 PNGs attached to Money issue #1301; none are committed.

Findings

  • F-1, specification wording mismatch: with inflow 250000, Assignment 40000 and outflow 4550, Assignment + Ready to Assign is 250000 while inflow − outflow is 245450. DESIGN §48 uses Ready to Assign + sum(Category Available) = on-budget Account balance, which gives 210000 + 35450 = 245450. I used that documented ledger identity.
  • F-2, low severity test gap: the broad bun e2e/money.mjs reaches its existing Create Budget selector, but the current accessible action is Import budget. It times out before that older flow reaches its confirm and Undo steps. The focused production number E2E passes; the route-level property covers import replay and Undo.

Gate output

cargo fmt --check: empty output; exit 0.

cargo clippy -p calternal-plugin-money --all-targets -- -D warnings:

    Checking calternal-plugin-money v0.0.1 (/home/kayg/Developer/calternal-wt/bash-money/crates/plugins/money)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 27.01s

cargo test -p calternal-plugin-money:

test result: ok. 124 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 100.34s
test result: ok. 29 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 16.68s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

cd apps/web && bun run check:

svelte-check found 0 errors and 1 warning in 1 file
perf-lint: PASS; 0 violations; 22544 scoped exceptions

cd apps/web && bun run test:

 Test Files  288 passed (288)
      Tests  2039 passed (2039)
   Start at  13:13:51
   Duration  638.57s (environment 27%, transform 25%, import 24%, tests 17%, setup 6%)

bun e2e/money-number-review.mjs:

PASS the CSV, Money API and every displayed month and Account balance retain exact integer minor units

The broad Money E2E output ends with:

TimeoutError: isDisabled: Timeout 30000ms exceeded.
  - waiting for getByRole('button', { name: 'Create Budget' })

Known gaps and decisions

The broad Money E2E still needs its old selector reconciled before it can cover the UI confirm and Undo steps. No existing expectation was changed. The requested Assignment-plus-Ready-to-Assign equation does not match the established Available-based cash ledger, so this review used the DESIGN §48 identity instead.

I posted this report on #1301 because #1218 is a Mail issue, not the Money bug-bash issue. All 111 PNGs from the macOS-emulated 390/820/1440 light/dark capture set are attached to #1301.

NUMBERS-OK Review branch: `job/bash-money` Head: `a6d40efebdd07d89332d399e470c045be12fe4fb` Refreshed `origin/dev` base: `0419170fe456b58614befcb12d9c9d255118f1c0` ### Built This review adds integer-only properties for CSV imports, exact minor-unit totals across durable import confirmation and replay, and Undo back to the pre-import state. A production E2E imports tricky CSV amounts and compares every displayed month and Account balance with the real API. Money product logic was not changed by this review. ### Files - `crates/plugins/money/tests/import_review.rs` - `crates/plugins/money/src/durable_import_tests.rs` - `apps/web/e2e/money-number-review.mjs` - Screenshot evidence: 111 PNGs attached to Money issue #1301; none are committed. ### Findings - F-1, specification wording mismatch: with inflow 250000, Assignment 40000 and outflow 4550, Assignment + Ready to Assign is 250000 while inflow − outflow is 245450. DESIGN §48 uses `Ready to Assign + sum(Category Available) = on-budget Account balance`, which gives 210000 + 35450 = 245450. I used that documented ledger identity. - F-2, low severity test gap: the broad `bun e2e/money.mjs` reaches its existing `Create Budget` selector, but the current accessible action is `Import budget`. It times out before that older flow reaches its confirm and Undo steps. The focused production number E2E passes; the route-level property covers import replay and Undo. ### Gate output `cargo fmt --check`: empty output; exit 0. `cargo clippy -p calternal-plugin-money --all-targets -- -D warnings`: ```text Checking calternal-plugin-money v0.0.1 (/home/kayg/Developer/calternal-wt/bash-money/crates/plugins/money) Finished `dev` profile [unoptimized + debuginfo] target(s) in 27.01s ``` `cargo test -p calternal-plugin-money`: ```text test result: ok. 124 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 100.34s test result: ok. 29 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 16.68s test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s ``` `cd apps/web && bun run check`: ```text svelte-check found 0 errors and 1 warning in 1 file perf-lint: PASS; 0 violations; 22544 scoped exceptions ``` `cd apps/web && bun run test`: ```text Test Files 288 passed (288) Tests 2039 passed (2039) Start at 13:13:51 Duration 638.57s (environment 27%, transform 25%, import 24%, tests 17%, setup 6%) ``` `bun e2e/money-number-review.mjs`: ```text PASS the CSV, Money API and every displayed month and Account balance retain exact integer minor units ``` The broad Money E2E output ends with: ```text TimeoutError: isDisabled: Timeout 30000ms exceeded. - waiting for getByRole('button', { name: 'Create Budget' }) ``` ### Known gaps and decisions The broad Money E2E still needs its old selector reconciled before it can cover the UI confirm and Undo steps. No existing expectation was changed. The requested Assignment-plus-Ready-to-Assign equation does not match the established Available-based cash ledger, so this review used the DESIGN §48 identity instead. I posted this report on #1301 because #1218 is a Mail issue, not the Money bug-bash issue. All 111 PNGs from the macOS-emulated 390/820/1440 light/dark capture set are attached to #1301.
Author
Owner

Deployed to calternal.cloud in merge round 34 (d395b6e25), 2026-10-08 05:03 IST. Backup: /srv/calternal/backup-pre-m34-20261008-0132. Production healthy after 36 s; served build matches.

Deployed to calternal.cloud in merge round 34 (d395b6e25), 2026-10-08 05:03 IST. Backup: /srv/calternal/backup-pre-m34-20261008-0132. Production healthy after 36 s; served build matches.
kayg closed this issue 2026-10-07 23:54:32 +00:00
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal-v0#1301
No description provided.