Skip to content

fix(ui): preserve schema-backed settings edits - #116282

Merged
vincentkoc merged 5 commits into
mainfrom
fix/control-ui-config-form-integrity
Jul 30, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
fix/control-ui-config-form-integrity

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jul 30, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Schema-backed Control UI Settings could discard invalid JSON drafts, expose controls that could not produce schema-valid values, partially save optional nested structures, reuse stale row/validation state, or coerce numeric input differently from the schema validator.

What Changed

  • retain invalid scalar, JSON, collection, and nested-structure drafts with visible validation;
  • normalize supported schema composition while failing unrepresentable paths closed to Raw mode;
  • enforce exact string, numeric, object, array, tuple, enum, and collection constraints;
  • stage optional object/array values locally and commit them atomically only when complete;
  • preserve repeated-row identity and roll controls back when a parent rejects an edit;
  • bound automatic defaults and support valid whole-array constrained transitions;
  • keep explicit decimal/scientific coercion without accepting JavaScript-only number syntax.

The numeric grammar and regression coverage preserve the contribution from @wangmiao0668000666 in #109675.

Screenshot Proof

Invalid JSON draft retained Pattern-constrained collection draft
Invalid JSON remains editable with an inline validation error Pattern-constrained collection draft remains visible with validation feedback

Both artifact URLs were rechecked successfully before reopening this PR.

Verification

  • 177/177 focused Control UI tests passed across 12 files.
  • Mocked Control UI browser E2E passed 1/1.
  • Core-test and UI tsgo checks passed.
  • All 30 touched UI TypeScript files passed type-aware oxlint.
  • Changed-file formatting, diff hygiene, Knip dead-export checks, and Control UI i18n verification passed.
  • Whole-branch autoreview was clean; subsequent dead-export, i18n, type-only, and changelog deltas were each autoreviewed clean.
  • During landing, main briefly regressed one subagent store mock and four unrelated Control UI E2E contracts. The repairs landed in fix(ci): restore subagent announce-loop guard coverage #116307 and fix(ui): restore Workboard routing and full-gate contracts #116342 and are included through signed merge commit 0ca19dcc4b06.
  • On that actual current-main merge result, 110/110 focused checks passed: 85 config runtime tests, 5 registry tests, 19 real-Chromium integrity/rejection tests, and 1 mocked-Gateway real-Chromium E2E. The two screenshot proofs were recaptured and visually verified.

The Blacksmith changed gate failed twice before checks because Testbox sync/API calls timed out. The trusted-source local fallback completed every check through core/UI typechecking; its broad repository-wide core lint eventually timed out in unrelated shards without reporting a lint finding. PR CI remains authoritative for that broad lane.

Stack Status

The former dependency, #116029, is merged. This PR targets main directly and supersedes the closed stacked PR #116030, which GitHub cannot reopen because its original base branch was deleted.

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Jul 30, 2026
@vincentkoc vincentkoc self-assigned this Jul 30, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: XL maintainer Maintainer-authored PR labels Jul 30, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 30, 2026 07:17
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 30, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 10:59 AM ET / 14:59 UTC.

ClawSweeper review

What this changes

The PR revises the Control UI’s schema-backed settings form to retain invalid drafts, validate renderable schema constraints, and avoid partial saves of optional structured settings.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for maintainer review. This is a member-authored PR carrying the maintainer label, so conservative cleanup must not auto-close it; the remaining decision is whether fail-closed schema handling always leaves existing settings with a clear Raw-mode editing path.

Likely related people: vincentkoc is the strongest routing candidate from the merged settings-write foundation and this follow-up; wangmiao0668000666 is relevant to the incorporated numeric-coercion work.

Priority: P2
Reviewed head: 0ca19dcc4b06c728bd800f2a81a43838d003fbdf
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The PR presents focused screenshot and browser-test evidence, but its large compatibility-sensitive form change still needs maintainer confirmation of the Raw-mode fallback and a current merge-result CI refresh.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The external-contributor proof gate does not apply to this member-authored PR; its body nevertheless provides two Control UI screenshot artifacts and describes focused browser evidence.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this member-authored PR; its body nevertheless provides two Control UI screenshot artifacts and describes focused browser evidence.
Evidence reviewed 5 items Protected maintainer handling: The provided PR context identifies the author association as MEMBER and includes the protected maintainer label; repository policy requires keeping such items open for explicit maintainer handling.
Current patch boundary: The proposed branch adds schema constraint/validation helpers and updates Control UI form rendering so unsupported schema paths can be handled separately from supported controls.
Prior review continuity: The latest completed ClawSweeper cycle reported no line-level findings but required maintainer confirmation that schemas moved to Raw mode retain an available and comprehensible editing path.
Findings None None.
Security None None.

How this fits together

The Control UI loads configuration values and a JSON schema from the Gateway, turns supported portions into settings controls, then sends edits through the configuration runtime. This PR changes the form’s schema analysis, draft ownership, validation, and numeric coercion before an update is submitted.

flowchart LR
  A[Gateway schema] --> C[Control UI settings runtime]
  B[Current config values] --> C
  C --> D[Schema-backed settings form]
  D --> E[Draft preservation and validation]
  E --> F[Raw mode or update request]
  F --> G[Gateway config validation]
  G --> H[Saved configuration]
Loading

Decision needed

Question Recommendation
Do maintainers approve routing schema forms that cannot faithfully represent existing constraints to Raw mode, provided the operator retains a clear editing and recovery path? Confirm Raw-mode fallback: Verify that every unsupported existing settings path presents a usable Raw-mode route and then refresh required checks before merge.

Why: This is a product and compatibility judgment about existing settings usability, not a mechanical correctness question settled by the added form tests.

Before merge

  • Resolve merge risk (P1) - A schema that previously rendered editable controls may now be routed to Raw mode or reject edits when the form cannot represent its constraints; maintainers should verify every affected existing setting still has a visible, understandable editing route.
  • Resolve merge risk (P1) - The branch is behind current main and the supplied check summary includes one failed UI E2E shard and a failed CI gate, so required checks should be rerun against the actual merge result before landing.
Agent review details

Security

None.

PR surface

Source +2726, Tests +4330. Total +7056 across 30 files.

View PR surface stats
Area Files Added Removed Net
Source 18 2863 137 +2726
Tests 12 4332 2 +4330
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 30 7195 139 +7056

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: ui/src/components/config-form-copy-on-write.test.ts, serialized state: ui/src/e2e/config-form-integrity.e2e.test.ts, serialized state: ui/src/lib/config/index.test.ts, vector/embedding metadata: ui/src/components/config-form-array-identity.test.ts, vector/embedding metadata: ui/src/components/config-form-array-integrity.browser.test.ts, vector/embedding metadata: ui/src/components/config-form-collection-draft.ts, and 8 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Prove the fallback before merge (recommended)
    Confirm with a representative existing schema that a form-unsafe setting visibly routes to a usable Raw-mode editor, then refresh the required CI result.
  2. Accept the stricter editor contract
    Maintainers may accept the Raw-mode transition if they explicitly own the compatibility tradeoff for existing settings schemas.
  3. Pause for schema UX direction
    Leave the PR open if the team does not yet want Raw mode to be the standard fallback for unrepresentable form schemas.

Technical review

Best possible solution:

Preserve the fail-closed form behavior only where Raw mode remains a clear, available fallback for the operator, then rebase or refresh the branch and obtain required CI proof on the merged result.

Do we have a high-confidence way to reproduce the issue?

Unclear whether the original failures still reproduce on current main; the branch supplies focused Control UI regression and Chromium scenarios that make the affected paths source-reproducible, but the supplied context does not establish a fresh before-fix reproduction against current main.

Is this the best way to solve the issue?

Unclear: retaining invalid drafts and preventing partial structured writes is the right direction, but the fail-closed Raw-mode contract needs explicit maintainer confirmation before this can be called the best solution for existing schemas.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against ca1328dddbb6.

Labels

Label justifications:

  • P2: This repairs a bounded Control UI configuration-editing path with meaningful but non-emergency operator impact.
  • merge-risk: 🚨 compatibility: The branch changes how existing schema-backed settings are rendered and may shift some users from dedicated controls to Raw mode.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this member-authored PR; its body nevertheless provides two Control UI screenshot artifacts and describes focused browser evidence.

Evidence

What I checked:

  • Protected maintainer handling: The provided PR context identifies the author association as MEMBER and includes the protected maintainer label; repository policy requires keeping such items open for explicit maintainer handling.
  • Current patch boundary: The proposed branch adds schema constraint/validation helpers and updates Control UI form rendering so unsupported schema paths can be handled separately from supported controls. (ui/src/components/config-form.analyze.ts:1, 0ca19dcc4b06)
  • Prior review continuity: The latest completed ClawSweeper cycle reported no line-level findings but required maintainer confirmation that schemas moved to Raw mode retain an available and comprehensible editing path. (ui/src/components/config-form.node.ts:47, e0b76b78f19c)
  • Related merged foundation: The related settings-write serialization work merged as a separate predecessor, so this branch should be judged as the form-integrity follow-up rather than as a replacement for concurrent write handling. (ui/src/lib/config/index.ts:404, 9eee6181d7b9)
  • Review-state evidence: The supplied check state shows the branch is mergeable but behind main, with checks-ui-e2e (1/4) and the CI gate failed; this needs an exact-head refresh before merge but does not establish a patch defect by itself. (0ca19dcc4b06)

Likely related people:

  • vincentkoc: Authored the current form-integrity branch and the separately merged settings-write foundation that this branch depends on. (role: recent area contributor; confidence: high; commits: 0ca19dcc4b06, 9eee6181d7b9; files: ui/src/components/config-form.node.collection.ts, ui/src/lib/config/index.ts)
  • wangmiao0668000666: The PR explicitly incorporates the numeric coercion grammar and regression coverage from the related Control UI numeric-input work. (role: adjacent contributor; confidence: medium; commits: 39df5c3f5c3a; files: ui/src/components/config-form.constraints.ts, ui/src/lib/config/index.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Confirm that representative unsupported schemas retain a visible Raw-mode editing path.
  • Refresh the branch against current main and resolve or rerun the required UI E2E and CI-gate checks.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-07-30T07:22:38.999Z sha 42cad2f :: needs maintainer review before merge. :: none
  • reviewed 2026-07-30T07:35:48.499Z sha ab1749e :: found issues before merge. :: [P2] Remove the release-owned changelog entry
  • reviewed 2026-07-30T07:43:31.950Z sha 7d01edb :: needs maintainer review before merge. :: none
  • reviewed 2026-07-30T07:49:09.269Z sha 7d01edb :: needs maintainer review before merge. :: none
  • reviewed 2026-07-30T08:27:11.024Z sha e0b76b7 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-30T08:32:19.559Z sha e0b76b7 :: needs maintainer review before merge. :: none

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 30, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Jul 30, 2026
@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Jul 30, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 30, 2026
* origin/main: (99 commits)
  docs(automation): rename scheduled-tasks feature wording to Automations (#114855)
  feat(ui): finish cron -> Automations rename in visible strings (#114853)
  feat(cli): add openclaw automations alias and reword cron display prose (#114854)
  feat(agents): rename scheduler agent tool cron -> automations (#114841)
  fix(tui): preserve session state across switches and reconnects (#116399)
  feat(agents): report CLI command outcomes in channel progress
  fix(cli): preserve explicit option intent (#116389)
  fix(release): trust update restart harness (#116301)
  test(reef): remove false-green live guard smoke (#116393)
  test(comfy): evaluate live guards after setup (#116388)
  fix(heartbeat): serialize wake lifecycle state (#116351)
  test: remove redundant extension boundary wrapper (#116385)
  fix(test): bound Testbox agentic and extension suites (#115696)
  fix(ui): show the correct Threads page size (#116349)
  test(discord): align progress timing expectations (#116377)
  feat(ui): add composable skill references (#116330)
  fix(qa): prevent Slack cleanup from stalling profile runs (#116361)
  fix(ci): validate frozen release candidates faithfully (#116357)
  improve(ci): fail_fast option for release validation, off by default (#116352)
  fix(agents): compare shell tool names case-insensitively and stop re-parsing tool labels
  ...
@openclaw-barnacle openclaw-barnacle Bot removed the agents Agent runtime and tooling label Jul 30, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@vincentkoc

Copy link
Copy Markdown
Member Author

Maintainer landing check complete for exact head 0ca19dcc4b06c728bd800f2a81a43838d003fbdf.

The compatibility choice and required proof are accepted. Merging.

@vincentkoc
vincentkoc merged commit 183db47 into main Jul 30, 2026
177 of 180 checks passed
@vincentkoc
vincentkoc deleted the fix/control-ui-config-form-integrity branch July 30, 2026 15:08
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 31, 2026
* fix(ui): harden schema-backed settings controls

Co-authored-by: wangmiao0668000666 <[email protected]>

* test(ui): match config secret label in Chromium

* chore(ui): remove release-owned changelog entry

* test(agents): mock incremental registry persistence

---------

Co-authored-by: wangmiao0668000666 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant