Skip to content

config-form: secret input fields fail to render with 'Unsupported type' error #39869

@ArvinDevel

Description

@ArvinDevel

Summary

The config UI fails to render configuration fields that use buildSecretInputSchema() (e.g., botToken, appSecret, verificationToken) with the error: "Unsupported type: . Use Raw mode."

Change Type

  • Bug fix

Scope

  • UI / DX

Linked Issue/PR

N/A (creating issue first)

User-visible / Behavior Changes

Current behavior:

  • Users see an error in the config UI for secret input fields
  • Cannot configure these fields through the UI
  • Must manually edit config files

After fix:

  • Secret input fields render as textarea accepting plain string or JSON object
  • Users can configure these fields via UI

Security Impact

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? Yes - UI now properly handles secret input format, but no change to actual secret storage/processing
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: Any (macOS/Linux/Windows)
  • Runtime: Node 22+
  • Repository: openclaw/openclaw

Steps

  1. Install OpenClaw and run gateway
  2. Open config UI for a channel that uses secret inputs (Feishu, Zalo, Matrix, Mattermost, etc.)
  3. Observe fields like appSecret, botToken show error "Unsupported type: . Use Raw mode."

Expected

  • Config fields render with appropriate input widgets

Actual

  • Error message displayed, field unusable in UI

Evidence

Failing UI component: ui/src/ui/views/config-form.node.ts in the anyOf/oneOf handler

Human Verification (required)

What I personally verified:

  • Inspected config-form.node.ts rendering logic
  • Confirmed the anyOf handler only primitive types and single-variant unions
  • Verified secret input schema creates string | {source, provider, id} union which fails
  • Tested fix locally in code review

Compatibility / Migration

  • Backward compatible? Yes - existing configs continue to work
  • Config/env changes? No
  • Migration needed? No

Failure Recovery

  • How to disable/revert: Revert the PR, config UI will fall back to error rendering (worst case: use raw config file editing)
  • Bad symptoms to watch for: Secret fields rendering incorrectly or not accepting both string and object formats

Risks and Mitigations

  • Risk: The textarea approach might be less user-friendly than separate input modes.
    • Mitigation: Follow-up PR can add a proper custom component with Simple/Advanced toggle if needed. This fix unblocks UI usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions