Skip to content

refactor(ui): deduplicate session menus and hovercards - #125478

Merged
steipete merged 6 commits into
mainfrom
steipete/w4-ui-dedup
Aug 18, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/w4-ui-dedup

Conversation

@steipete

@steipete steipete commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI carried two independent implementations of session-owner assignment menus and three copies of portaled-hovercard lifecycle/bootstrap behavior. Those copies already encoded subtle, surface-specific focus rules and were vulnerable to drifting independently. The Gateway method gate also retained an older-version tolerance for missing method/scopes metadata even though the bundled UI and Gateway ship as one version and the current hello protocol requires both fields.

Why This Change Was Made

This extracts canonical session-owner menu rendering/parsing, lazy hovercard definition, and portaled hovercard intent/placement mechanics. Domain data loading and focus policy remain in each hovercard runtime: GitHub keeps its pointer-vs-focus release behavior, session links remain noninteractive, and progress cards retain store/revision ownership. Gateway method gating now fails closed when the current required metadata is absent while preserving the explicit registered-but-unadvertised method escape hatch.

The same required-metadata rule now owns session-specific mutation access too. Session-link focus intent is recorded across pointer-to-keyboard transitions, so a focused trigger continues holding its card open after the pointer leaves.

Protocol claims were checked against packages/gateway-protocol/src/schema/frames.ts and src/gateway/server/ws-connection/connect-hello.ts: features.methods, auth.role, and auth.scopes are required and emitted by the current producer.

Red-main repair

While this PR was being prepared, canonical main CI run 32092049192 failed eslint(max-lines): ui/src/pages/chat/chat-pane-render.ts was 715 physical lines and 702 lint-counted lines. Clear provenance: commit 47399310a08e from PR #125231 added four task-suggestion properties, moving the effective count from 698 to 702; the code/PR author and merger were @vyctorbrzezowski on August 17, 2026.

This PR repairs main without a suppression by extracting the final header/board/sidebar/lightbox frame into the concept-owned chat-pane-layout-render.ts sibling. chat-pane-render.ts is now 640 physical lines, leaving comfortable headroom while keeping render order and behavior unchanged.

User Impact

Normal current-version behavior is unchanged, with one shared implementation now protecting menu semantics, hovercard accessibility, traversal grace, viewport clamping, and lazy property restoration. Unsupported or malformed Gateway hello payloads no longer enable gated actions by omission.

Production LOC: +773/-827 (net -54) | Tests/test support: +631/-362 (net +269) | Tooling: +0/-0

AI-assisted: yes. I reviewed the implementation and verified the source contracts directly.

Evidence

  • node scripts/run-vitest.mjs ui/src/components/session-menu.test.ts ui/src/pages/chat/components/chat-header-session-menu.test.ts ui/src/components/github-link-hovercard.test.ts ui/src/components/session-link-hovercard.test.ts ui/src/app/native-link-routing.test.ts ui/src/lib/gateway-methods.test.ts — 92 tests passed.
  • OPENCLAW_CAPTURE_UI_PROOF=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/session-progress-hovercard.e2e.test.ts ui/src/e2e/github-link-hovercard.e2e.test.ts — 7 real-browser mocked-Gateway tests passed, including pointer traversal, dialog ARIA, keyboard focus, viewport bounds, and lazy registration.
  • pnpm test:ui — full Control UI suite passed: 687 files, 9,828 tests, 1 intentional skip.
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/operator-admin.e2e.test.ts — 4 tests passed; missing method metadata now disables admin mutations without dispatch.
  • node scripts/run-vitest.mjs ui/src/lib/gateway-methods.test.ts ui/src/lib/session-method-access.test.ts ui/src/components/session-link-hovercard.test.ts — 27 tests passed, including missing metadata and hover-to-focus regressions.
  • node scripts/run-vitest.mjs ui/src/pages/chat after rebasing onto main — 138 files passed, 2,931 tests passed, 2 files/11 tests intentionally skipped.
  • CI-repair acceptance — 50 task-suggestion/chat-pane tests, pnpm tsgo:ui, and targeted oxfmt --check passed.
  • node scripts/check-changed.mjs after the final commit — passed formatting, guards, max-lines, dead-export scans, UI/core test typechecks, lint/style checks, and Control UI i18n verification.
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --stream-engine-output plus the focused CI-repair autoreview — clean; no accepted/actionable findings.
  • Exact-head CI run 32093252481 — green.

Portaled progress card after lazy pointer activation:

Portaled progress card

Keyboard focus visibly transferred into the portaled card link:

Keyboard focus inside progress hovercard

@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 18, 2026 00:36
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Aug 18, 2026
@steipete steipete self-assigned this Aug 18, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 10:59 PM ET / August 18, 2026, 02:59 UTC.

ClawSweeper review

What this changes

The PR centralizes Control UI session-owner menus and portaled hovercard mechanics, disables privileged actions when required Gateway hello metadata is absent, and splits chat layout rendering to restore the line-limit margin.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

No blocking correctness finding. Keep this maintainer-authored, maintainer-labeled PR open for an explicit landing decision and current-main refresh; its fail-closed handling of incomplete Gateway metadata matches the scoped Control UI policy.

Priority: P2
Reviewed head: 6187fc9401f0608da1e618bcccf27b985e3c815e
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong scoped behavior evidence and a coherent net-negative refactor support a normal-good rating, subject to the current-main refresh.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: This maintainer-authored PR includes after-fix Control UI screenshots and browser-flow evidence; the external-contributor proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR includes after-fix Control UI screenshots and browser-flow evidence; the external-contributor proof gate does not apply.
Evidence reviewed 8 items Current Gateway contract: The protocol requires features.methods, auth.role, and auth.scopes, while the Gateway producer emits all three in its hello response.
Capability-gate implementation: The changed UI helpers deny calls unless the connection, advertised method catalog, and scope array are all present; session mutations use the same rule.
Shared UI owner boundary: Lazy registration preserves pre-upgrade properties, and the shared controller owns portal mounting, accessibility attributes, close timing, and viewport positioning for all three hovercard surfaces.
Findings None None.
Security None None.

How this fits together

The Control UI consumes the Gateway hello response to decide which operator actions it can expose, and renders session menus and hovercards over chat and sidebar content. This change routes those inputs through shared UI helpers before producing accessible controls and previews.

flowchart LR
  A[Gateway hello response] --> B[Capability and scope checks]
  B --> C[Session mutation controls]
  D[Chat and sidebar triggers] --> E[Shared hovercard bootstrap]
  E --> F[Portaled hovercard controller]
  F --> G[Accessible preview dialog]
  C --> H[Operator action request]
Loading

Decision needed

Question Recommendation
Should this maintainer-authored UI refactor land after a current-main refresh with the documented unsupported version-skew behavior intact? Refresh and land: Rebase or validate the current three-way merge, rerun exact-head checks, and land if the documented unsupported skew boundary remains unchanged.

Why: The scoped UI policy supports the behavior, but this protected maintainer item is behind main and requires an explicit maintainer landing judgment.

Before merge

  • Resolve merge risk (P1) - Merging intentionally disables privileged controls for separately served, cross-origin, or development Control UIs paired with a Gateway that omits required hello metadata; the scoped UI policy classifies that version-skew path as unsupported.
  • Resolve merge risk (P1) - GitHub reports this branch as behind current main, so maintainers should refresh the actual merge result and exact-head validation before landing.
  • Complete next step (P2) - No mechanical repair is indicated; a maintainer must decide on landing after the current-main refresh because the PR is maintainer-authored and protected.
Agent review details

Security

None.

PR surface

Source -13, Tests +228. Total +215 across 54 files.

View PR surface stats
Area Files Added Removed Net
Source 28 878 891 -13
Tests 26 526 298 +228
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 54 1404 1189 +215

Review metrics

Metric Value Why it matters
Production versus test delta production +780/-829 (net -49); tests/support +624/-360 (net +264) The broad refactor is net-negative in production code while adding focused interaction and capability-gate coverage.

Stored data model

Persistent data-model change detected: serialized state: ui/src/components/session-link-hovercard-registration.ts, serialized state: ui/src/components/session-link-hovercard.runtime.ts, serialized state: ui/src/components/session-link-hovercard.test.ts, serialized state: ui/src/components/session-menu.test.ts, serialized state: ui/src/components/session-menu.ts, serialized state: ui/src/components/session-organizer-batch-mutations.test.ts, and 32 more. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Merge-risk options

Maintainer options:

  1. Refresh the merge before landing (recommended)
    Rebase or validate the current three-way merge and rerun exact-head checks so the deliberate metadata-gating change is evaluated against current main.
  2. Accept the documented skew boundary
    Land with the understanding that unsupported separately served or cross-origin UI/Gateway version skew can disable privileged controls.

Technical review

Best possible solution:

Retain the single shared menu/hovercard implementation and fail-closed metadata gate, then rebase or otherwise refresh the current-main merge result before landing.

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

Not applicable: this is a refactor and policy-alignment PR rather than a standalone bug report; the PR supplies focused browser and unit coverage for the changed interactions.

Is this the best way to solve the issue?

Yes. Shared helpers replace three duplicated hovercard lifecycle implementations and two owner-menu implementations, while the required hello contract makes the removed legacy tolerance contrary to the scoped UI policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against aa8be5acf90e.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. This maintainer-authored PR includes after-fix Control UI screenshots and browser-flow evidence; the external-contributor proof gate does not apply.

Label justifications:

  • P2: This affects normal Control UI controls and accessibility behavior without evidence of a critical active outage.
  • merge-risk: 🚨 compatibility: Incomplete hello metadata will now disable privileged UI actions for unsupported version-skew setups that previously remained permissive.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR includes after-fix Control UI screenshots and browser-flow evidence; the external-contributor proof gate does not apply.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. This maintainer-authored PR includes after-fix Control UI screenshots and browser-flow evidence; the external-contributor proof gate does not apply.

Evidence

What I checked:

Likely related people:

  • steipete: Current branch ownership and local history include prior dashboard/session UI work. (role: recent Control UI contributor; confidence: high; commits: 6187fc9401f0, 06480d767cef; files: ui/src/components/portaled-hovercard.ts, ui/src/lib/gateway-methods.ts)
  • Shakker: Local history identifies this contributor on the preceding Gateway access-control work that the capability gate builds on. (role: recent Gateway access contributor; confidence: medium; commits: c9c6edc2c158; files: ui/src/lib/gateway-methods.ts, src/shared/operator-scope-compat.ts)
  • vyctorbrzezowski: The merged suggested-task work introduced the line-limit pressure addressed by the extracted chat layout module. (role: related chat-layout contributor; confidence: high; commits: 47399310a08e; files: ui/src/pages/chat/chat-pane-render.ts, ui/src/pages/chat/chat-pane-layout-render.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Refresh the branch against current main and confirm exact-head checks on the resulting merge candidate.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-08-18T00:43:48.747Z sha 30a59fb :: found issues before merge. :: [P2] Fail closed the session-mutation access helper
  • reviewed 2026-08-18T01:20:48.728Z sha e05cf22 :: needs changes before merge. :: [P2] Fail closed session mutation access | [P2] Record focus before returning for an active session link
  • reviewed 2026-08-18T02:01:08.256Z sha 4836ce1 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-18T02:28:34.796Z sha d1e2cb524e15d24b8bfda2d4a40f1536056bcce0 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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 rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 18, 2026
@steipete
steipete force-pushed the steipete/w4-ui-dedup branch from 4836ce1 to d1e2cb5 Compare August 18, 2026 02:22
@steipete
steipete force-pushed the steipete/w4-ui-dedup branch from d1e2cb5 to f30f410 Compare August 18, 2026 02:44
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready at 6187fc9401f0608da1e618bcccf27b985e3c815e.

The red-main max-lines failure is repaired without a suppression: chat-pane-render.ts is 640 physical lines (main was 715 physical / 702 lint-counted), with the existing final header/board/sidebar/lightbox frame moved into chat-pane-layout-render.ts. Provenance is commit 47399310a08e / PR #125231, whose four task-suggestion properties moved the lint-counted file from 698 to 702.

Verification:

  • node scripts/run-vitest.mjs ui/src/pages/chat — 138 files and 2,931 tests passed; 2 files/11 tests intentionally skipped.
  • node scripts/run-vitest.mjs ui/src/pages/chat/chat-pane-task-suggestions.test.ts ui/src/pages/chat/chat-task-suggestions.test.ts ui/src/pages/chat/chat-pane.test.ts — 50 tests passed after the CI repair.
  • pnpm tsgo:ui and targeted oxfmt --check — passed.
  • node scripts/check-changed.mjs — passed after the final commit, including the max-lines ratchet.
  • Structured branch and focused CI-repair autoreviews — no accepted/actionable findings.
  • Exact-head CI 32093252481 — green. The prior exact-head run exposed the nullable loader type and two rebased formatter drifts; both were repaired and locally re-gated before this run.
  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 125478 — passed via hosted exact-head/recent-parent evidence; remote head tree verified.

ClawSweeper has no patch finding or technical P1 stop. Its P1 compatibility note is the intentional unsupported mixed-version UI/Gateway boundary documented in ui/AGENTS.md, accepted for this merge; its remaining rank-up move was exact-head CI, now satisfied. No new screenshot was captured for the behavior-neutral file split; the PR's existing browser screenshots and E2E evidence cover the user-visible interaction changes.

@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Aug 18, 2026
@steipete
steipete merged commit 974a52f into main Aug 18, 2026
416 of 446 checks passed
@steipete
steipete deleted the steipete/w4-ui-dedup branch August 18, 2026 03:15
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 18, 2026
* refactor(ui): share session menu and hovercard mechanics

* test(ui): align fixtures with gateway hello contract

* fix(ui): close session access and focus gaps

* test(ui): advertise sidebar custodian method

* refactor(ui): split chat pane layout rendering

* fix(ui): align rebased chat render checks
steipete added a commit that referenced this pull request Aug 18, 2026
…ways

canCallGatewayMethod hardened to strict advertisement+scope checks (#125478),
which made the new ensureSchemaLoaded gate silently skip config.schema for
legacy hellos without advertised scopes or a method list. Schema loads now
skip only on a definitive denial (method advertised absent, or advertised
scopes without operator.read), reusing the fail-open hasOperatorReadAccess
semantics the rest of the non-admin UI uses; regression test pins the
legacy snapshot path.
steipete added a commit that referenced this pull request Aug 18, 2026
…ways

canCallGatewayMethod hardened to strict advertisement+scope checks (#125478),
which made the new ensureSchemaLoaded gate silently skip config.schema for
legacy hellos without advertised scopes or a method list. Schema loads now
skip only on a definitive denial (method advertised absent, or advertised
scopes without operator.read), reusing the fail-open hasOperatorReadAccess
semantics the rest of the non-admin UI uses; regression test pins the
legacy snapshot path.
steipete added a commit that referenced this pull request Aug 18, 2026
…ors (#125492)

* test(control-ui): add --operator-scopes flag to the mock dev server

* feat(control-ui): simplified settings experience for non-admin operators

Non-admin browsers previously saw every settings page, many of which
dead-ended or rendered enabled controls whose RPCs fail with
'missing scope: operator.admin'.

- config.schema drops from operator.admin to operator.read: the schema is a
  static document describing options whose values are already readable via
  read-scoped config.get; admin-only schema only broke read-only settings
  rendering (Automation/Infrastructure/AI Agents/Communications showed
  'Schema unavailable. Use Raw.').
- Settings sidebar and settings search hide admin-only routes (custodian,
  labs, updates, automation, infrastructure, mcp, security, secrets,
  cloud-workers, communications, ai-agents, model-setup) for non-admin
  viewers; legacy gateways without advertised scopes keep the full UI.
- Channels, Devices, Worktrees, Memory Import, Profile gate their mutation
  controls on actual scopes with 'Browsing only…' notices instead of
  enabled-but-failing buttons; Devices no longer fires device.pair.list /
  exec.approvals.get without the scopes to call them (kills the two red
  error callouts on page load).
- Scope-upgrade banner: dismissing it in the guidance phase (no in-app
  upgrade path) now hides it fully instead of leaving a permanent chip.
- Config write coordinator surfaces scope refusals as a visible
  admin-required error instead of silently resolving false.

* test(control-ui): advertise config.schema in the mock dev gateway

ensureSchemaLoaded now checks method advertisement + scope before loading
the schema; the mock harness must advertise config.schema like a real
gateway does or schema-driven settings pages render empty in the mock.

* fix(control-ui): close the worktree create draft on scope downgrade

* perf(doctor): isolate memory health artifact

Doctor lint loaded the broad Memory Core API barrel only to register health checks and read isolated check IDs. That synchronously pulled the full memory public graph into the first lint run, consuming most of the 120-second test budget.

Load a dedicated doctor-health public artifact instead and verify it is packaged. The bisect boundary was 9de3ca5 (#125571); because that commit only adds upgrade-test assets, it exposed a pre-existing runner-sensitive cost rather than introducing the expensive import path.

* test(control-ui): restore device lifecycle test boundary

* perf(control-ui): lazy-load settings sidebar

* fix(ui): recheck access after confirmations

* fix(control-ui): gate presence-driven device reloads on pairing access

The presence connectivity-change path still called device.pair.list without
operator.pairing, the same invariant the pair-event and poller paths already
guard; a limited browser got a doomed RPC on every connectivity change.

* fix(control-ui): fail open on schema loads for legacy scope-less gateways

canCallGatewayMethod hardened to strict advertisement+scope checks (#125478),
which made the new ensureSchemaLoaded gate silently skip config.schema for
legacy hellos without advertised scopes or a method list. Schema loads now
skip only on a definitive denial (method advertised absent, or advertised
scopes without operator.read), reusing the fail-open hasOperatorReadAccess
semantics the rest of the non-admin UI uses; regression test pins the
legacy snapshot path.

* test(control-ui): split schema-access coverage into its own file

runtime-config-capability.test.ts crossed the max-lines cap; the legacy
fail-open regression and its denial counterpart move to a colocated
schema-access test file.

* fix(scripts): keep mapped Vitest lanes at their measured no-output floor

The codex extension shard legitimately works in silence beyond 300s under
the default reporter (measured 61s import + 293s testing at ~95% CPU); the
CI-wide OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 env override shrank the
lane below that and the watchdog killed healthy runs, flipping with
incidental flake output (#125825). Per-config entries in
VITEST_CONFIG_NO_OUTPUT_TIMEOUT_MS now act as measured silence floors: a
global env value may widen a mapped lane's window but no longer shrinks it;
unmapped configs and the explicit '0' disable keep env verbatim. Adds the
codex extension lane to the map at the extra-long tier (same class as the
discord entry from #123025).
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
…ors (openclaw#125492)

* test(control-ui): add --operator-scopes flag to the mock dev server

* feat(control-ui): simplified settings experience for non-admin operators

Non-admin browsers previously saw every settings page, many of which
dead-ended or rendered enabled controls whose RPCs fail with
'missing scope: operator.admin'.

- config.schema drops from operator.admin to operator.read: the schema is a
  static document describing options whose values are already readable via
  read-scoped config.get; admin-only schema only broke read-only settings
  rendering (Automation/Infrastructure/AI Agents/Communications showed
  'Schema unavailable. Use Raw.').
- Settings sidebar and settings search hide admin-only routes (custodian,
  labs, updates, automation, infrastructure, mcp, security, secrets,
  cloud-workers, communications, ai-agents, model-setup) for non-admin
  viewers; legacy gateways without advertised scopes keep the full UI.
- Channels, Devices, Worktrees, Memory Import, Profile gate their mutation
  controls on actual scopes with 'Browsing only…' notices instead of
  enabled-but-failing buttons; Devices no longer fires device.pair.list /
  exec.approvals.get without the scopes to call them (kills the two red
  error callouts on page load).
- Scope-upgrade banner: dismissing it in the guidance phase (no in-app
  upgrade path) now hides it fully instead of leaving a permanent chip.
- Config write coordinator surfaces scope refusals as a visible
  admin-required error instead of silently resolving false.

* test(control-ui): advertise config.schema in the mock dev gateway

ensureSchemaLoaded now checks method advertisement + scope before loading
the schema; the mock harness must advertise config.schema like a real
gateway does or schema-driven settings pages render empty in the mock.

* fix(control-ui): close the worktree create draft on scope downgrade

* perf(doctor): isolate memory health artifact

Doctor lint loaded the broad Memory Core API barrel only to register health checks and read isolated check IDs. That synchronously pulled the full memory public graph into the first lint run, consuming most of the 120-second test budget.

Load a dedicated doctor-health public artifact instead and verify it is packaged. The bisect boundary was 76e459a (openclaw#125571); because that commit only adds upgrade-test assets, it exposed a pre-existing runner-sensitive cost rather than introducing the expensive import path.

* test(control-ui): restore device lifecycle test boundary

* perf(control-ui): lazy-load settings sidebar

* fix(ui): recheck access after confirmations

* fix(control-ui): gate presence-driven device reloads on pairing access

The presence connectivity-change path still called device.pair.list without
operator.pairing, the same invariant the pair-event and poller paths already
guard; a limited browser got a doomed RPC on every connectivity change.

* fix(control-ui): fail open on schema loads for legacy scope-less gateways

canCallGatewayMethod hardened to strict advertisement+scope checks (openclaw#125478),
which made the new ensureSchemaLoaded gate silently skip config.schema for
legacy hellos without advertised scopes or a method list. Schema loads now
skip only on a definitive denial (method advertised absent, or advertised
scopes without operator.read), reusing the fail-open hasOperatorReadAccess
semantics the rest of the non-admin UI uses; regression test pins the
legacy snapshot path.

* test(control-ui): split schema-access coverage into its own file

runtime-config-capability.test.ts crossed the max-lines cap; the legacy
fail-open regression and its denial counterpart move to a colocated
schema-access test file.

* fix(scripts): keep mapped Vitest lanes at their measured no-output floor

The codex extension shard legitimately works in silence beyond 300s under
the default reporter (measured 61s import + 293s testing at ~95% CPU); the
CI-wide OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 env override shrank the
lane below that and the watchdog killed healthy runs, flipping with
incidental flake output (openclaw#125825). Per-config entries in
VITEST_CONFIG_NO_OUTPUT_TIMEOUT_MS now act as measured silence floors: a
global env value may widen a mapped lane's window but no longer shrinks it;
unmapped configs and the explicit '0' disable keep env verbatim. Adds the
codex extension lane to the map at the extra-long tier (same class as the
discord entry from openclaw#123025).
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 maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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.

1 participant