Skip to content

fix: #94202 Raw config JSON not visible when entering Raw mode#94206

Closed
lzyyzznl wants to merge 2 commits into
openclaw:mainfrom
lzyyzznl:fix/issue-94202-config-not-visible
Closed

fix: #94202 Raw config JSON not visible when entering Raw mode#94206
lzyyzznl wants to merge 2 commits into
openclaw:mainfrom
lzyyzznl:fix/issue-94202-config-not-visible

Conversation

@lzyyzznl

@lzyyzznl lzyyzznl commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

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: rawRevealed defaulted to false in createConfigEphemeralState(), 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 rawRevealed default from false to true (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

  • Bug fix
  • New feature
  • Documentation
  • Code refactor
  • Test update
  • Dependency update

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:

  1. Start gateway: OPENCLAW_GATEWAY_TOKEN=evidence94202 OPENCLAW_SKIP_CHANNELS=1 node openclaw.mjs gateway --port 18789
  2. Start Control UI: pnpm ui:dev
  3. Open browser: playwright-cli open http://localhost:5173
  4. Login with token, navigate to Settings → Advanced → Click "Raw"

After-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 DOM
  • rawConfigVisible: true — textarea is interactive (not readonly)
  • hasCallout: false — no "sensitive values hidden" callout blocking the view
  • The raw JSON config is immediately visible and editable upon entering Raw mode

Observed 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

ui/src/ui/views/config.browser.test.ts — PASS (26) FAIL (0)

4 test cases updated to reflect new default behavior:

  • shows raw config visible by default when entering raw mode
  • redacts sensitive values in raw pending changes after toggle
  • resets raw reveal state when the config context changes
  • shows raw diff values by default under leaf wildcard sensitive hints

Files changed

  • ui/src/ui/views/config.ts — 1 line: rawRevealed: falserawRevealed: true
  • ui/src/ui/views/config.browser.test.ts — updated 4 test cases

@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. app: web-ui App: web-ui size: S labels Jun 17, 2026
@NianJiuZst

Copy link
Copy Markdown
Contributor

Should be closed.This issue has been resolved in v2026.6.8.

@lzyyzznl

Copy link
Copy Markdown
Contributor Author

After-fix Screenshot

Raw config textarea immediately visible when entering Raw mode (rawRevealed: true):

raw-config-after-fix

The fix changes the default of rawRevealed from false to true, so clicking "Raw" in Settings now immediately shows the editable raw JSON config instead of a hidden-by-callout state.

@NianJiuZst

Copy link
Copy Markdown
Contributor

After-fix Screenshot

Raw config textarea immediately visible when entering Raw mode (rawRevealed: true):

raw-config-after-fix

The fix changes the default of rawRevealed from false to true, so clicking "Raw" in Settings now immediately shows the editable raw JSON config instead of a hidden-by-callout state.

The image you provided is not visible.

@lzyyzznl

Copy link
Copy Markdown
Contributor Author

@NianJiuZst Thanks for the review, but I verified that upstream main (v2026.6.8) still has rawRevealed: false in createConfigEphemeralState():

https://github.com/openclaw/openclaw/blob/main/ui/src/ui/views/config.ts#L1176

function createConfigEphemeralState(): ConfigEphemeralState {
  return {
    rawRevealed: false,  // <-- still false on main

This 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 true so that clicking "Raw" immediately shows the config — the eye toggle remains for hiding sensitive values.

…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
@lzyyzznl
lzyyzznl force-pushed the fix/issue-94202-config-not-visible branch from b1b7ddf to 14173b0 Compare June 17, 2026 16:15
@lzyyzznl

Copy link
Copy Markdown
Contributor Author
after-fix This is evidence of the restoration.�

@NianJiuZst

Copy link
Copy Markdown
Contributor

I don't think this is a necessary change. The original issue was that this config was not visible, but that issue has been fixed. Currently, it's just not displayed by default; it's not a real bug.

@lzyyzznl

Copy link
Copy Markdown
Contributor Author

I don't think this is a necessary change. The original issue was that this config was not visible, but that issue has been fixed. Currently, it's just not displayed by default; it's not a real bug.
ok i will close it .thk u

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 size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: UI glitch: config is not visible

2 participants