Repository navigation
refactor: deslop UI pages/components and gateway server methods (wave-5 bundle A) - #172989
Conversation
…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.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
|
Codex review: needs changes before merge. What this changesThis 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.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete 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 Before merge
Findings
Provenance
Agent review detailsHow this fits togetherControl 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
Technical reviewBest 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:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7c607886cb60. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment 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.
There was a problem hiding this comment.
💡 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(); |
There was a problem hiding this comment.
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 👍 / 👎.
|
Merged via squash.
|
…-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.
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.
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.The catalog-read cleanup in
agents-list.tsand the update-handler cleanup inupdate-status.tswere 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 fortask-suggestions.tsshrinks 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-20261015at63f9b71438e, y03deslop/y03-ui-components-lib-app-20261015at04025248e3a, and y05deslop/y05-gateway-server-methods-20261015at41bb6503cee. 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-tabssuppression 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.
checks-fast-baseline-ratchetstask-suggestions.tsactual 0 versus allowance 5. Removed that row; canonical local replay passes.checks-node-changed-compact-small-19sessions-read.test.tslegacy 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 allagents-list.tshunks.checks-node-changed-compact-large-18update-effective-channel.test.tscases. Isolated head replay: one existing import timeout and twocontext.getRuntimeConfig is not a functionfailures. Withdrew allupdate-status.tshunks.checks-node-changed-7openclaw/ci-gateThe 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.tshunks 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.