refactor(ssr): de-fake simple-mode account cursor via explicit render (heuristic 1)
simple-mode-fields* rendered its single account row by rebinding the form cursor to a synthetic MapCursor rooted at accounts[0] (faking a deep starting position). Replace that with explicit-data rendering: account-field-name builds the exact field names the cursor would produce at [:step-params :transaction/accounts 0 field] (via path->name2), and account-field-errors reads errors from the same path -- no re-rooted cursor. This is the render-fn rewrite the earlier with-field-default shortcut couldn't be (that mutated the cursor and broke the simple-mode swap). Scorecard: faked cursor roots 2 -> 0 (both heuristic-1 items now clear for this modal). Parity held: swap spec 6/6 (its vendor tests run in simple mode), Shared Location save green, full suite 31 pass / no regression.
This commit is contained in:
@@ -39,14 +39,15 @@ Each migration appends one row (after-numbers), referencing the before in the di
|
||||
| Phase | Modal | LOC | Routes | no-cursor twins | faked roots | snapshot merges | OOB | mixed hx- | cookbook reused / added |
|
||||
|-------|-------|-----|--------|-----------------|-------------|-----------------|-----|-----------|-------------------------|
|
||||
| 1 (baseline) | Transaction Edit `transaction/edit.clj` | 1608 | ~12 | 1 | 2 | ~75 | 0 | 8 | — / seeded 7 entries |
|
||||
| 2 (in progress) | Transaction Edit `transaction/edit.clj` | 1555 | ~12 | **0** | 2 | ~75 | 0 | 8 | — / 0 |
|
||||
| 2 (in progress) | Transaction Edit `transaction/edit.clj` | 1570 | ~12 | **0** | **0** | ~75 | 0 | 8 | — / 0 |
|
||||
|
||||
> **Phase 2 progress (partial).** Achieved with parity held (swap spec 6/6 + Shared
|
||||
> Location green): deleted the dead `*-no-cursor*` twin (no-cursor 1→0, −53 LOC) and fixed
|
||||
> a real production bug (`:mode` leaking into the upsert → 500 on every advanced manual
|
||||
> save). **Still open** for this modal — and intentionally *not* forced under parity risk:
|
||||
> faked cursor roots (2 — de-faking needs the render-fn rewrite, see `gotchas.md`), the
|
||||
> snapshot round-trip (~75 — removed by the wizard→plain-form reclassification), Selmer
|
||||
> conversion of the render fns, and route collapse (~12 → ~3). These are the bulk of the
|
||||
> modal migration and require restructuring the modal's rendering wholesale rather than
|
||||
> isolated edits; track as the continuation of Phase 2.
|
||||
> Location green, full suite 31 pass / no regression): deleted the dead `*-no-cursor*`
|
||||
> twin (no-cursor 1→0), **de-faked the simple-mode cursor** (faked roots 2→0) by rendering
|
||||
> the row from explicit data with explicit field names (`account-field-name`) + explicit
|
||||
> error lookup — the render-fn rewrite the `with-field-default` shortcut couldn't do — and
|
||||
> fixed a real production bug (`:mode` leaking into the upsert → 500 on every advanced
|
||||
> manual save). **Still open** for this modal: the snapshot round-trip (~75 — removed by
|
||||
> the wizard→plain-form reclassification), Selmer conversion of the render fns, and route
|
||||
> collapse (~12 → ~3). These remain the bulk of the migration and need wholesale
|
||||
> restructuring of the modal's rendering; track as the continuation of Phase 2.
|
||||
|
||||
Reference in New Issue
Block a user