Skip to content

fix(ui): Config form shows 'unsupported schema node' for anyOf/oneOf fields #267

Closed

Description

@sreekaransrinath

Problem

The config form in the web dashboard shows "unsupported schema node. Use Raw." errors for many fields that use JSON Schema anyOf/oneOf unions:

  • Literal unions: Thinking Default, Verbose Default, Elevated Default, Block Streaming Default/Break, Bind, Mode, Config Reload Mode
  • Primitive unions: Memory, Memory Swap, Timestamp Prefix (string | number, boolean | string)
  • Arrays with union items: Allow From, Group Channels, Reaction Allowlist

Root Cause

Two issues in ui/src/ui/views/config-form.ts:

  1. Rendering: The renderNode function had no handling for anyOf/oneOf schemas - it just showed an error
  2. Analysis: The normalizeUnion function only handled literal unions and single-variant optionals, marking primitive unions (string | number) as unsupported before rendering

Fix

PR: #268

Rendering changes:

  • Literal unions ("off" | "on" | "high") → dropdown with index-based values to preserve types
  • Primitive unions (string | number) → text input with smart type coercion (regex-validated numbers, boolean detection)
  • Single-variant optionals (type + null) → unwrap and render inner type
  • Plain schema.enum → fixed to use index-based values (was stringifying all values)

Analysis changes:

  • normalizeUnion now recognizes primitive unions as supported
  • allOf excluded from union normalization (stays unsupported, matches renderer)
  • Mixed literal+primitive unions gated to avoid misclassification

Still Unsupported (by design)

These are genuinely complex and would need more sophisticated UI:

  • ulimits: anyOf: [string, number, {soft, hard}] - mixed primitives + object
  • entries: Deeply nested maps with additionalProperties

Testing

Manually verified in web dashboard - fields now render as dropdowns/inputs instead of errors.

Activity

  1. sreekaransrinath commented on Jan 6, 2026

    @sreekaransrinath
    ContributorAuthor
    Image
  2. added a commit that references this issue on Feb 9, 2026
  3. added a commit that references this issue on Feb 22, 2026
  4. locked as resolved and limited conversation to collaborators on Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions