Skip to content

fix: keep read-only Control UI preferences browser-local - #120036

Merged
shakkernerd merged 10 commits into
mainfrom
workloop/make-read-only-control-ui-prefer-8f2903cd
Aug 6, 2026
Merged

shakkernerd merged 10 commits into
mainfrom
workloop/make-read-only-control-ui-prefer-8f2903cd

Conversation

@shakkernerd

Copy link
Copy Markdown
Contributor

Fixes #120021

What Problem This Solves

Read-only Control UI operators could change personal preferences, but the central preference writer ignored the known config.patch capability state.

It queued the change as server-bound, displayed pending or synchronized provenance, and attempted an admin-only config.patch. The preference became browser-local only after the Gateway rejected the request.

Why This Change Was Made

The preference lifecycle now:

  • Keeps connected read-only edits immediately browser-local.
  • Avoids queuing or dispatching config.patch when write capability is definitively unavailable.
  • Revalidates capability immediately before dispatch.
  • Preserves offline intent through read-only reconnects and replays it once after authorization.
  • Cancels only the targeted queued preference during a browser-local reset.
  • Reconciles cross-tab intent without resurrecting cancelled or stale values.
  • Applies settings as partial patches so stale UI snapshots cannot overwrite concurrent preference changes.
  • Shows browser-local provenance in Appearance, Chat View, and sidebar customization.

The shared policy covers all nine synchronized preferences: theme, theme mode, language, reasoning visibility, tool-call visibility, commentary persistence, send shortcut, follow-up mode, and sidebar entries.

Authorized and legacy clients retain server synchronization, explicit-null resets, cross-browser propagation, and validation-failure fallback. This does not change Gateway authorization, protocol, configuration schema, storage schema, or migrations.

User Impact

Read-only operators can personalize their browser without authorization errors or misleading sync claims. Their choices survive reloads, reset restores the applicable server value or product default, and offline changes remain available for a later writable connection.

Owner and administrator workflows continue syncing normally without additional steps.

Evidence

  • Production LOC: +571/-301 (net +270)
  • Tests and test support: +723/-60
  • 61 focused preference lifecycle tests passed.
  • 10 system-Chrome Control UI E2E tests passed.
  • All 15 changed-surface checks passed, including formatting, lint, type checks, dead exports, and file-size guards.
  • Exact-head OCM testing verified:
    • Read-only persistence and reload with zero config.patch frames.
    • Browser-local provenance and reset without an RPC.
    • Offline intent held through a read-only reconnect.
    • One-time replay after authorization.
    • Authorized synchronization with server configuration readback.
  • Blacksmith Testbox remained queued and the AWS managed broker was unavailable, so the focused automated verification used the explicitly authorized local fallback.
  • Independent exact-final review found no remaining actionable findings.
  • Documentation and the changelog are updated.

@shakkernerd
shakkernerd marked this pull request as ready for review August 6, 2026 19:21
@shakkernerd shakkernerd self-assigned this Aug 6, 2026
@shakkernerd
shakkernerd force-pushed the workloop/make-read-only-control-ui-prefer-8f2903cd branch from 36a37ff to 8236827 Compare August 6, 2026 20:40
@shakkernerd
shakkernerd force-pushed the workloop/make-read-only-control-ui-prefer-8f2903cd branch from 8236827 to db90dff Compare August 6, 2026 20:45
@shakkernerd
shakkernerd merged commit db90dff into main Aug 6, 2026
2 checks passed
@shakkernerd
shakkernerd deleted the workloop/make-read-only-control-ui-prefer-8f2903cd branch August 6, 2026 20:45
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI read-only preferences attempt unauthorized gateway writes

1 participant