refactor(ssr): drop dead account-total / account-balance routes (heuristic 6)

The hx-select reference moved running totals into an inline #account-totals tbody that
refreshes via edit-form-changed, so nothing posts to ::route/account-total or
::route/account-balance anymore -- their route handlers were referenced only by their own
registrations. Remove the two handler fns, their route registrations, and the now-unused
route keys from routes/transactions.cljc. The pure account-total* / account-balance* fns
(used inline to render the totals) are untouched.

Scorecard: modal routes ~12 -> ~10. Full suite 31 pass / no regression.
This commit is contained in:
2026-06-03 06:33:52 -07:00
parent 57f3b63b6a
commit 07159dc221
3 changed files with 1 additions and 17 deletions

View File

@@ -39,7 +39,7 @@ 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 | | 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 | | 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` | 1570 | ~12 | **0** | **0** | ~75 | 0 | 8 | — / 0 | | 2 (in progress) | Transaction Edit `transaction/edit.clj` | ~1558 | **~10** | **0** | **0** | ~75 | 0 | 8 | — / 0 |
> **Phase 2 progress (partial).** Achieved with parity held (swap spec 6/6 + Shared > **Phase 2 progress (partial).** Achieved with parity held (swap spec 6/6 + Shared
> Location green, full suite 31 pass / no regression): deleted the dead `*-no-cursor*` > Location green, full suite 31 pass / no regression): deleted the dead `*-no-cursor*`

View File

@@ -387,12 +387,6 @@
"text-red-300")} "text-red-300")}
(format "$%,.2f" balance)])) (format "$%,.2f" balance)]))
(defn account-total [request]
(html-response (account-total* request)))
(defn account-balance [request]
(html-response (account-balance* request)))
(defn ->percentage [amount total] (defn ->percentage [amount total]
(when (and amount total (not= total 0)) (when (and amount total (not= total 0))
(* 100.0 (/ amount total)))) (* 100.0 (/ amount total))))
@@ -1526,14 +1520,6 @@
[:maybe entity-id]] [:maybe entity-id]]
[:account-id {:optional true} [:account-id {:optional true}
[:maybe entity-id]]])) [:maybe entity-id]]]))
::route/account-total (-> account-total
(mm/wrap-wizard edit-wizard)
(wrap-entity [:multi-form-state :snapshot :db/id] d-transactions/default-read)
(mm/wrap-decode-multi-form-state))
::route/account-balance (-> account-balance
(mm/wrap-wizard edit-wizard)
(wrap-entity [:multi-form-state :snapshot :db/id] d-transactions/default-read)
(mm/wrap-decode-multi-form-state))
::route/edit-form-changed (-> edit-form-changed-handler ::route/edit-form-changed (-> edit-form-changed-handler
(mm/wrap-wizard edit-wizard) (mm/wrap-wizard edit-wizard)
(wrap-entity [:multi-form-state :snapshot :db/id] d-transactions/default-read) (wrap-entity [:multi-form-state :snapshot :db/id] d-transactions/default-read)

View File

@@ -30,8 +30,6 @@
"/edit-submit" ::edit-submit "/edit-submit" ::edit-submit
"/edit-vendor-changed" ::edit-vendor-changed "/edit-vendor-changed" ::edit-vendor-changed
"/location-select" ::location-select "/location-select" ::location-select
"/account-total" ::account-total
"/account-balance" ::account-balance
"/toggle-amount-mode" ::toggle-amount-mode "/toggle-amount-mode" ::toggle-amount-mode
"/edit-form-changed" ::edit-form-changed "/edit-form-changed" ::edit-form-changed
"/edit-wizard-new-account" ::edit-wizard-new-account "/edit-wizard-new-account" ::edit-wizard-new-account