Skip to content

refactor: deslop UI pages/components and gateway server methods (wave-5 bundle A) - #172989

Merged
steipete merged 8 commits into
mainfrom
deslop/bundle-w5a-ui-gateway-20261015
Oct 15, 2026
Merged

steipete merged 8 commits into
mainfrom
deslop/bundle-w5a-ui-gateway-20261015

Conversation

@steipete

@steipete steipete commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Bundles the maintainer-requested wave-5 cleanup of duplicate UI presentation plumbing and Gateway server-method logic.

User Impact

No user-visible change: rendering is identical, and both Lit and Solid remain. Public contracts, authorization, durable user data, and the Phase E memory backend are preserved. No migration or user action is required.

Why This Change Was Made

The bundle removes 553 net production lines (+537/-1,090); including tests and the shrink-only assertion ratchet, 593 net lines (+590/-1,183) across 82 files, measured against main base 9b2bc0ed7e1.

  • UI pages (y02): reuse page lifecycle, plugin-icon and config-save owners; remove unused request options, metadata and forwarding modules. Remove the now-unreferenced picker-hiding CSS rule.
  • UI components/lib/app/styles (y03): share menu-trigger and bounded text-diff logic, trust immutable source identities, remove redundant preference-read verification and unsupported Popover fallback, and consolidate identical/dead CSS.
  • Gateway methods (y05): reuse catalog, pairing, response, history and coercion owners; carry prepared facts instead of repeating internal validation, copies or impossible fallbacks.

The catalog-read cleanup in agents-list.ts and the update-handler cleanup in update-status.ts were withdrawn after the first CI run. Both files are byte-identical to the starting main base. Legacy scalar concurrency and the existing update-handler contract therefore remain unchanged. The assertion-safety allowance for task-suggestions.ts shrinks from five to zero, matching the actual cleaned source; its canonical ratchet check passes.

Accepted best-effort tradeoffs: failed channel artwork retries at the next refresh rather than a trailing ensure; native overlay generations own picker close/reopen instead of a second click embargo; background writes adopt authoritative receipts and see other-browser changes through normal events/refresh; an in-flight pairing request keeps its selected adapter; internal canonical receipts and immutable snapshots are trusted instead of revalidated. Live effect authority, input/security boundaries, ordering and required persistence remain.

The only content conflict was model-providers/core-load.ts. Main's newer request/active lifecycle and completion-notification ordering win: the overlapping loader consolidation was dropped, retaining only unused completion-metadata/type cleanup. The y02 icon-review finding was independently checked against the unchanged page caller and shared icon owner: client/source replacement synchronously resets requests before ensuring new data; late URLs are revoked, so another helper-local client fence is unnecessary.

Source-lane credit: y02 deslop/y02-ui-pages-rest-20261015 at 63f9b71438e, y03 deslop/y03-ui-components-lib-app-20261015 at 04025248e3a, and y05 deslop/y05-gateway-server-methods-20261015 at 41bb6503cee. All six source commits are included; source totals are adjusted for current-main overlap and conflict resolution. No changelog edits.

Evidence

PR CI is the broad proof, without green-chasing reruns. Local checks below ran against the complete frozen bundle at 1804237d5843be16173e773742686b036e4e9c85 (the final commit only records the reviewed CSS deletion).

Conflict-focused catalog/login-refresh proof passes: 2 files / 19 tests, 182.84s Vitest (230.98s wrapper). UI production types and scoped Gateway/MCP-consumer production types pass. All retained TS/TSX files pass typed lint; only the unchanged picker cleanup reactivity warning remains. Runtime and full static import graphs both pass with zero cycles.

Fresh independent P0–P2 review completed through the requested Keychain route, with three findings checked and declined (not a clean provider verdict): injected delivery metadata is already explicitly typed and populated in place by its owner; cached tool cards are fully constructed immutable snapshots with read-only production consumers, not the synthetic in-place mutation assumed by the finding; and the retired sidebar collapse class has no production renderer (the existing sidebar test asserts its absence). No accepted/actionable finding remains.

Formatting of 79 retained files, stylesheet lint, and whitespace checks pass. Both renderer paths remain; there is no visual change requiring before/after screenshots.

The local lint-suppression audit passed 2/3 tests and failed its existing inventory expectation: stale panel-hosted-tabs suppression plus three cold-load-probe entries. The test and implicated files are byte-identical to the pinned main base, and the bundle adds no suppressions. No allowlist or baseline was weakened. The wrapper stopped before UI tests, so conflict-focused catalog/login-refresh tests were run separately and passed in isolated HOME/OpenClaw/XDG state. Suppression run: 100.74s Vitest / 148.78s wrapper. This is a recorded inherited local failure, not a claimed pass; hosted failure classification and native admission still apply.

First CI and correction

Run 38712298906 failed. No reruns were requested.

Failed job Investigation and disposition
checks-fast-baseline-ratchets New stale assertion allowance: task-suggestions.ts actual 0 versus allowance 5. Removed that row; canonical local replay passes.
checks-node-changed-compact-small-19 sessions-read.test.ts legacy scalar concurrency case. Isolated head replay produced no selected-case result after more than ten minutes; terminated the owned runner and joined cleanup. Inconclusive: withdrew all agents-list.ts hunks.
checks-node-changed-compact-large-18 Three update-effective-channel.test.ts cases. Isolated head replay: one existing import timeout and two context.getRuntimeConfig is not a function failures. Withdrew all update-status.ts hunks.
checks-node-changed-7 QA-lab node-worker-launch-wire resource-claim/borrower-join harness failure, without an extracted behavioral assertion. Attribution remains unknown; no claim of inheritance or repair.
openclaw/ci-gate Downstream aggregate failure.

The correction received a fresh independent review through the requested Keychain route: scoped-clean P0–P2, exit 0. Both restored handlers are byte-identical to starting main. The assertion ratchet is tightened, not weakened. No test timeout, skip, assertion, or retry was changed. Isolated main comparison attempts are recorded separately when complete; they are not needed to justify withdrawing the uncertain hunks.

Main comparison for the same three update cases ran serially in a clean baseline checkout at 9abed103f5c, with fresh isolated HOME/OpenClaw/XDG state. The handlers, tests, and catalog owner match starting main exactly. Result: two existing 120-second timeouts and one missing-warning assertion failure, 857.78s Vitest. These do not reproduce the head's two runtime-config type errors; attribution is inconclusive, so the entire changed path remains withdrawn rather than asserted inherited.

The scalar-catalog case was replayed separately on the same isolated main baseline after update cleanup completed. It likewise produced no selected-case result after more than ten minutes (worker outputs were reused successfully); the owned runner was terminated and managed cleanup joined. Both head/main attempts are inconclusive, and all agents-list.ts hunks remain withdrawn.

Final hosted proof

CI run 38717715968 completed successfully for corrected head 6ba1ec25286f8cf2a6a3f9fec515e59dccca69d3, with all 94 jobs completed and no failed jobs. This was the one substantive corrective push, not a rerun. No inherited-red exception was used. The original QA harness failure remains unexplained; its absence on the corrected run is not claimed as a causal repair.

…work

Fold sole-caller Config and Cron adapters into their existing owners, reuse
canonical controller types, and remove unused request arguments and login
selection options. Adopt the complete background mutation receipt instead of
rereading the write; keep authoritative preflight and live ownership checks.

Best-effort tradeoffs accepted: a later background edit in another browser is
reflected by normal preference events or refresh, not an unconditional read of
our own successful write. The introducing feature PR #168301 does not identify
a human incident requiring that reread. Settled rendering and public contracts
are unchanged; both shipping renderer paths remain intact.
Share point-menu trigger attributes and deletion-first LCS traversal. Remove
an obsolete empty-badge predicate, a one-caller loading facade, and redundant
whole-map translation fallback. Preserve both active Lit and Solid paths,
positioning formulas, diff work budgets, visible text, and rendering.

Best-effort tradeoffs accepted:
- Trust successful synchronous Web Storage writes instead of reading them back.
  Introducing PR #162428 supplied synthetic storage failures, not a human
  incident where successful setItem silently failed. Nonconforming Storage
  replacements may miss a cache publication until the next refresh.
- Trust immutable message/tool-card identities for cached source previews.
  PR #148431's in-place mutation assertions were synthetic; production owners
  publish replacement snapshots. Unsupported in-place mutation may leave a
  decoration stale until replacement. Run/frame/origin and external source
  validation remain unchanged.

Net production reduction: 76 lines; tests: 20 lines removed, only synthetic
same-object mutation assertions. Kept config coercion tied to human Safari
report #13348, along with security, durability, ordinary navigation ownership,
and all active migration paths.

Focused proof: 73 boot/cache/diff tests, 82 menu tests, 46 badge/assistant tests,
20 i18n tests, 8 browser details tests, 3 lint-suppression tests; UI typecheck,
formatting, stylesheet lint and CSS declaration parity passed.

Known inherited local check failure: environment-variable count is 455 against
budget 454, independently reproduced against clean HEAD/index. Its counted
source roots exclude UI. No budget or unrelated source changes made.
Use the native Popover capability required by the Control UI bootstrap
instead of retaining old-engine in-flow fallbacks. Keep native overlay
occlusion and all real connection/navigation ownership.

Remove retired sidebar style hooks and share identical question-panel
declarations. Supported browsers render identically; no user-visible
copy, feature, renderer selection, config, protocol, or storage change.

Best-effort tradeoffs accepted

- Old engines without Popover support, or invalid direct popover mounts,
  no longer receive an in-flow menu fallback. The fallback came from
  #105598 as generic compatibility, not a human incident; #168595 made
  native Popover support a required bootstrap capability. Invalid direct
  mounts now fail clearly rather than silently changing layering.

Deeper coverage and retained candidates are recorded in the requested
task-local y03 ledger for coordinator bundling.

Branch total: 123 net production LOC removed (+114/-237), excluding tests,
fixtures, generated files and declarations. Below the 500-line campaign
floor after the deeper components/app/lib/styles and lead-owned owner pass;
push branch-only for bundling.
Consolidate duplicate catalog response handling,
optional catalog reads, pairing resolution, requester assertions and system
agent transcript persistence. Carry prepared pairing and actor facts instead
of probing or re-reading them. Remove redundant cache-generation and internal
receipt checks; retain security, durability, pagination and resource bounds.

Best-effort tradeoffs accepted:
- Pairing captures its selected adapter once. Repeated internal checks added
  by #112401 guarded hypothetical in-place plugin mutation, not a reported
  incident. Such a mutation now leaves this request on its selected adapter;
  later requests discover the current registration.
- Channel identity RPCs trust the canonical mutation result instead of
  repeating the action/kind assertion introduced in #161284. No human incident
  justified the redundant adapter assertion; live mutation authority remains
  with the state owner.

No user-facing feature, protocol/config/persistence shape, schema, dependency,
test coverage or standalone session memory backend changes.

Net production reduction: 100 lines (179 added / 279 deleted).
Type-aware lint, targeted production types, formatting, runtime cycles (zero),
SDK surface, suppression audit and independent P2 review pass. Gateway focused
suites and the full static import graph remain incomplete on the loaded host;
retain these proof gaps for the coordinator bundle rather than claiming green.
Remove a test-only config cache-reset wrapper, duplicate internal selection
and channel-support checks, an unused session-file metadata fallback, and
duplicate usage target shapes. Carry transcript delivery facts from their
first parsing pass. Keep all network validation, effect authority, transcript
durability, current update policy and standalone session memory machinery.

Best-effort tradeoffs accepted:
- Internal agent updates trust the selection-shape check at their sole
  production caller, agents.update. The duplicate originated in the Models
  agent-selection feature #150224; the same boundary check still rejects
  invalid user input. Live runtime choice validation stays at the effect.
- Channel start support is checked once at the synchronous request boundary.
  The inner check from #67815 / #167159 cannot observe a different plugin
  without unsupported synchronous mutation; the boundary guard remains.
- Workspace-root readers require caller-prepared metadata: both production
  consumers already provide it. The unused fallback from #161747 is deleted,
  not the Phase E backend or any factory. A future invalid internal caller
  gets a clear error instead of starting another metadata read.
- Update handlers trust the required getRuntimeConfig contract instead of
  falling back to a global schedule for an invalid context. Keep #158301's
  real scheduler-policy incident fix and its post-await current-config read.
- Usage summaries trust the canonical required target identity from #169660;
  the first-instance fallback served no production caller. The integration
  fixture now supplies that identity with all original assertions retained.

No public schema/config/SDK/protocol or persisted shape changes. The config
tests call the same canonical invalidators directly; no coverage is removed.

Follow-up removes 54 net production lines; branch total removes 154. Targeted
types (including MCP consumers), retained-file type-aware lint, formatting,
zero runtime import cycles, suppression audit and independent P2 review pass.
Gateway behavioral suites remain incomplete after a loaded-host startup run
was stopped at about ten minutes (exit 143). The prior full static-graph gap
remains pending for the coordinator bundle; no new production edge is added.
Reuse the existing controller host, subscription and plugin-icon owners;
share cloud-worker config edit wiring and Usage query comparisons. Remove
the unused Usage detail predicate and duplicate model loading flag.

Retire the Web Awesome-era picker hiding fence now that native Popover
owns generation-bound close completion. Keep both rendering paths,
draft recovery, user-intent checks and dispatch-time write authority.
Settled rendering is unchanged. Net production reduction: 210 lines.

Best-effort tradeoffs accepted:
- Failed channel artwork retries on the next channel refresh rather than
  a queued trailing ensure. #131511 was a synthetic ordering regression;
  the human-reported owning-plugin bug #144152 remains covered.
- Picker triggers may reopen during closing. #126032's fence came from
  CI/synthetic overlap, not a human incident; #171441 transferred lifecycle
  ownership to native Popover, which ignores superseded completions.

Focused proof: 281 tests passed, including Chromium/WebKit overlay lifecycle
and responsive placement controls. Independent P0-P2 review: scoped-clean.
Final UI production and UI-pages test typechecks passed; suppression tests 3/3.
Scoped lint passed after a mechanical no-lonely-if fix.
Runtime and static import cycles: zero. No visual or locale changes.
The global environment-name budget is inherited at 455/454 on both the
untouched base and origin/main; none of its counted source roots changed.
@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 15, 2026 09:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T10:10:57.756707Z 6ba1ec2 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 6ba1ec25286f8cf2a6a3f9fec515e59dccca69d3
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/server-methods/channel-pairing.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server-methods/models-auth-status-usage-cache.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@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 Oct 15, 2026
@clawsweeper

clawsweeper Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates UI presentation and Gateway helpers while removing redundant validation, adapters, and styles.

Example: A scalar-only catalog context lists agents ops and research.

  • Before: Both catalog reads start concurrently.
  • After: The research read waits for the ops read to finish.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful consolidation with focused validation, but two verified diff-caused failures prevent a clean verdict.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; supplied validation covers focused in-process tests and static checks, and the inspected guard consolidation does not materially change admitted authority.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Duplicate presentation and server-method plumbing makes existing behavior harder to maintain.
Reason: The direction is maintainer-owned and the consolidation removes substantial duplication, subject to preserving established contracts.

Merge readiness

⛔ Needs changes before merge - 3 items remain

Keep this maintainer-directed cleanup open; two diff-caused CI failures need focused repairs before merge.

Priority: P2
Reviewed head: 1804237d5843be16173e773742686b036e4e9c85

Before merge

  • Preserve concurrent scalar catalog reads in the shared helper (P2) - When the context provides readPreparedGatewayModelCatalog but no batch reader, this call now reaches the helper's sequential await loop. For agents ops and research, research does not start until ops settles, so roster latency becomes cumulative instead of concurrent. The original batching PR explicitly preserved this fallback, and exact-head CI fails the existing concurrent-start assertion. Move parallel scalar acquisition into readPreparedServerMethodModelCatalogs so consolidation retains the established behavior.
  • Supply the required runtime-config provider in update-status tests (P2) - Removing the context fallback leaves three existing update-effective-channel tests invoking the handler without getRuntimeConfig. They now throw at this line before reaching their sentinel and discovery-failure assertions, as exact-head CI confirms. Update those fixtures with a valid runtime-config provider and preserve their existing behavioral assertions; production callers already provide this contract.
  • Explain or restore the original intent of Agent roster catalog concurrency - 02bd2eb: The batch-catalog change explicitly preserved parallel scalar reads for older SDK contexts.

Findings

  • [P2] Preserve concurrent scalar catalog reads in the shared helper — src/gateway/server-methods/agents-list.ts:31
  • [P2] Supply the required runtime-config provider in update-status tests — src/gateway/server-methods/update-status.ts:130

Provenance

  • Agent roster catalog concurrency changes intended behavior without addressing why it exists (02bd2eb: The batch-catalog change explicitly preserved parallel scalar reads for older SDK contexts.)
Agent review details

How this fits together

Control UI controllers consume Gateway RPCs; shared helpers prepare catalog, configuration, authorization, and presentation results.

flowchart LR
  A[Control UI pages] --> B[Shared presentation owners]
  A --> C[Gateway RPC handlers]
  C --> D[Catalog and state owners]
  D --> E[Prepared facts and receipts]
  E --> C
  C --> A
Loading

Technical review

Best possible solution:

Keep the consolidation, preserve parallel scalar catalog reads in the shared owner, and update invalid update-status fixtures.

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

Exact-head CI annotations and the inspected owners establish both failures; no target code or tests were executed during this review.

Is this the best way to solve the issue?

Reusing existing owners is appropriate, provided their caller-visible concurrency contract survives and tests supply valid request contexts.

Full review comments:

  • [P2] Preserve concurrent scalar catalog reads in the shared helper — src/gateway/server-methods/agents-list.ts:31
    When the context provides readPreparedGatewayModelCatalog but no batch reader, this call now reaches the helper's sequential await loop. For agents ops and research, research does not start until ops settles, so roster latency becomes cumulative instead of concurrent. The original batching PR explicitly preserved this fallback, and exact-head CI fails the existing concurrent-start assertion. Move parallel scalar acquisition into readPreparedServerMethodModelCatalogs so consolidation retains the established behavior.
    Confidence: 1
  • [P2] Supply the required runtime-config provider in update-status tests — src/gateway/server-methods/update-status.ts:130
    Removing the context fallback leaves three existing update-effective-channel tests invoking the handler without getRuntimeConfig. They now throw at this line before reaching their sentinel and discovery-failure assertions, as exact-head CI confirms. Update those fixtures with a valid runtime-config provider and preserve their existing behavioral assertions; production callers already provide this contract.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7c607886cb60.

Provenance checked

  • Update status configuration ownership changes intended behavior with a stated reason (fix(update): report scheduler policy before discovery #158301: Status must expose current scheduler policy independently of optional installation discovery; this PR explicitly retains that behavior while requiring the valid context contract.)
  • Channel artwork and picker lifecycle changes intended behavior with a stated reason (fix(ui): resolve channel icons by owning plugin #144177: Artwork follows owning-plugin identity; the PR preserves that mapping and explicitly accepts later refresh retries while reusing existing lifecycle owners.)
  • Pairing adapter selection changes intended behavior with a stated reason (feat(ui): manage DM pairing requests in Channels #112401: The original account-scoped pairing UI checked adapter availability; this PR explicitly captures the selected adapter for the request.)
  • Source-preview cache inputs changes intended behavior with a stated reason (d47faea: The original preview feature retained field snapshots; this PR explicitly relies on immutable production message and tool-card identities.)
  • Session page lifecycle keeps the original intent (refactor(ui): render portable routes and controls with Solid #171159: The Solid migration retained synchronous domain state and explicit subscriptions; the shared ControllerHost and SubscriptionsController preserve that ownership.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/gateway/server-methods/sessions-read.test.ts src/gateway/server-methods/optional-model-catalog.test.ts --maxWorkers=1
  • pnpm test src/gateway/server-methods/update-effective-channel.test.ts --maxWorkers=1
  • pnpm exec oxlint --type-aware src/gateway/server-methods/optional-model-catalog.ts src/gateway/server-methods/update-effective-channel.test.ts
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 02bd2eb adds src/gateway/server-methods/agents-list.ts:26 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 02bd2ebd7b77; files: src/gateway/server-methods/agents-list.ts)
  • Vincent Koc: Raw commit 1c3468f adds src/gateway/server-methods/update-status.ts:93 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1c3468fd05fb; files: src/gateway/server-methods/update-status.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Labels

Label changes:

  • add P2: The cleanup introduces a limited catalog-concurrency regression and breaks existing update-status tests.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The cleanup introduces a limited catalog-concurrency regression and breaks existing update-status tests.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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.

Reviewed October 15, 2026, 5:38 AM ET / 09:38 UTC.

Withdraw two wave-5 cleanups after focused CI failures and bounded isolated replay. Preserve the existing scalar-read concurrency and update-status handler contract. Tighten task-suggestions assertion allowance to match the cleaned source.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ba1ec2528

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
}
element.removeAttribute("popover");
element.showPopover();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid reopening an already open popover

When an MCP app is already fullscreen, changing another presentation property such as height, fillContainer, or deepLink reruns McpAppViewController.updatePresentation(), which calls this helper again for the same connected element. Native showPopover() can throw InvalidStateError when the element is already showing, and this change removes the catch that previously contained that exception. Make promotion idempotent—for example, check :popover-open before calling—so unrelated fullscreen updates do not break the view.

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 57ff826 into main Oct 15, 2026
160 of 162 checks passed
@steipete
steipete deleted the deslop/bundle-w5a-ui-gateway-20261015 branch October 15, 2026 10:46
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 15, 2026
Complete the consumer migrations from #172887, #172992, #172771 and #172989. Keep local schemas and callback types private and remove redundant barrel exports. Session sharing authority remains in its policy owner and is still enforced by production callers.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…-5 bundle A) (openclaw#172989)

* refactor(ui): remove unused page plumbing and duplicate presentation work

Fold sole-caller Config and Cron adapters into their existing owners, reuse
canonical controller types, and remove unused request arguments and login
selection options. Adopt the complete background mutation receipt instead of
rereading the write; keep authoritative preflight and live ownership checks.

Best-effort tradeoffs accepted: a later background edit in another browser is
reflected by normal preference events or refresh, not an unconditional read of
our own successful write. The introducing feature PR openclaw#168301 does not identify
a human incident requiring that reread. Settled rendering and public contracts
are unchanged; both shipping renderer paths remain intact.

* refactor(ui): consolidate presentation helpers and cached preview inputs

Share point-menu trigger attributes and deletion-first LCS traversal. Remove
an obsolete empty-badge predicate, a one-caller loading facade, and redundant
whole-map translation fallback. Preserve both active Lit and Solid paths,
positioning formulas, diff work budgets, visible text, and rendering.

Best-effort tradeoffs accepted:
- Trust successful synchronous Web Storage writes instead of reading them back.
  Introducing PR openclaw#162428 supplied synthetic storage failures, not a human
  incident where successful setItem silently failed. Nonconforming Storage
  replacements may miss a cache publication until the next refresh.
- Trust immutable message/tool-card identities for cached source previews.
  PR openclaw#148431's in-place mutation assertions were synthetic; production owners
  publish replacement snapshots. Unsupported in-place mutation may leave a
  decoration stale until replacement. Run/frame/origin and external source
  validation remain unchanged.

Net production reduction: 76 lines; tests: 20 lines removed, only synthetic
same-object mutation assertions. Kept config coercion tied to human Safari
report openclaw#13348, along with security, durability, ordinary navigation ownership,
and all active migration paths.

Focused proof: 73 boot/cache/diff tests, 82 menu tests, 46 badge/assistant tests,
20 i18n tests, 8 browser details tests, 3 lint-suppression tests; UI typecheck,
formatting, stylesheet lint and CSS declaration parity passed.

Known inherited local check failure: environment-variable count is 455 against
budget 454, independently reproduced against clean HEAD/index. Its counted
source roots exclude UI. No budget or unrelated source changes made.

* refactor(ui): remove obsolete presentation compatibility and styling

Use the native Popover capability required by the Control UI bootstrap
instead of retaining old-engine in-flow fallbacks. Keep native overlay
occlusion and all real connection/navigation ownership.

Remove retired sidebar style hooks and share identical question-panel
declarations. Supported browsers render identically; no user-visible
copy, feature, renderer selection, config, protocol, or storage change.

Best-effort tradeoffs accepted

- Old engines without Popover support, or invalid direct popover mounts,
  no longer receive an in-flow menu fallback. The fallback came from
  openclaw#105598 as generic compatibility, not a human incident; openclaw#168595 made
  native Popover support a required bootstrap capability. Invalid direct
  mounts now fail clearly rather than silently changing layering.

Deeper coverage and retained candidates are recorded in the requested
task-local y03 ledger for coordinator bundling.

Branch total: 123 net production LOC removed (+114/-237), excluding tests,
fixtures, generated files and declarations. Below the 500-line campaign
floor after the deeper components/app/lib/styles and lead-owned owner pass;
push branch-only for bundling.

* refactor(gateway): reuse server method owners

Consolidate duplicate catalog response handling,
optional catalog reads, pairing resolution, requester assertions and system
agent transcript persistence. Carry prepared pairing and actor facts instead
of probing or re-reading them. Remove redundant cache-generation and internal
receipt checks; retain security, durability, pagination and resource bounds.

Best-effort tradeoffs accepted:
- Pairing captures its selected adapter once. Repeated internal checks added
  by openclaw#112401 guarded hypothetical in-place plugin mutation, not a reported
  incident. Such a mutation now leaves this request on its selected adapter;
  later requests discover the current registration.
- Channel identity RPCs trust the canonical mutation result instead of
  repeating the action/kind assertion introduced in openclaw#161284. No human incident
  justified the redundant adapter assertion; live mutation authority remains
  with the state owner.

No user-facing feature, protocol/config/persistence shape, schema, dependency,
test coverage or standalone session memory backend changes.

Net production reduction: 100 lines (179 added / 279 deleted).
Type-aware lint, targeted production types, formatting, runtime cycles (zero),
SDK surface, suppression audit and independent P2 review pass. Gateway focused
suites and the full static import graph remain incomplete on the loaded host;
retain these proof gaps for the coordinator bundle rather than claiming green.

* refactor(gateway): trust prepared server method inputs

Remove a test-only config cache-reset wrapper, duplicate internal selection
and channel-support checks, an unused session-file metadata fallback, and
duplicate usage target shapes. Carry transcript delivery facts from their
first parsing pass. Keep all network validation, effect authority, transcript
durability, current update policy and standalone session memory machinery.

Best-effort tradeoffs accepted:
- Internal agent updates trust the selection-shape check at their sole
  production caller, agents.update. The duplicate originated in the Models
  agent-selection feature openclaw#150224; the same boundary check still rejects
  invalid user input. Live runtime choice validation stays at the effect.
- Channel start support is checked once at the synchronous request boundary.
  The inner check from openclaw#67815 / openclaw#167159 cannot observe a different plugin
  without unsupported synchronous mutation; the boundary guard remains.
- Workspace-root readers require caller-prepared metadata: both production
  consumers already provide it. The unused fallback from openclaw#161747 is deleted,
  not the Phase E backend or any factory. A future invalid internal caller
  gets a clear error instead of starting another metadata read.
- Update handlers trust the required getRuntimeConfig contract instead of
  falling back to a global schedule for an invalid context. Keep openclaw#158301's
  real scheduler-policy incident fix and its post-await current-config read.
- Usage summaries trust the canonical required target identity from openclaw#169660;
  the first-instance fallback served no production caller. The integration
  fixture now supplies that identity with all original assertions retained.

No public schema/config/SDK/protocol or persisted shape changes. The config
tests call the same canonical invalidators directly; no coverage is removed.

Follow-up removes 54 net production lines; branch total removes 154. Targeted
types (including MCP consumers), retained-file type-aware lint, formatting,
zero runtime import cycles, suppression audit and independent P2 review pass.
Gateway behavioral suites remain incomplete after a loaded-host startup run
was stopped at about ten minutes (exit 143). The prior full static-graph gap
remains pending for the coordinator bundle; no new production edge is added.

* refactor(ui): consolidate page lifecycle and config plumbing

Reuse the existing controller host, subscription and plugin-icon owners;
share cloud-worker config edit wiring and Usage query comparisons. Remove
the unused Usage detail predicate and duplicate model loading flag.

Retire the Web Awesome-era picker hiding fence now that native Popover
owns generation-bound close completion. Keep both rendering paths,
draft recovery, user-intent checks and dispatch-time write authority.
Settled rendering is unchanged. Net production reduction: 210 lines.

Best-effort tradeoffs accepted:
- Failed channel artwork retries on the next channel refresh rather than
  a queued trailing ensure. openclaw#131511 was a synthetic ordering regression;
  the human-reported owning-plugin bug openclaw#144152 remains covered.
- Picker triggers may reopen during closing. openclaw#126032's fence came from
  CI/synthetic overlap, not a human incident; openclaw#171441 transferred lifecycle
  ownership to native Popover, which ignores superseded completions.

Focused proof: 281 tests passed, including Chromium/WebKit overlay lifecycle
and responsive placement controls. Independent P0-P2 review: scoped-clean.
Final UI production and UI-pages test typechecks passed; suppression tests 3/3.
Scoped lint passed after a mechanical no-lonely-if fix.
Runtime and static import cycles: zero. No visual or locale changes.
The global environment-name budget is inherited at 455/454 on both the
untouched base and origin/main; none of its counted source roots changed.

* refactor(ui): remove unused new-session hiding selector

* refactor(gateway): retain legacy catalog and update handler contracts

Withdraw two wave-5 cleanups after focused CI failures and bounded isolated replay. Preserve the existing scalar-read concurrency and update-status handler contract. Tighten task-suggestions assertion allowance to match the cleaned source.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
Complete the consumer migrations from openclaw#172887, openclaw#172992, openclaw#172771 and openclaw#172989. Keep local schemas and callback types private and remove redundant barrel exports. Session sharing authority remains in its policy owner and is still enforced by production callers.
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 gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security-sensitive-changed size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant