refactor(ssr): Phase 11 — delete the dead mm/* wizard machinery

With all 11 plan modals migrated onto the session-backed engine, the mm multi-step
wizard framework has zero runtime callers (transaction/edit.clj builds its
:multi-form-state map from its own wrap-derive-state and never required the namespace).
Delete it:

- src/.../components/multi_modal.clj — the ModalWizardStep/LinearModalWizard/
  Initializable/Discardable protocols, the MultiStepFormState record, and the
  wrap-wizard / wrap-decode-multi-form-state / default-render-step / encode-step-key
  middleware + helpers (~22KB).
- test/.../transaction/edit_simple_advanced_mode_test.clj — the last importer of mm; it
  was already broken (refers edit-vendor-changed-handler / edit-wizard-toggle-mode-handler,
  both removed when Transaction Edit migrated, so it no longer loaded) and tests the old
  mm interface that no longer exists.
- test_server.clj: drop the stale unused mm require.

form-cursor (fc/*) stays — still used by ~18 non-wizard forms outside this plan. The
alpine-morph focus mechanism stays — it belongs to the whole-form-swap doctrine, not the
wizard machinery.

Fresh from-disk JVM compiles clean without the namespace; full e2e suite 71/71.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 07:41:50 -07:00
parent ddffbf58f9
commit 3251b364a1
4 changed files with 24 additions and 1749 deletions

View File

@@ -328,3 +328,27 @@ against a fresh `TEST_SERVER_PORT=… lein run -m auto-ap.test-server` JVM, not
timeline; edit prefill w/ disabled code; bank-accounts card + add affordance; editor
open/discard; accept-merge; edit→save round-trip). Engine flow + accept + pass-through +
edit init also confirmed at the REPL.
---
## Phase 11 — Cleanup (delete the dead wizard machinery)
With all 11 plan modals migrated, the `mm` multi-step wizard framework had **zero runtime
callers** (`transaction/edit.clj` reads `:multi-form-state` but builds it from its own
`wrap-derive-state` — it never required the namespace). Deleted:
`auto-ap.ssr.components.multi-modal` (the protocols `ModalWizardStep` /
`LinearModalWizard` / `Initializable` / `Discardable`, the `MultiStepFormState` record,
`wrap-wizard` / `wrap-decode-multi-form-state` / `default-render-step` / `encode-step-key`
+ the rest, ~22KB) and its last importer, the already-broken
`edit_simple_advanced_mode_test.clj` (it `:refer`'d `edit-vendor-changed-handler` /
`edit-wizard-toggle-mode-handler`, both removed when Transaction Edit migrated, so it could
no longer load). Removed a stale unused `mm` require in `test_server.clj`.
**Not removed:** `form-cursor` (`fc/*`) is still used by ~18 non-wizard forms outside this
plan (accounts, ledger reports, users, imports, …) — out of scope. The Alpine
`alpine-morph` mechanism is still referenced by the whole-form-swap focus infra (the swap
doctrine), not the wizard machinery, so it stays. The lingering `MultiStepFormState`
mentions in migrated files are historical comments, not code.
**Verification:** a fresh from-disk JVM compiles without the deleted namespace; full e2e
suite **71/71**.