CLI answers form fields as strings, so boolean fields are unanswerable there too #7

Closed
opened 2026-08-25 18:25:54 +09:00 by floot · 1 comment
Owner

packages/cli/src/commands/inbox.js answers a form message by collecting string
values, the same way the UI did before floot/endo#3 was fixed. A field declared
M.boolean() therefore cannot be answered from the CLI: the daemon runs
mustMatch(value, pattern) on submit and a string never satisfies a boolean
pattern.

That makes endo inbox unable to approve any deploy workflow, which is exactly
the fallback you would want when the web UI is the thing being deployed.

The shape logic already exists and is UI-independent:
@endo/spaces-util/form-fields.js exports fieldKind, initialFormValues and
collectFormValues. The CLI needs the same coercion plus a way to type an
answer — accepting true/false/yes/no for a boolean field would do.

`packages/cli/src/commands/inbox.js` answers a form message by collecting string values, the same way the UI did before floot/endo#3 was fixed. A field declared `M.boolean()` therefore cannot be answered from the CLI: the daemon runs `mustMatch(value, pattern)` on submit and a string never satisfies a boolean pattern. That makes `endo inbox` unable to approve any deploy workflow, which is exactly the fallback you would want when the web UI is the thing being deployed. The shape logic already exists and is UI-independent: `@endo/spaces-util/form-fields.js` exports `fieldKind`, `initialFormValues` and `collectFormValues`. The CLI needs the same coercion plus a way to type an answer — accepting `true`/`false`/`yes`/`no` for a boolean field would do.
Author
Owner

Closing as not worth doing for now — the web UI can answer these forms since
floot/endo#3, and nobody is approving deploys from a terminal in practice.

If that changes, the shape logic is already UI-independent in
@endo/spaces-util/form-fields.js (fieldKind, initialFormValues,
collectFormValues); the CLI would need that coercion plus a way to type a
boolean answer.

Closing as not worth doing for now — the web UI can answer these forms since floot/endo#3, and nobody is approving deploys from a terminal in practice. If that changes, the shape logic is already UI-independent in `@endo/spaces-util/form-fields.js` (`fieldKind`, `initialFormValues`, `collectFormValues`); the CLI would need that coercion plus a way to type a boolean answer.
floot closed this issue 2026-08-25 23:34:53 +09:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
floot/endo#7
No description provided.