fix(ui): coerce form values to schema types before config.set#13468
Merged
gumadeiras merged 3 commits intoopenclaw:mainfrom Feb 11, 2026
Merged
fix(ui): coerce form values to schema types before config.set#13468gumadeiras merged 3 commits intoopenclaw:mainfrom
gumadeiras merged 3 commits intoopenclaw:mainfrom
Conversation
f7556b4 to
fd74e16
Compare
Contributor
Author
|
@greptile please re-review this PR. |
fd74e16 to
750e0c5
Compare
Contributor
Author
|
@greptile please re-review this PR. |
750e0c5 to
42af507
Compare
Contributor
Author
|
@greptile please re-review this PR. |
Contributor
Author
|
Note: #13452 also targets this issue with a different approach (coercing at input time in |
42af507 to
47f8e9e
Compare
…zation HTML <input> elements produce string .value properties, so numeric and boolean config fields can leak into configForm as strings. Add coerceFormValues() that walks the form object tree alongside the JSON Schema and converts string values back to their schema-defined types before JSON serialization. Fixes openclaw#13348
47f8e9e to
61feb7e
Compare
zapabob
pushed a commit
to zapabob/clawdbot
that referenced
this pull request
Feb 11, 2026
…aw#13468) Co-authored-by: Gustavo Madeira Santana <[email protected]>
shan-mx
pushed a commit
to shan-mx/openclaw
that referenced
this pull request
Feb 11, 2026
…aw#13468) Co-authored-by: Gustavo Madeira Santana <[email protected]>
michaelleone
pushed a commit
to michaelleone/openclaw
that referenced
this pull request
Feb 11, 2026
…aw#13468) Co-authored-by: Gustavo Madeira Santana <[email protected]>
Patrick3131
added a commit
to Patrick3131/openclaw
that referenced
this pull request
Feb 11, 2026
* main: (936 commits) fix: use configured base URL for Ollama model discovery (openclaw#14131) docs: modernize gateway configuration page (Phase 1) (openclaw#14111) docs(skills): update mintlify skill to reference docs/ directory (openclaw#14125) chore: update AGENTS.md and add mintlify skill (openclaw#14123) chore(irc): sync plugin version to 2026.2.10 fix(cli): drop logs --localTime alias noise fix(config): avoid redacting maxTokens-like fields (openclaw#14006) feat: Add --localTime option to logs command for local timezone display (openclaw#13818) fix: don't lowercase Slack channel IDs (openclaw#14055) fix(plugins): ignore install scripts during plugin/hook install fix(gateway): default-deny missing connect scopes fix(web-search): handle xAI Responses API format in Grok provider Feat/litellm provider (openclaw#12823) docs: start 2026.2.10 changelog section chore: bump version to 2026.2.10 docs: remove outdated pricing information docs: add Terraform IaC approach to Hetzner guide fix(ui): coerce form values to schema types before config.set (openclaw#13468) chore: make merge PR comment mandatory + skill name fix 🤖 memory-lancedb: avoid plugin-sdk enum helper in local TypeBox schema (openclaw#13897) ...
GoddessSerenity
pushed a commit
to GoddessSerenity/openclaw
that referenced
this pull request
Feb 12, 2026
…aw#13468) Co-authored-by: Gustavo Madeira Santana <[email protected]>
Takhoffman
pushed a commit
to tomsun28/openclaw
that referenced
this pull request
Feb 12, 2026
…aw#13468) Co-authored-by: Gustavo Madeira Santana <[email protected]>
sauerdaniel
pushed a commit
to sauerdaniel/openclaw
that referenced
this pull request
Feb 12, 2026
…aw#13468) Co-authored-by: Gustavo Madeira Santana <[email protected]>
dbachelder
pushed a commit
to dbachelder/openclaw
that referenced
this pull request
Feb 13, 2026
…aw#13468) Co-authored-by: Gustavo Madeira Santana <[email protected]>
Baukebrenninkmeijer
pushed a commit
to orq-ai/openclaw
that referenced
this pull request
Feb 13, 2026
…aw#13468) Co-authored-by: Gustavo Madeira Santana <[email protected]>
skyhawk14
pushed a commit
to skyhawk14/openclaw
that referenced
this pull request
Feb 13, 2026
…aw#13468) Co-authored-by: Gustavo Madeira Santana <[email protected]>
cloud-neutral
pushed a commit
to cloud-neutral-toolkit/openclawbot.svc.plus
that referenced
this pull request
Feb 15, 2026
…aw#13468) Co-authored-by: Gustavo Madeira Santana <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #13348
HTML
<input>elements always produce string.valueproperties. While the formrendering code converts most values correctly, some interactions (map-field
repopulation, re-renders, paste) can leak raw strings into
configFormstate.When these string values are serialized and sent to
config.set, the gateway'sZod validation rejects them because it expects numbers/booleans.
This PR adds a
coerceFormValues()utility that walks the form object treealongside the JSON Schema and converts string values back to their schema-defined
types (number, integer, boolean) before serialization. It's called in the new
serializeFormForSubmit()helper used by bothsaveConfigandapplyConfig.Changes
ui/src/ui/controllers/config/form-coerce.ts— recursive schema-awaretype coercion (handles objects, arrays, anyOf/oneOf, additionalProperties)
ui/src/ui/controllers/config.ts— addedserializeFormForSubmit()that coerces form values before JSON serialization
ui/src/ui/controllers/config/form-utils.node.test.ts— 10 testscovering coercion of numbers, booleans, integers, empty strings, anyOf unions,
null/undefined passthrough, and non-numeric string rejection
Test plan
pnpm buildpassespnpm checkpasses (format + typecheck + lint)Greptile Overview
Greptile Summary
This PR fixes a form submission typing bug by coercing stringly-typed form state back into schema-defined JSON types before submitting to
config.set/config.apply. It introduces a recursivecoerceFormValues()walker keyed off the existingJsonSchemashape (including objects, arrays, anyOf/oneOf, and additionalProperties), then routes both save/apply through a sharedserializeFormForSubmit()helper inui/src/ui/controllers/config.ts.New node-level tests exercise numeric/boolean coercion, empty-string clearing behavior, nullable(anyOf) recursion, tuple arrays, and preservation of already-correct values.
Confidence Score: 5/5