:button fields on :list-form (row-level actions)
Let :button fields appear in list views so an action can be fired from a row without opening the edit form. Named consumer: chores :complete — one-click completion from the list (the :spawn pattern is the easy case: sync, complete, close-and-refresh maps cleanly to list context).
Difficulty evaluated 2026-10-04 against the live image: moderate. Well-scoped, no schema or protocol changes, no new :ui keys; but it touches three enforced "buttons are update-form-only" invariants. Roughly a focused half-day of Lisp plus a day of frontend.
Opt-in shape: explicit :list-form field list naming the button. Keep :fields t excluding buttons (base types stay safe: :settings has a :change-password button and deliberately omits it). The wire already carries form membership, so no :ui subkey is needed. Rollups can't regress (:button on a rollup is already a compile error).
Backend touch points:
fe-fields(backend.lisp): the one-line exclusion clause(not (and (member form '(:list-form :add-form)) (equal field-type :button)))becomes list-form-eligible only when the explicit:fieldslist names the button.:add-formstays excluded.form-field-keys(backend.lisp): today drops:fileand:buttonkeys from record-value fetches. A listed button must appear in the schema but never hydrate (its compiled:source :alias-keyis nil — verified live; it would aggregate to nil). Surgical edit: shared by/api/listhydration,rec, andbe-list-column(allowed-values palettes) — a careless change alters/api/itempayloads too.- Status companion parity:
augment-update-formauto-appends:<button>-statusto explicit update-form lists; a list-form listing wants the same treatment so the FE can read row status (runningdisable, failed feedback). - Docs:
model-reference.mdforms rules ("Buttons appear on the update form only") and thefe-fieldseligibility list; testfe-fields-excludes-button-from-list-add(tests/action-tests.lisp) needs a list-form-eligible sibling.
Frontend (App.tsx):
- New
:buttonbranch in the list cell renderer: fire a slim list-action submit (type + row id + field to/api/actions), pending state, disabled while<field>-statusisrunning,fetchList()on completion. - Do not reuse
handleAction— it is coupled to the open edit form (editRecord,formDef, password gate, re-open on failure). A ~40-line sibling reusingpendingActionsis cleaner. - Async hooks (
:deploy-model): v1 is click-refresh only; per-row async status polling (the open form's 3s poller equivalent) is polish on top.
- Slot
- 16500
- Status
- 10 Open
- Tags
- backend, frontend, model
- Contributors
- Donnie