Data UI Backlog

State-gated buttons

Enable/disable a :button field by record state. Surfaced by dogfooding chores: the Complete button works on a chore already marked done — be-action's only guard is the in-progress check, so :spawn re-runs, overwrites the closure history (:completed-by :user replaces the join list), inserts a duplicate successor, and the scoreboard rollup double-counts the points.

Design: a :ui (:enabled-when ((:complete-status :ne "complete"))) subkey on :button fields — filter-row grammar minus the type key, AND composition (appending a row only restricts), gated on the status companion (not the :completed boolean, preserving re-run-after-failure), dual-consumed: the FE evaluates against editRecord and renders disabled, be-action enforces the same condition beside the running guard. Generalizes to Deploy / Generate gates; composes with the role-gating and list-form-button items. Scope: model.lisp (*ui-keys* + validation), backend.lisp (~10-line guard), App.tsx, docs, tests.

Implemented 2026-10-12 per the plan (state-gated-buttons-plan.org), no deviations:

Post-implementation notes: enabled-when-holds (a *compiled-model*-reading convenience over eval-condition-rows) is exported by the backend for hook / REPL use. The FE check is the manual chores-stg pass (no FE test runner exists; the shared fixture is its future replacement).

Plan: state-gated-buttons-plan.org.

Slot
1600
Status
60 Done
Tags
mvp, backend, frontend, model, bug
Contributors
Donnie
Plans
Plan: State-gated buttons (:ui :enabled-when)