Money import: reconcile toast policy with Undo refusal assertion after dev merge #1196

Open
opened 2026-10-06 09:01:09 +00:00 by kayg · 6 comments
Owner

Second review of #1140 after the required one-time merge of origin/dev 5301e020859c1d61b4a7f812a5049a64241203e8. bun run check passes, including performance lint. bun run test -- --maxWorkers=2 fails the new toast-policy source audit:

 Test Files  1 failed | 278 passed (279)
      Tests  1 failed | 1959 passed (1960)

The five exact sites are MoneyImport.svelte new-Budget nudge, Copy details success/failure, and import-session.svelte.ts Undo success/refusal. The new dev policy requires an action, a named background result, or an explicit no-toast classification. The existing Undo refusal regression asserts the exact toast options { label: message, kind: 'alert' }. The owner rule prohibits changing an existing expectation without an issue that explicitly changes the behavior. This focused four-fix review keeps that assertion unchanged and does not weaken the policy audit.

Follow-up: apply the reviewed #1142 classifications to these import sites, retain a visible refusal and the one-time new-Budget nudge, and explicitly authorize any required expectation update. Then rerun the focused toast-policy/Undo tests and both web gates. Until then #1140 is not SAFE TO MERGE. No push or deploy.

Second review of #1140 after the required one-time merge of origin/dev `5301e020859c1d61b4a7f812a5049a64241203e8`. `bun run check` passes, including performance lint. `bun run test -- --maxWorkers=2` fails the new toast-policy source audit: ```text Test Files 1 failed | 278 passed (279) Tests 1 failed | 1959 passed (1960) ``` The five exact sites are MoneyImport.svelte new-Budget nudge, Copy details success/failure, and import-session.svelte.ts Undo success/refusal. The new dev policy requires an action, a named background result, or an explicit no-toast classification. The existing Undo refusal regression asserts the exact toast options `{ label: message, kind: 'alert' }`. The owner rule prohibits changing an existing expectation without an issue that explicitly changes the behavior. This focused four-fix review keeps that assertion unchanged and does not weaken the policy audit. Follow-up: apply the reviewed #1142 classifications to these import sites, retain a visible refusal and the one-time new-Budget nudge, and explicitly authorize any required expectation update. Then rerun the focused toast-policy/Undo tests and both web gates. Until then #1140 is not SAFE TO MERGE. No push or deploy.
Author
Owner

Runtime evidence for #1196: apps/web/src/lib/stores/toasts.svelte.ts:165 returns without showing or persisting a toast when opts.policy === 'drop' || (!opts.action && !opts.backgroundResult). The five unclassified import calls therefore disappear in the merged app. In particular, the #1177 server refusal reaches undoImport, but its toast has neither field, so the User does not see why Undo is unavailable. This is a visible interaction defect as well as a failed audit. Keep the existing exact refusal assertion unchanged under the owner rule; the follow-up must explicitly reconcile it with the reviewed toast policy. #1140 cannot be SAFE TO MERGE until that work is done.

Runtime evidence for #1196: `apps/web/src/lib/stores/toasts.svelte.ts:165` returns without showing or persisting a toast when `opts.policy === 'drop' || (!opts.action && !opts.backgroundResult)`. The five unclassified import calls therefore disappear in the merged app. In particular, the #1177 server refusal reaches `undoImport`, but its toast has neither field, so the User does not see why Undo is unavailable. This is a visible interaction defect as well as a failed audit. Keep the existing exact refusal assertion unchanged under the owner rule; the follow-up must explicitly reconcile it with the reviewed toast policy. #1140 cannot be SAFE TO MERGE until that work is done.
Author
Owner

Starting wizard5-1140 on job/wizard-1140 at 0e95a20971. I will replace Money import Undo toast feedback with a shared accessible inline status in the wizard and notification row, preserve conditional Undo and the toast policy, then merge origin/dev once and run the required gates.

Starting wizard5-1140 on job/wizard-1140 at 0e95a20971930bf876710a08d5c403b8abe757c5. I will replace Money import Undo toast feedback with a shared accessible inline status in the wizard and notification row, preserve conditional Undo and the toast policy, then merge origin/dev once and run the required gates.
Author
Owner

Finding: the server sends the conditional Undo refusal correctly, but the browser only called toast({label, kind: alert}), which the shared policy drops. The focused regression now keeps the exact refusal inline and preserves its receipt; no Files fallback or policy changes. The shared StatusPill now has an inline atomic polite live region with a decorative icon. Copy details also owns inline feedback, and the one-time new-Budget nudge has an Add account action. origin/dev was merged once (already up to date at 5301e02085). Focused tests: 3 files passed, 35 tests passed. Required gates and production screenshots are in progress.

Finding: the server sends the conditional Undo refusal correctly, but the browser only called toast({label, kind: alert}), which the shared policy drops. The focused regression now keeps the exact refusal inline and preserves its receipt; no Files fallback or policy changes. The shared StatusPill now has an inline atomic polite live region with a decorative icon. Copy details also owns inline feedback, and the one-time new-Budget nudge has an Add account action. origin/dev was merged once (already up to date at 5301e020859c1d61b4a7f812a5049a64241203e8). Focused tests: 3 files passed, 35 tests passed. Required gates and production screenshots are in progress.
Author
Owner

Progress: shared inline status is committed as a59f577de. The focused suite passes 3 files / 37 tests. Undo results now stay in the initiating sheet or notification row; successful row Undo no longer navigates away, and notification read-state failures cannot replace a confirmed Undo result. Repeated Undo activation is guarded. Existing conditional-inverse and refusal text assertions are retained in the stronger inline regression; the old toast expectation is changed only as explicitly authorized by #1196. Production build and required web/Money gates are still running on the shared host.

Progress: shared inline status is committed as a59f577de. The focused suite passes 3 files / 37 tests. Undo results now stay in the initiating sheet or notification row; successful row Undo no longer navigates away, and notification read-state failures cannot replace a confirmed Undo result. Repeated Undo activation is guarded. Existing conditional-inverse and refusal text assertions are retained in the stronger inline regression; the old toast expectation is changed only as explicitly authorized by #1196. Production build and required web/Money gates are still running on the shared host.
Author
Owner

Head is 689e3760af (three atomic commits). Final web check passes: perf-lint: PASS; 0 violations; 22404 scoped exceptions; svelte-check found 0 errors and 2 warnings in 2 files. Full web suite: 280 files / 1963 tests passed. Focused suite: 3 files / 37 tests passed. Money Plugin clippy and Money calculation tests passed. Runtime finding: the shared prebuilt server can match origin/dev but still miss this unmerged wizard branch backend. The first browser attempt lacked the asset override; the second used current assets but mismatched backend. Both are retained as failed evidence, not passing samples. Building the branch server and waiting for Money Plugin tests; production evidence still pending.

Head is 689e3760af6819f9e462c3646327654a391a78a0 (three atomic commits). Final web check passes: perf-lint: PASS; 0 violations; 22404 scoped exceptions; svelte-check found 0 errors and 2 warnings in 2 files. Full web suite: 280 files / 1963 tests passed. Focused suite: 3 files / 37 tests passed. Money Plugin clippy and Money calculation tests passed. Runtime finding: the shared prebuilt server can match origin/dev but still miss this unmerged wizard branch backend. The first browser attempt lacked the asset override; the second used current assets but mismatched backend. Both are retained as failed evidence, not passing samples. Building the branch server and waiting for Money Plugin tests; production evidence still pending.
Author
Owner

Implemented #1196 at 689e3760af6819f9e462c3646327654a391a78a0 on job/wizard-1140. The worktree is clean. No push or deploy.

Status: CODE AND REQUIRED GATES PASS. PRODUCTION REGRESSION AND SCREENSHOT MATRIX ARE STILL PENDING. Do not treat the failed setup runs as passing evidence.

Built:

  • Extend the ported shared StatusPill with an inline variant. Keep its empty atomic polite live region mounted before an action. Show a decorative check or alert icon with the complete result text.
  • Show Money import Undo refusals and successful results in the wizard or the initiating notification row. Keep the exact server refusal and the receipt after later edits. Keep successful results visible until the User closes the sheet; do not navigate a notification away before its result can be read.
  • Guard repeated Undo activation. Disable a notification Undo after success. A notification read-state failure cannot replace a confirmed Undo result. Clear row feedback on session end and bound it to 200 results.
  • Show Copy details success and failure inline. Keep the one-time new-Budget nudge with a real Add account action and a stable link. The toast policy and its allow-list are unchanged.
  • Commit a focused real-server regression for edited Budget data, aria-live feedback, Undo results, Copy details, and Add account. It covers phone (390), tablet (820), desktop (1440), light and dark, macOS platform emulation, keyboard/touch, and 4x status crops.
  • Refresh only existing exact syntax hashes in the performance contracts. No rule, limit, exception count or ratchet was raised.

Commits:

  • a59f577de feat(ui): add inline live feedback to StatusPill for action results
  • 3911516a7 fix(money): keep import Undo outcomes visible inline without toasts
  • 689e3760a test(money): cover inline import feedback on all review widths and themes

Files:

  • apps/web/e2e/money-wizard-1140.mjs
  • apps/web/src/lib/components/StatusPill.svelte.test.ts
  • apps/web/src/lib/components/money/MoneyImport.svelte
  • apps/web/src/lib/money/import-session.svelte.test.ts
  • apps/web/src/lib/money/import-session.svelte.ts
  • apps/web/src/lib/notifications/InboxPanel.svelte
  • contracts/perf/adoption-1058.json
  • contracts/perf/exceptions.json
  • contracts/perf/registry.json
  • packages/ui/README.md
  • packages/ui/src/components/StatusPill.svelte

Shared controls: StatusPill owns status paint, icons and live announcements. Pill owns Undo, Copy details, Open Budget and Close. The existing OverlaySurface owns the wizard sheet. The shared toast renderer owns the nudge and its Pill action. No feature-local primitive restyling was added.

Validation:

  • git fetch origin && git merge origin/dev: Already up to date. Base dev SHA: 5301e020859c1d61b4a7f812a5049a64241203e8.
  • cargo fmt --check: exit 0, no output.
  • bun run check: exit 0. Verbatim summary:
perf-lint: PASS; 0 violations; 22404 scoped exceptions
svelte-check found 0 errors and 2 warnings in 2 files
  • bun run test -- --maxWorkers=2: exit 0. Verbatim summary:
 Test Files  280 passed (280)
      Tests  1963 passed (1963)
  • Focused Vitest (StatusPill, import session and unchanged toast-policy audit): exit 0. The two later-added cases also pass. Verbatim summary:
 Test Files  3 passed (3)
      Tests  37 passed (37)
  • cargo clippy -p calternal-money --all-targets -- -D warnings: exit 0.
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 53s
  • cargo test -p calternal-money: exit 0.
test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 12.79s
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.96s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
test result: ok. 4 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 3.40s
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.68s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
  • cargo clippy -p calternal-plugin-money --all-targets -- -D warnings: exit 0.
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 22m 15s
  • cargo test -p calternal-plugin-money: exit 0. Includes the Undo mutation route and refusal after every later Budget edit and server restart.
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 122 filtered out; finished in 54.10s
test result: ok. 121 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 79.34s
test result: ok. 27 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 10.59s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
  • Production web build at the head commit: exit 0. node --check apps/web/e2e/money-wizard-1140.mjs: exit 0.

UX gaps closed: suppressed refusals; invisible Undo success; navigation that hid notification success; repeated Undo activation; read-state errors that overwrote Undo success; silent Copy details feedback; a nudge with no action.

Known gaps / UX gaps left: the matching branch server build did not yet finish. The focused production regression and the six macOS width/theme screenshot cases must still run. No passing visual evidence or visual approval is claimed. The first browser attempt used the prebuilt embedded frontend because the asset override was omitted. The second used this worktree's assets with a dev backend that lacked this branch's unmerged wizard changes. Both failures are retained in the evidence logs. The web check reports two existing CSS warnings in AttachmentDeck and AgendaList. Existing ignored Rust cases remain unchanged: isolated child entry points and performance profiles.

Decisions: keep Undo success visible until Close; keep notification results in their row without automatic navigation; make the one-time new-Budget nudge actionable with Add account. Inline results are local feedback and are cleared when the session ends. No new backend decision or dependency was added.

Expected work: the same two dependent Undo requests as before; one status line per displayed result; local receipt/result updates bounded to 200 entries. No additional server IO, query, Home scan, per-row observer or runtime alignment measurement. Performance measurements were not run because this is not a performance issue, per the current verification policy.

For the merge round (use this branch's server, not the shared dev binary):

export CARGO_PROFILE_DEV_DEBUG=line-tables-only CARGO_INCREMENTAL=0 CARGO_BUILD_JOBS=4 TMPDIR="$PWD/target/tmp"
cargo build -p calternal-server
cd apps/web
bun run build
CALTERNAL_E2E_ASSET_OVERRIDE=1 CALTERNAL_SERVER_BIN="$CARGO_TARGET_DIR/debug/calternal-server" TMPDIR="$PWD/../../target/tmp" bun e2e/money-wizard-1140.mjs --undo-feedback-only

This must prove that editing after import produces the exact visible, announced Undo refusal and leaves the Budget unchanged; it must capture all six macOS width/theme cases. Attach the screenshots for the orchestrator's visual review. Full e2e, adversarial matrices, release, staging and Mac interop stay with the merge round under the verification policy.

Cleanup: cargo clean ran after stopping the incomplete server build. Web build output and the copied diagnostic server were removed. Verbatim cleanup output:

     Removed 11610 files, 5.4GiB total

Evidence: verbatim gate logs and failed/incomplete runtime setup logs. No passing screenshot matrix is included.

Implemented #1196 at `689e3760af6819f9e462c3646327654a391a78a0` on `job/wizard-1140`. The worktree is clean. No push or deploy. Status: CODE AND REQUIRED GATES PASS. PRODUCTION REGRESSION AND SCREENSHOT MATRIX ARE STILL PENDING. Do not treat the failed setup runs as passing evidence. Built: - Extend the ported shared `StatusPill` with an inline variant. Keep its empty atomic polite live region mounted before an action. Show a decorative check or alert icon with the complete result text. - Show Money import Undo refusals and successful results in the wizard or the initiating notification row. Keep the exact server refusal and the receipt after later edits. Keep successful results visible until the User closes the sheet; do not navigate a notification away before its result can be read. - Guard repeated Undo activation. Disable a notification Undo after success. A notification read-state failure cannot replace a confirmed Undo result. Clear row feedback on session end and bound it to 200 results. - Show Copy details success and failure inline. Keep the one-time new-Budget nudge with a real Add account action and a stable link. The toast policy and its allow-list are unchanged. - Commit a focused real-server regression for edited Budget data, aria-live feedback, Undo results, Copy details, and Add account. It covers phone (390), tablet (820), desktop (1440), light and dark, macOS platform emulation, keyboard/touch, and 4x status crops. - Refresh only existing exact syntax hashes in the performance contracts. No rule, limit, exception count or ratchet was raised. Commits: - `a59f577de` feat(ui): add inline live feedback to StatusPill for action results - `3911516a7` fix(money): keep import Undo outcomes visible inline without toasts - `689e3760a` test(money): cover inline import feedback on all review widths and themes Files: - `apps/web/e2e/money-wizard-1140.mjs` - `apps/web/src/lib/components/StatusPill.svelte.test.ts` - `apps/web/src/lib/components/money/MoneyImport.svelte` - `apps/web/src/lib/money/import-session.svelte.test.ts` - `apps/web/src/lib/money/import-session.svelte.ts` - `apps/web/src/lib/notifications/InboxPanel.svelte` - `contracts/perf/adoption-1058.json` - `contracts/perf/exceptions.json` - `contracts/perf/registry.json` - `packages/ui/README.md` - `packages/ui/src/components/StatusPill.svelte` Shared controls: StatusPill owns status paint, icons and live announcements. Pill owns Undo, Copy details, Open Budget and Close. The existing OverlaySurface owns the wizard sheet. The shared toast renderer owns the nudge and its Pill action. No feature-local primitive restyling was added. Validation: - `git fetch origin && git merge origin/dev`: `Already up to date.` Base dev SHA: `5301e020859c1d61b4a7f812a5049a64241203e8`. - `cargo fmt --check`: exit 0, no output. - `bun run check`: exit 0. Verbatim summary: ```text perf-lint: PASS; 0 violations; 22404 scoped exceptions svelte-check found 0 errors and 2 warnings in 2 files ``` - `bun run test -- --maxWorkers=2`: exit 0. Verbatim summary: ```text Test Files 280 passed (280) Tests 1963 passed (1963) ``` - Focused Vitest (`StatusPill`, import session and unchanged toast-policy audit): exit 0. The two later-added cases also pass. Verbatim summary: ```text Test Files 3 passed (3) Tests 37 passed (37) ``` - `cargo clippy -p calternal-money --all-targets -- -D warnings`: exit 0. ```text Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 53s ``` - `cargo test -p calternal-money`: exit 0. ```text test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 12.79s test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.96s test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s test result: ok. 4 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 3.40s test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.68s test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s ``` - `cargo clippy -p calternal-plugin-money --all-targets -- -D warnings`: exit 0. ```text Finished `dev` profile [unoptimized + debuginfo] target(s) in 22m 15s ``` - `cargo test -p calternal-plugin-money`: exit 0. Includes the Undo mutation route and refusal after every later Budget edit and server restart. ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 122 filtered out; finished in 54.10s test result: ok. 121 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 79.34s test result: ok. 27 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 10.59s test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s ``` - Production web build at the head commit: exit 0. `node --check apps/web/e2e/money-wizard-1140.mjs`: exit 0. UX gaps closed: suppressed refusals; invisible Undo success; navigation that hid notification success; repeated Undo activation; read-state errors that overwrote Undo success; silent Copy details feedback; a nudge with no action. Known gaps / UX gaps left: the matching branch server build did not yet finish. The focused production regression and the six macOS width/theme screenshot cases must still run. No passing visual evidence or visual approval is claimed. The first browser attempt used the prebuilt embedded frontend because the asset override was omitted. The second used this worktree's assets with a dev backend that lacked this branch's unmerged wizard changes. Both failures are retained in the evidence logs. The web check reports two existing CSS warnings in AttachmentDeck and AgendaList. Existing ignored Rust cases remain unchanged: isolated child entry points and performance profiles. Decisions: keep Undo success visible until Close; keep notification results in their row without automatic navigation; make the one-time new-Budget nudge actionable with Add account. Inline results are local feedback and are cleared when the session ends. No new backend decision or dependency was added. Expected work: the same two dependent Undo requests as before; one status line per displayed result; local receipt/result updates bounded to 200 entries. No additional server IO, query, Home scan, per-row observer or runtime alignment measurement. Performance measurements were not run because this is not a performance issue, per the current verification policy. For the merge round (use this branch's server, not the shared dev binary): ```sh export CARGO_PROFILE_DEV_DEBUG=line-tables-only CARGO_INCREMENTAL=0 CARGO_BUILD_JOBS=4 TMPDIR="$PWD/target/tmp" cargo build -p calternal-server cd apps/web bun run build CALTERNAL_E2E_ASSET_OVERRIDE=1 CALTERNAL_SERVER_BIN="$CARGO_TARGET_DIR/debug/calternal-server" TMPDIR="$PWD/../../target/tmp" bun e2e/money-wizard-1140.mjs --undo-feedback-only ``` This must prove that editing after import produces the exact visible, announced Undo refusal and leaves the Budget unchanged; it must capture all six macOS width/theme cases. Attach the screenshots for the orchestrator's visual review. Full e2e, adversarial matrices, release, staging and Mac interop stay with the merge round under the verification policy. Cleanup: `cargo clean` ran after stopping the incomplete server build. Web build output and the copied diagnostic server were removed. Verbatim cleanup output: ```text Removed 11610 files, 5.4GiB total ``` Evidence: [verbatim gate logs and failed/incomplete runtime setup logs](https://git.kayg.org/attachments/619ae214-72cd-4eca-ae96-97006f5e8abf). No passing screenshot matrix is included.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
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#1196
No description provided.