fix: #94202 Raw config JSON not visible when entering Raw mode#94206
fix: #94202 Raw config JSON not visible when entering Raw mode#94206lzyyzznl wants to merge 2 commits into
Conversation
|
Should be closed.This issue has been resolved in v2026.6.8. |
The image you provided is not visible. |
|
@NianJiuZst Thanks for the review, but I verified that upstream main (v2026.6.8) still has function createConfigEphemeralState(): ConfigEphemeralState {
return {
rawRevealed: false, // <-- still false on mainThis causes the raw config textarea to be completely hidden when the config contains sensitive values (API keys, tokens) and the user hasn't clicked the reveal button. The issue reporter on v2026.6.1 was hitting exactly this. The fix changes the default to |
…ion hiding textarea When the user clicks 'Raw' mode in Settings, the raw config textarea was completely hidden by default because rawRevealed defaulted to false. This triggered the sensitive-value blurring logic to render only a callout message instead of the textarea, making the JSON appear 'not visible at all' to users. Change the default of rawRevealed from false to true so that the textarea and raw config JSON are visible immediately when entering Raw mode. The eye toggle remains available for users who want to hide sensitive values. Closes openclaw#94202
b1b7ddf to
14173b0
Compare

Summary
Fixes a UI bug where clicking "Raw" in Settings shows no JSON at all — the raw textarea was completely hidden by default due to sensitive-value redaction logic that defaulted to hidden state.
Root cause:
rawRevealeddefaulted tofalseincreateConfigEphemeralState(), causing the sensitive-value blurring logic (blurred = sensitiveCount > 0 && !cvs.rawRevealed) to render only a "X sensitive values hidden" callout instead of the textarea. Users clicking "Raw" saw no config at all.Fix: Changed
rawRevealeddefault fromfalsetotrue(1 line). When a user explicitly enters Raw mode, the textarea and raw JSON are immediately visible. The eye toggle remains available for hiding sensitive values (e.g., screenshots).Linked Issue
Closes #94202
Change Type
Risk Level
low
Real behavior proof
Behavior addressed: Raw config JSON not visible when clicking "Raw" in Settings. The textarea was hidden because sensitive-value redaction defaulted to hidden state.
Real environment tested: Linux, Node v25.9, pnpm, OpenClaw 2026.6.8 gateway with Control UI via Vite dev server, Chromium (Playwright)
Exact steps or command run after this patch:
OPENCLAW_GATEWAY_TOKEN=evidence94202 OPENCLAW_SKIP_CHANNELS=1 node openclaw.mjs gateway --port 18789pnpm ui:devplaywright-cli open http://localhost:5173After-fix evidence (DOM state from Playwright eval):
{ "url": "http://localhost:5173/config", "title": "OpenClaw Control", "hasRawTextarea": true, "rawConfigVisible": true, "hasSecretPill": "none", "hasCallout": false, "modeToggle": "Raw" }hasRawTextarea: true— textarea is rendered in the DOMrawConfigVisible: true— textarea is interactive (not readonly)hasCallout: false— no "sensitive values hidden" callout blocking the viewObserved result after the fix: When clicking "Raw" in Settings, the full raw JSON config is immediately visible in the textarea. The mode toggle correctly shows "Raw" as active. No redaction callout blocks the view.
What was not tested: Configs with many sensitive keys (API tokens) — the dev environment uses a minimal config without API keys. The sensitive-value toggle button was tested via unit tests.
Tests and validation
4 test cases updated to reflect new default behavior:
shows raw config visible by default when entering raw moderedacts sensitive values in raw pending changes after toggleresets raw reveal state when the config context changesshows raw diff values by default under leaf wildcard sensitive hintsFiles changed
ui/src/ui/views/config.ts— 1 line:rawRevealed: false→rawRevealed: trueui/src/ui/views/config.browser.test.ts— updated 4 test cases