fix(control-ui): support raw edits from editable config#86700
fix(control-ui): support raw edits from editable config#86700BlackFrameAI wants to merge 1 commit into
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: passed. Reviewed May 25, 2026, 10:13 PM ET / 02:13 UTC. Summary PR surface: Source 0, Tests +23. Total +23 across 3 files. Reproducibility: yes. from source inspection: current main generates configRaw from sourceConfig/resolved/config for raw:null snapshots but then disables Raw mode and rejects raw submit when snapshot.raw is not a string. I did not run tests because this review was required to keep the checkout read-only. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the focused UI fix if maintainers accept the generated raw/redaction-restore contract; otherwise keep Raw mode gated to snapshots with original raw text and solve editable raw export as an explicit gateway contract. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: current main generates configRaw from sourceConfig/resolved/config for raw:null snapshots but then disables Raw mode and rejects raw submit when snapshot.raw is not a string. I did not run tests because this review was required to keep the checkout read-only. Is this the best way to solve the issue? Yes, with maintainer risk acceptance: changing availability and submit eligibility together is the narrow fix, and the PR keeps the server-side config.set/config.apply redaction-restore contract unchanged. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 93015982d391. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source 0, Tests +23. Total +23 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Moonlit Crabkin Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
@clawsweeper automerge |
|
🦞🔧 Source: I will update this PR branch, or open a safe credited replacement, if the repair worker finds a narrow CI fix. Automerge progress:
|
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
|
ClawSweeper 🐠 reef update Thanks for the contribution here. ClawSweeper tried the original lane first, but branch permissions blocked the push, so a replacement PR is carrying the fix forward. Why replacement: ClawSweeper could not update the source PR branch directly; GitHub did not grant sufficient push rights to the bot for that branch.
fish notes: model gpt-5.5, reasoning high; reviewed against befbe16. |
What changed
config.set/config.apply.raw: nullsnapshot.Supersedes #86640 and #86641. Those split PRs were not independently safe because raw-mode visibility and raw-mode submit eligibility need to change together.
Why
The gateway can return redacted config snapshots where
rawis missing or null while editable structured config is still available throughsourceConfig,resolved, orconfig.applyConfigSnapshotalready serializes that editable config intoconfigRaw.Before this change, the UI could only treat Raw mode as available when the snapshot originally included raw text. If only structured config was available, Raw mode was forced off even though serializable raw text existed. The submit guard had the same mismatch and rejected generated raw drafts.
This keeps availability, rendering, and submit behavior aligned around the same editable-snapshot behavior.
Real behavior proof
OpenClaw 2026.5.25, token-authenticated Control UI athttp://127.0.0.1:18789/config, backed by running OpenClaw gateway processes from/home/icon/CodexOps/OpenClaw/dist/index.js.openclaw-appstate, staged a raw-mode draft, clicked Save, and intercepted the browser client request to inspect the outgoing payload without mutating the real config file.config.setrequest containing generated raw text and the live snapshot base hash. The request was intercepted only to avoid modifying the local operator config during proof capture.Validation
../node_modules/.bin/vitest run --config vitest.config.ts src/ui/controllers/config.test.tsfromui/