Skip to content

refactor: share plugin and UI adapter owners - #180221

Merged
steipete merged 2 commits into
mainfrom
deslop/z33-73-plugin-package-ui-adapters-20261015
Oct 22, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/z33-73-plugin-package-ui-adapters-20261015

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Measured clone groups left repeated adapter code in bundled plugins, agent-core and the Control UI. This is the disjoint adapter area of the originally proposed 505-net-line settlement/readers/adapters packet. Runtime readers are in #180175; settlement #180148 was withdrawn without merging after an unresolved CI attribution. This slice does not depend on either PR, and no withdrawn LOC is credited.

What changed

Reuse existing CLI argument, session-scope and numeric normalization owners. Within their current owners, share usage-bucket admission, Matrix crypto preparation, private WeakMap slot copying, truncation classification and deprecation descriptors. FaceTime shares its first-line command-output reader inside the plugin. CUA derives advertised actions from the existing vocabulary while preserving platform exclusions. Identical hidden-label CSS now lives once in the base stylesheet; only the generic utility retains its extra clip-path.

Existing SDK contracts, diagnostic strings, validation, authority and settlement stay in place. No SDK expansion, config/schema/protocol/dependency change or Phase E memory-backend change.

Net production LOC: 98 removed, including the new FaceTime helper. 20 files total; 16 production paths, three tests and one shrink-only assertion baseline. This area-sized split keeps CI attribution independent of the widely imported core owners in the other two areas.

Best-effort tradeoffs accepted

None newly introduced. This cut consolidates implementations without removing guards or supported behavior. Tiny local helper calls/usage-bucket records are accepted implementation costs, not measured performance improvements.

Evidence

Fresh composed proof passed: formatting, stylelint, strict production native types, canonical test native types, typed lint, internal-result acknowledgement, all three Chromium hidden-label cases, wrapper/import closure, runtime and static cycles (both zero), suppression ratchet (14 cases), and changed-check planner. Ten resumed stage receipts contain 850 captures/85 unique inputs, all matching after normal signed commit hooks.

The initial broad typecheck recipe incorrectly applied script unused-parameter settings to unchanged test roots. It failed on three unused parameters. Production and test roots were split using their canonical configurations; no source, test assertion, production compiler option or baseline was weakened.

Historical focused evidence is reused for the six selected areas with explicit dependency/type/inventory/sidebar exceptions. All 18 non-base-CSS selected postimages match the signed accumulator. The composed base stylesheet also preserves main's unrelated catalog security-score selector. This is not a whole-transitive-graph equivalence claim.

Paired synthetic screenshots show static production-rendered SettingsToggleRow/CronInput markup with actual startup/lazy CSS, not a live Gateway or interactive app. Accessibility/geometry snapshots and all four PNG pairs match. Fresh composed Chromium coverage checks current CSS. Before/after screenshots are attached below.

Exact-head hosted PR CI remains the broad gate. No local broad suite, build, live Gateway, provider or device proof is claimed.

Initial hosted CI correctly required shrinking the Matrix assertion allowance from eight to six after this extraction removed two repeated casts. The repair changes only that baseline row. The exact-base native AST ratchet passes across 2,485 files, all 14 suppression cases and the planner pass, and independent review of the one-row repair found no actionable P0–P2 finding. Production and tests are unchanged; new exact-head CI remains required. The PR-context headings were also corrected without changing the evidence or attached images.

Exact-head CI39715813871 attempt1 has completed with inherited main-fixture failures, not green. Scoped standing maintainer authority selects the native pre-existing-failure exception. Fetched actual CI merge874334df has ordered main461123 and head68c82d parents; the deciding UI sources are byte-identical to main. Main#179729 introduced the test; later main#180031 replaced its old prop and synchronous rendering without migrating this consumer.

Check Failure and attribution
119618663815 core test types3 Two artifactsLoading TS2353 errors at chat-details-output-intent.test.tsx27,53. Targeted unchanged-main UI-chat leaf independently reproduces both. Authored PR has neither this new test nor a deciding TSX/type change.
119618323863 UI2 Five same-file cases fail initial View all button-null assertion41. Focused unchanged-main one-file runtime reproduces all five. All three changed hidden-label Chromium cases passed hosted CI.
119622239500 ci-gate Downstream of those two leaves; independent security-fast119618323605 passed.
119617521261 context cancellation Superseded by successful same-head119617561142/run39715823297; no missing runtime suite.

Separate signed fixture repair01e63fe observes the admitted artifactRead promise and waits on actual async button readiness, preserving the immediate pre-settlement current-callback click and all four retirement checks. All seven intent/sibling cases, targeted UI-chat native types, typed lint, formatting,14suppression cases and planner pass; fresh independent review is clean. It is not counted as cleanup LOC or exact-head CI success. No compatibility prop, assertion weakening, timeout increase, retry or skip. Local macOS versus hosted Linux gap is explicit. Coordinator flakes/latest six completed schedules inspected; attribution uses matching focused baseline and source, not an invented scheduled signature. No CI rerun or green-chasing branch update.

Before - synthetic static production-rendered controls

After - identical controls with shared hidden-label CSS

@clawsweeper

clawsweeper Bot commented Oct 22, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 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-22T03:02:15.448529Z ebf287a Draft marked ready
ℹ️ 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.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates duplicated plugin, agent-core, routing, and hidden-label styling logic into existing owners.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Source review supports correctness and useful simplification; evidence is primarily focused harness coverage, and exact-head CI is not green.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; inspected screenshots show matching synthetic controls, and reported focused checks support equivalence without claiming live product coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
Reason: Maintainer-authored direction is established, and consolidating repeated implementations reduces drift while preserving supported behavior.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored consolidation is useful, and no actionable defect was found in the introduced diff; failing exact-head checks remain unattributed.

Priority: P3
Reviewed head: 68c82d8397d22e45a8cd65820f28b697ae8ec26c

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Supplied evidence exercises static controls and focused contracts, without a shipped CLI, Gateway, provider, or device run.
Agent review details

How this fits together

Plugin adapters and core helpers translate CLI arguments, provider responses, session scopes, and tool results into existing runtime contracts, while shared CSS controls hidden accessible labels.

flowchart LR
  A[CLI and plugin inputs] --> B[Existing normalization owners]
  B --> C[Plugin adapters]
  C --> D[Runtime results]
  E[Agent tool results] --> F[Private state copier]
  F --> D
  G[Settings and automation controls] --> H[Shared base styles]
Loading

Technical review

Best possible solution:

Retain the focused consolidation and resolve exact-head CI attribution before landing.

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

No product bug is claimed; source inspection supports the stated behavior-preserving refactor, and no target code was executed during review.

Is this the best way to solve the issue?

The change uses existing owners, removes the replaced implementations, and adds no competing state or public contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 317f9399d9b0.

Provenance checked

  • Anthropic usage aggregation keeps the original intent (8274022: Provider-reported daily spending and token history required validated buckets and daily aggregation; the shared admission helper preserves both.)
  • Browser CLI value parsing keeps the original intent (269bc5c: Machine-readable stdout depends on correct route recognition; the existing SDK parser accepts the same value tokens.)
  • CUA advertised actions keeps the original intent (2af5eca: The v2 adapter advertises supported action families while retaining platform exclusions; the canonical vocabulary produces the same current list.)
  • FaceTime command output keeps the original intent (88c56ec: Preflight and setup extract the first useful command-output line; the extracted implementation is identical.)
  • Matrix crypto preparation keeps the original intent (94693f7: Recovery operations require encryption, startup, and an available crypto API; all three requirements and diagnostics remain.)
  • Truncation classification keeps the original intent (e9dee8d: A shared result builder preserves truncation metadata; moving the repeated classification into it retains the oversized-first-line exception.)
  • Private tool-result state keeps the original intent (df770c6: Nested result transformations must preserve delivery provenance and acknowledgement state; the same private slots are copied under identical conditions.)
  • Session scope and conversation-binding compatibility keeps the original intent (1b8cd60: Awaited SDK migration retains synchronous compatibility and actionable diagnostics; the refactor preserves the scope projection, fallback calls, and replacement names.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduced change: Reviewed merge-base-to-head hunks independently of base movement; the extra commit only lowers the Matrix assertion allowance from eight to six. (config/assertion-safety-baseline.txt:418, 68c82d8397d2)
  • Existing contracts preserved: The reused session-scope projector has the same fields and omission rules; CLI value recognition matches the deleted implementation; numeric bounds remain equivalent; CUA retains its platform exclusions and action order. (src/plugins/runtime/runtime-agent.ts:79, 68c82d8397d2)
  • Private result state: The private copier preserves the same WeakMap identities and truthiness checks for execution preparers, acknowledgements, provenance, and content source; no authority grant or settlement boundary changes. (packages/agent-core/src/internal-hooks.ts:126, 68c82d8397d2)
  • Inspected visual evidence: Both downloaded screenshots were inspected and match visually; they show synthetic static production-rendered controls, as the PR explicitly states, rather than an interactive Gateway session. (ui/src/styles/base.css:670, 68c82d8397d2)
  • Unresolved CI attribution: Exact-head check-test-types-core-3 fails with only an exit-code annotation; checks-ui (2/3) reports five null-button failures in untouched chat-details-output-intent.test.tsx. Neither was established as diff-caused or inherited. Job-log retrieval was blocked at the redirected Azure storage host, so no narrow repair is supported. (ui/src/pages/chat/components/chat-details-output-intent.test.tsx:41, 68c82d8397d2)
  • Policy and history limits: Read the root and all applicable ancestor AGENTS.md files; maintainer-notes is absent. A deeper manifest-history search encountered an unavailable promisor blob; current source and the normalization split commit remain readable. The checkout stayed clean. (AGENTS.md:1, 68c82d8397d2)

Likely related people:

  • Peter Steinberger: Raw commit 8274022 adds extensions/anthropic/usage.ts:245 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 827402243d7f; files: extensions/anthropic/usage.ts)
  • Omar Shahine: Raw commit 88c56ec adds extensions/facetime/src/preflight.ts:27 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 88c56ec432a8; files: extensions/facetime/src/preflight.ts)
  • Vincent Koc: Raw commit e9dee8d adds packages/agent-core/src/harness/utils/truncate.ts:165 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: e9dee8dfe158; files: packages/agent-core/src/harness/utils/truncate.ts)

PR surface

Source -98, Tests +40, Other 0. Total -58 across 20 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 16 91 189 -98
Tests 3 48 8 +40
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 20 140 198 -58

Review metrics

Metric Value Why it matters
Production versus tests Production +91/-189; tests +48/-8 The production reduction removes duplicate implementations; added coverage protects platform capability exclusions, truncation classification, and accessible hidden-label styling.

Labels

Label changes:

  • add P3: This is behavior-preserving maintenance with no demonstrated user-facing regression.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is behavior-preserving maintenance with no demonstrated user-facing regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

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

  • Attribute the core typecheck and chat-test failures using accessible diagnostics or a controlled comparison.

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 21, 2026, 11:30 PM ET / October 22, 2026, 03:30 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

Exact-head inherited failure evidence for #180221

Standing Peter campaign instruction authorizes native inherited-failure landing after each check is attributed. Exact head68c82d8397d22e45a8cd65820f28b697ae8ec26c; CI39715813871 attempt1 completed failure. Actual fetched CI merge874334df90b4a4d4b4be0c6070c777bade392523 has ordered main parent4611232730583082f5c49bd79f1f68dfbfbd1b60 then PRhead68c82d8. All checks enumerated; no pending/cancelled runtime suite. Independent security-fast119618323605 passed. No failed CI called green.

Check Observed failure Attribution
119618663815 check-test-types-core-3 TS2353 artifactsLoading missing from ChatOutputsDesktopProps at chat-details-output-intent.test.tsx27,53 Main#179729 introduced test; later main#180031 removed old boolean prop without migrating it. Actual main-parent and CI-merge deciding test/props/types/config blobs match. Targeted native UI-chat leaf on main-derived checkout independently reproduces exactly both errors in5438ms. Authored PR contains no test or deciding TSX/type change.
119618323863 checks-ui (2/3) Five same-file cases fail at mountOutputs41: expected View all button not null Same main-side fixture still assumes synchronous readiness after output rendering became async. Focused unchanged-main one-file replay7752ms reproduces all five exact initial-null failures. CSS cannot cause DOM query to omit an existing node; main/merge deciding component/test sources match. All three changed hidden-label Chromium cases pass hosted CI.
119622239500 openclaw/ci-gate Downstream UI/type leaf failures Exactly two failed leaves above; all other planned jobs complete successfully or unselected.
119617521261 PR context and evidence cancellation Superseded bookkeeping Successful same-head119617561142/run39715823297. Not missing runtime proof.

Main test introductiona8ead196291935d24c44a4f40b67397d88c70256/#179729; removal24b180b712fa0c5861dc7a8c5b3c94bc00f0d6ca/#180031. At authored PR head, test does not exist and the old boolean prop still exists. Neither incompatible afterimage comes from PR73. The full main-parent sources and actual merge sources were inspected; source512 is routing/analysis, not a claimed whole-graph audit.

Separate fixture repair01e63fe0d86fa8f16fd5e674fff354e0eee2d72f is signed but not yet published at this artifact checkpoint. It waits for actual async initial button readiness, then supplies an admitted artifactRead promise that remains pending during the immediate callback-refresh click. All original current-callback and four session/agent/incarnation/visibility retirement checks remain. Owner mutable artifact array is reused without copying; pending fixture settles on test cleanup. No production prop compatibility restoration, weakened assertion, timeout increase, retry or skip. Original five plus two existing desktop/mobile refresh-error/retry cases pass, targeted UI-chat native types, typed lint,format,14suppression cases and planner pass. Independent exact-change P0-P2 review scoped-clean. This repair proof is not represented as exact-head CI green.

Baseline command uses repository runner and same qualified install, isolated HOME/OpenClaw/XDG and nice10/maxWorkers1; no live Gateway/operator data. Hosted Linux versus local macOS environment gap retained. Coordinator main-flakes and newest six completed ci.yml schedules inspected (39712703143,39707038848,39703131373,39693906280,39687169253,39679539559); no claimed matching scheduled fixture failure. Direct source plus matching focused baseline proves inheritance. No PR rerun or green-chasing push/rebase.

Original exact-head scoped proof/reviews/media remain in native review artifact: strict production/canonical test types,typed lint,acknowledgement,threeChromium hidden-label cases,wrapper closure,zero runtime/static cycles,14suppression cases,planner; one-row Matrix8→6 shrink repair has separate passing AST/suppression proof and review. Two inspected synthetic production-markup/CSS screenshots retained in PR body; no whole-app/live proof claim.98net production removed. No new SDK/config/schema/protocol/dependency or Phase E change.

@steipete
steipete merged commit 7910ed1 into main Oct 22, 2026
159 of 164 checks passed
@steipete
steipete deleted the deslop/z33-73-plugin-package-ui-adapters-20261015 branch October 22, 2026 03:44
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
* refactor: share plugin and UI adapter owners

* chore: shrink Matrix assertion allowance after consolidation
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 channel: matrix Channel integration: matrix extensions: anthropic extensions: browser P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: cua-computer plugin: facetime FaceTime plugin proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant