Skip to content

fix: show the Gateway command default beside host rules in Devices - #207887

Merged
daniel-lxs merged 4 commits into
mainfrom
openclaw/devices-gateway-host-rule
Nov 29, 2026
Merged

daniel-lxs merged 4 commits into
mainfrom
openclaw/devices-gateway-host-rule

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

In Settings → Devices, saving Full can look like it allows commands. When the Gateway config says Deny, the host rule changes but ordinary Gateway commands are still denied.

User Impact

Devices now shows Host defaults separately from the read-only Gateway command defaults. Saving Full confirms which rule was saved and shows the Gateway default beside it. If a config change cannot be verified, Devices says Unknown until a successful read, without discarding the editable host settings. No migration or settings change is needed.

Why This Change Was Made

I reused Privacy & Security’s calculation and captions. The Gateway value uses the saved root config and the Gateway host’s reported defaults, not unsaved edits, node rules, agent overrides or session permissions. The editor still saves only the selected host’s rules, preserves its original save hash and leaves native policies read-only. No command enforcement or routing changed. Related: #191382 and #191467.

Evidence

On the current head, 6a5c7eb9da74, I changed a real Gateway from Full to Deny while Devices stayed mounted in Chrome. I replaced only the browser’s first post-change config.get response with an error after verifying that the Gateway returned Deny. Devices showed Unknown, then Deny on a successful read, with the same page, client and WebSocket throughout. The host rule stayed Full. The focused regression failed on the reviewed head (084044ac5a28: expected Unknown, got Full) and passed on the updated head. Clean, annotated and recovery screenshots with the fault-injection details.

The updated head passed 128 focused tests, UI typecheck, targeted lint, formatter parity, the runtime build and the production UI build. The earlier main comparison below is still valid: I compared 15a54eaa5479 with 084044ac5a28, saved host Full with tools.exec.security=deny and no mode, and verified that ordinary agent exec was still denied on both. That earlier revision also passed 184 focused tests, seven browser tests and i18n verification. The separate Workboard controller guard failed identically on untouched main. Hosted CI is separate from these local results.

Same viewport, light theme and isolated settings. Clean captures first, then the same frames with callouts.

Clean comparison

Before

Before: Devices shows Security: Full and Saved, without the Gateway default.

After

After: Devices shows Gateway command defaults: Deny beside the Full host rule.

Annotated comparison

Before

The host defaults row is highlighted.

After

The separate Gateway command defaults row is highlighted.

When the saved config is unavailable

Gateway command defaults shows Unknown instead of assuming Full.

Contributor: @daniel-lxs

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

🦞 Made with OpenClaw

roboclaw-bot and others added 2 commits November 29, 2026 01:49
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7dc9f740-bf98-45d1-a0f1-e3e892732e95
@clawsweeper

clawsweeper Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M labels Nov 29, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. labels Nov 29, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 29, 2026 01:59
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 29, 2026
@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

Shows saved Gateway command defaults beside editable host rules and includes the Gateway value in save confirmations.

Example: The Gateway config sets tools.exec.security=deny, and an operator saves host security as Full.

  • Before: Devices shows Security: Full and Saved without explaining why Gateway commands remain denied.
  • After: Devices separately shows Gateway command defaults: Deny and confirms that the host rules were saved.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, worthwhile correction with real-app visual evidence and distinct regressions for saved-versus-draft state, failed reads, recovery, and reconnects; broad CI is still pending.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): The inspected Chrome captures and accompanying real-Gateway scenario show separate Deny and Full values, scoped save feedback, and failed-read recovery from Unknown to Deny on the same mounted page.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Saving Full host rules can imply that Gateway commands are allowed even when the Gateway configuration denies them.
Reason: The maintainer-authored direction addresses a demonstrated misleading result without changing command enforcement, configuration options, or stored settings.

Merge readiness

✅ Ready for maintainer review

This PR corrects misleading command-permission feedback in Devices. The reviewed change preserves policy editing and introduces no blocking defects; CI remains pending.

Reviewed head: 6a5c7eb9da74fce543b228b325c7f26a63c73baf

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Devices page reads saved configuration and host approval defaults, derives a read-only command summary, and keeps host-policy writes with the existing approval editor.

flowchart TD
  A[Saved Gateway configuration] --> C[Shared policy calculation]
  B[Reported host defaults] --> C
  C --> D[Devices command summary]
  B --> E[Host policy editor]
  E --> F[Existing approval save RPC]
Loading

Technical review

Best possible solution:

Keep the shared Gateway-default calculation beside the existing host editor, preserving drafts and showing Unknown when saved facts cannot be verified.

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

Current-main source and the supplied before capture establish that a saved Full host rule lacks the separate Deny Gateway summary; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The change uses the existing calculation and captions, preserves the host editor’s write contract, and records read verification at the config owner instead of inferring it from editable data.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 793ccbd52f9e.

Provenance checked

  • Gateway policy calculation and captions keeps the original intent (0a93e42: Show configured command policy intersected with reported host defaults, using Unknown when the value cannot be established.)
  • Host-scoped editing and explicit save feedback keeps the original intent (554115b: Present each host’s defaults and agent overrides in place, retaining explicit hash-based approval saves.)
  • Draft retention across reconnects keeps the original intent (67c35e9: Keep unsaved settings and last-good data through ordinary reconnects while rejecting retired request results.)
  • Config ensure retry suppression keeps the original intent (02d8fa7: Prevent failed or unauthorized config reads from causing reactive retry loops and request storms.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 0a93e42 adds ui/src/pages/config/security-model.ts:97 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0a93e420f4f6; files: ui/src/pages/config/security-model.ts)
  • Peter Steinberger: Raw commit 2deffd0 adds ui/src/pages/devices/devices-policy-reads.ts:52 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2deffd0daf43; files: ui/src/pages/devices/devices-policy-reads.ts)

PR surface

Source +84, Tests +134, Docs +5. Total +223 across 17 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 11 135 51 +84
Tests 5 141 7 +134
Docs 1 6 1 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 17 282 59 +223

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-29T02:03:21.154Z sha 084044a :: passed. :: none

Reviewed November 28, 2026, 9:34 PM ET / November 29, 2026, 02:34 UTC (Revision 2).

roboclaw-bot and others added 2 commits November 29, 2026 02:20
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 93f7c654-f8e9-40e3-ba9a-9ab2c373faa2
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Failed config refresh on a mounted Devices page

I changed the saved Gateway security setting from Full to Deny with the CLI while Devices stayed open in Chrome. The real Gateway sent config.changed, then answered the browser’s config.get with the new Deny setting. I used Playwright to replace only that one reply on its way to the browser with an UNAVAILABLE error. The event, the request and all other frames passed through unchanged.

The reviewed revision (084044ac5a28) still showed Full after the failed read. The fix (6a5c7eb9da74) showed Unknown until the next successful read returned Deny. The page did not reload, the Gateway client and WebSocket did not change, and the editable host rule stayed Full. These are captures of the real app on AWS, not a mock Gateway or a recreated settings page.

Clean comparison

Before: after the read failed

Devices still shows Full even though the saved Gateway config changed.

After: after the read failed

Devices shows Unknown for the Gateway default and keeps the Full host rule.

Annotated comparison

Before

Stale Full value highlighted.

After

Unverified Gateway default highlighted.

After a successful read on the same connection

The Gateway default recovers to Deny, while the host rule stays Full.

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@daniel-lxs
daniel-lxs merged commit e7d6904 into main Nov 29, 2026
93 checks passed
@daniel-lxs
daniel-lxs deleted the openclaw/devices-gateway-host-rule branch November 29, 2026 02:47
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…line

* commit 'c876514dc21154a07f3755320495d2a93584b46b': (538 commits)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  test(activity): check midnight refresh against the elapsed window (#207859)
  test(ui): use one persisted message ID in queued-image handoff (#207861)
  test(agents): release configured MCP fixture resources (#207716)
  fix(workboard): clear CI failures in the session filter editor (#207858)
  perf(ai): reduce allocation in OpenAI Responses streams (#207889)
  chore: stop the Workboard resident-owner CLI test from failing on main (#207898)
  test(agents): isolate endpoint-based overflow classification (#207688)
  chore(doctor): record why the root defaultModel migration stays (#207890)
  refactor(infra): simplify audit recovery write progress (#157141)
  fix: show restart blockers in service logs (#207879)
  test(infra): exercise group identity in session roundtrip (#207671)
  test(infra): exercise live owner expiry policy (#207672)
  feat: let Knowledge learn from your Gmail through Composio (#207266)
  test: stop the history-worker overload test from failing CI on slow runners (#207862)
  test(auth): assert SecretRef plaintext is absent from storage (#207698)
  chore(doctor): hold expired doctor migrations as removal-pending (#207865)
  fix: show ended one-time automations in History (#201280)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
* commit '2194d14488091e2047d2f87ebbb093212f30840e': (540 commits)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  test(activity): check midnight refresh against the elapsed window (#207859)
  test(ui): use one persisted message ID in queued-image handoff (#207861)
  test(agents): release configured MCP fixture resources (#207716)
  fix(workboard): clear CI failures in the session filter editor (#207858)
  perf(ai): reduce allocation in OpenAI Responses streams (#207889)
  chore: stop the Workboard resident-owner CLI test from failing on main (#207898)
  test(agents): isolate endpoint-based overflow classification (#207688)
  chore(doctor): record why the root defaultModel migration stays (#207890)
  refactor(infra): simplify audit recovery write progress (#157141)
  fix: show restart blockers in service logs (#207879)
  test(infra): exercise group identity in session roundtrip (#207671)
  test(infra): exercise live owner expiry policy (#207672)
  feat: let Knowledge learn from your Gmail through Composio (#207266)
  test: stop the history-worker overload test from failing CI on slow runners (#207862)
  test(auth): assert SecretRef plaintext is absent from storage (#207698)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…seline

* commit '32403124cae2ccbcfc556e844b218682b133956e': (547 commits)
  perf(gateway): skip session display preparation for transcript recall (#207916)
  test(agents): verify complete bracketed paste payload (#207733)
  test: stop timing out the cron recovery settlement test on slow runners (#207920)
  fix: show when worktree cleanup stopped or will retry (#207883)
  fix: show approval destinations only when the forwarding mode uses them (#207885)
  fix: keep inherited tools when changing agent settings (#207884)
  feat: let Knowledge add someone's email or other alias to a page without rewriting it (#207881)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  test(activity): check midnight refresh against the elapsed window (#207859)
  test(ui): use one persisted message ID in queued-image handoff (#207861)
  test(agents): release configured MCP fixture resources (#207716)
  fix(workboard): clear CI failures in the session filter editor (#207858)
  perf(ai): reduce allocation in OpenAI Responses streams (#207889)
  chore: stop the Workboard resident-owner CLI test from failing on main (#207898)
  test(agents): isolate endpoint-based overflow classification (#207688)
  chore(doctor): record why the root defaultModel migration stays (#207890)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…eline

* commit 'eee1e0553d29456424ac367008c3cf080f9866ec': (550 commits)
  fix(acp): deliver bound channel replies to the pending question (#207035)
  fix(cron): keep required reports from going silent when nothing changes (#207044)
  test(sessions): assert participant queue rollback state (#207891)
  perf(gateway): skip session display preparation for transcript recall (#207916)
  test(agents): verify complete bracketed paste payload (#207733)
  test: stop timing out the cron recovery settlement test on slow runners (#207920)
  fix: show when worktree cleanup stopped or will retry (#207883)
  fix: show approval destinations only when the forwarding mode uses them (#207885)
  fix: keep inherited tools when changing agent settings (#207884)
  feat: let Knowledge add someone's email or other alias to a page without rewriting it (#207881)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  test(activity): check midnight refresh against the elapsed window (#207859)
  test(ui): use one persisted message ID in queued-image handoff (#207861)
  test(agents): release configured MCP fixture resources (#207716)
  fix(workboard): clear CI failures in the session filter editor (#207858)
  perf(ai): reduce allocation in OpenAI Responses streams (#207889)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…ions suite

* commit '60e80f1c5fd439f7aa4ce33f54985c7efdc30884': (555 commits)
  refactor: remove the bundled GBrain adapter (#207924)
  improve(ui): show optional run limits beside the automation schedule (#201283)
  test(onboarding): inspect recorded output for credential leaks (#207872)
  perf(exec): reduce host memory sampler allocations (#207927)
  test(mcp-relay): isolate the Connected apps fallback locale (#207923)
  fix(acp): deliver bound channel replies to the pending question (#207035)
  fix(cron): keep required reports from going silent when nothing changes (#207044)
  test(sessions): assert participant queue rollback state (#207891)
  perf(gateway): skip session display preparation for transcript recall (#207916)
  test(agents): verify complete bracketed paste payload (#207733)
  test: stop timing out the cron recovery settlement test on slow runners (#207920)
  fix: show when worktree cleanup stopped or will retry (#207883)
  fix: show approval destinations only when the forwarding mode uses them (#207885)
  fix: keep inherited tools when changing agent settings (#207884)
  feat: let Knowledge add someone's email or other alias to a page without rewriting it (#207881)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
* commit 'ba0a7a5fac3e2f1b642d05502273b98dc75adf4f': (556 commits)
  test(agents): fix provider header filtering coverage (#207732)
  refactor: remove the bundled GBrain adapter (#207924)
  improve(ui): show optional run limits beside the automation schedule (#201283)
  test(onboarding): inspect recorded output for credential leaks (#207872)
  perf(exec): reduce host memory sampler allocations (#207927)
  test(mcp-relay): isolate the Connected apps fallback locale (#207923)
  fix(acp): deliver bound channel replies to the pending question (#207035)
  fix(cron): keep required reports from going silent when nothing changes (#207044)
  test(sessions): assert participant queue rollback state (#207891)
  perf(gateway): skip session display preparation for transcript recall (#207916)
  test(agents): verify complete bracketed paste payload (#207733)
  test: stop timing out the cron recovery settlement test on slow runners (#207920)
  fix: show when worktree cleanup stopped or will retry (#207883)
  fix: show approval destinations only when the forwarding mode uses them (#207885)
  fix: keep inherited tools when changing agent settings (#207884)
  feat: let Knowledge add someone's email or other alias to a page without rewriting it (#207881)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
…penclaw#207887)

If a config change cannot be verified, Devices says Unknown until a successful read, without discarding the editable host settings.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7dc9f740-bf98-45d1-a0f1-e3e892732e95
OpenClaw-Publication: 93f7c654-f8e9-40e3-ba9a-9ab2c373faa2
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 docs Improvements or additions to documentation impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

2 participants