-
-
Notifications
You must be signed in to change notification settings - Fork 69.3k
config-form: secret input fields fail to render with 'Unsupported type' error #39869
Copy link
Copy link
Open
Description
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
- Install OpenClaw and run gateway
- Open config UI for a channel that uses secret inputs (Feishu, Zalo, Matrix, Mattermost, etc.)
- Observe fields like
appSecret,botTokenshow 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.tsrendering logic - Confirmed the
anyOfhandler 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.