Skip to content

feat: support date-time date fields and exclusive set options in form instruments - #1904

Merged
joshunrau merged 1 commit into
mainfrom
feat/update-libui
Nov 10, 2026
Merged

joshunrau merged 1 commit into
mainfrom
feat/update-libui

Conversation

@gdevenyi

@gdevenyi gdevenyi commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Instrument authors can now ask for a date picker with a time input on a date field, and can mark options of a set field that cannot be selected together with any other option (for example "None of the above"). This comes from @douglasneuroinformatics/libui 6.19.2 → 6.20.0 and @douglasneuroinformatics/libui-form-types 1.4.0 → 1.6.0.

Changes

  • A date field accepts an optional variant of 'date' (the default) or 'datetime'. With 'datetime', the form shows a time input beside the date picker and still stores one Date.
  • A set field accepts an optional exclusiveOptions list. When the respondent selects one of these options, the form disables all other options until it is deselected.
  • Instrument validation keeps both fields and rejects a variant that is not 'date' or 'datetime' and an exclusiveOptions that is not a list of strings.
  • All workspaces resolve one version of libui-form-types (1.6.0). Before, runtime-core used 1.4.0 and libui used 1.5.0.

Decisions

  • The form instrument schema declares the two new fields in this PR, not in a later one. The schema removes fields it does not declare, so a version bump alone would let an author type variant: 'datetime' and then lose it wherever the instrument is validated (the playground, and apps/web in development).
  • exclusiveOptions accepts any list of strings. The schema does not check each entry against the keys of options; the type in libui-form-types does that for authors at compile time. The alternative, a cross-field check, would put a .check on a schema that other schemas derive from.

Risks

  • An instrument whose date field already has an unexpected variant, or whose set field has an exclusiveOptions that is not a list, parsed before (the field was removed) and is now rejected. The types did not permit these fields before, so this is accepted.
  • exclusiveOptions is enforced only in the UI, as the upstream documentation states. An instrument that requires the rule must also put it in its validation schema.

Filed: #1905, #1906, #1907

Adversarial review

Reviewed at commit 2a7f6ce. pnpm check: green.

Findings

CLEAN

Attestation

I, Claude Fable 5.2, attest that the review block above reports the adversarial review as it ran on the commit named, with every finding it returned.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W53iURN7QK2xcGMnZ4oSN2

… instruments

Update @douglasneuroinformatics/libui from 6.19.2 to 6.20.0 and
@douglasneuroinformatics/libui-form-types from 1.4.0 to 1.6.0. The new
form types add an optional `variant` ('date' | 'datetime') to date
fields and an optional `exclusiveOptions` to set fields. The form
instrument schema now declares both, so validation keeps them and
rejects incorrect values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W53iURN7QK2xcGMnZ4oSN2
@gdevenyi
gdevenyi requested a review from joshunrau as a code owner November 10, 2026 04:49
Copilot AI balanced review requested due to automatic review settings November 10, 2026 04:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@joshunrau
joshunrau merged commit 5f261e1 into main Nov 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants