engine: boosted forms now submit (bind-boost-form was discarding method/action)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 40s

Fixes "the remove button does nothing — no network, no console". A plain form on
a boosted (sx-boost) page has no sx-get/sx-post, so the SPA engine boosts it and
binds submit -> execute-request. But bind-boost-form called
`(execute-request form nil nil)` — discarding the method+action it was handed —
and execute-request then asks get-verb-info for a verb, gets nil, and no-ops. So
EVERY plain boosted form silently did nothing: the related-posts "remove" button,
the editor Save button, the is-a-tag toggle.

Fix: pass the form's own method+action as the verbInfo
`(dict "method" method "url" action)`, so the request actually fires (body built
from the form fields). A latent web-engine bug surfaced by the host's edit page —
the first page with plain boosted POST forms.

Test: relate-picker.spec.js gains a remove-button case (relate, reload, click
remove, assert the relation is gone) — 7/7. WASM rebuilt (boot-helpers.sxbc).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 17:07:07 +00:00
parent c0007740e7
commit f1bd6f1557
4 changed files with 35 additions and 4 deletions

View File

@@ -579,7 +579,13 @@
(dom-listen
form
"submit"
(fn (e) (prevent-default e) (execute-request form nil nil)))))
;; A boosted form has no sx-get/sx-post, so get-verb-info returns nil and
;; execute-request would no-op (the "submit does nothing — no network"
;; bug). Pass the form's own method+action as the verbInfo so it actually
;; fires the request (and the body is built from the form fields).
(fn (e)
(prevent-default e)
(execute-request form (dict "method" method "url" action) nil)))))
(define
bind-client-route-click
(fn