Repository navigation
feat: add experimental plugin UI customization - #134943
Conversation
|
🦞👀 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: blocked before merge. Reviewed September 4, 2026, 12:47 PM ET / 16:47 UTC. ClawSweeper reviewWhat this changesAdds experimental typed feature-plugin and Control UI APIs, migrates Workboard to them, and gates installed native UI behind a default-off Labs setting. Merge readiness⛔ Blocked before merge - 7 items remain Keep open pending recorded SDK and security-owner acceptance of the intentional full-authority native-plugin model and exact-head validation; no concrete functional defect was found in the reviewed central paths. Priority: P2 Review scores
Verification
How this fits togetherPlugin manifests contribute UI assets and declarations through the Gateway, which authenticates and advertises them to Control UI. The Control UI runtime loads each admitted plugin with a lifecycle-bound host that can issue Gateway requests under the signed-in operator’s authority. flowchart LR
A[Installed plugin manifest] --> B[Gateway asset catalog]
B --> C[Scoped asset authentication]
C --> D[Control UI runtime]
D --> E[Lifecycle-bound plugin host]
E --> F[Plugin pages and actions]
F --> G[Gateway requests with operator scopes]
Decision needed
Why: This is a new public SDK and authority boundary; code-level guards and documentation cannot determine whether the product's intended trust model is acceptable. Before merge
Findings
Agent review detailsSecurityNeeds attention: The implementation deliberately expands installed native plugin authority to the signed-in operator's Gateway scopes, so it needs recorded security-owner acceptance rather than a presumed approval. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land only after SDK and security owners explicitly accept the documented default-off full-authority model and exact-head validation is confirmed, while retaining lifecycle-bound hosts, scoped asset authorization, and sandboxed alternatives. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds a new experimental capability rather than repairing a reported existing-behavior bug; its supplied browser and Gateway proof concerns feature behavior. Is this the best way to solve the issue? Unclear pending owner acceptance: the default-off, documented trusted-native model is coherent for full Control UI replacements, while sandboxed widgets and MCP Apps remain the safer path for isolated content. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a3e18fac7722. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (31 earlier review cycles; latest 8 shown)
|
717c97a to
0467d40
Compare
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin, a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
What Problem This Solves
Deeper Control UI features previously required core changes. This adds a typed feature-plugin SDK for native UI and moves Workboard onto public plugin boundaries. Authors and agents can scaffold, build, validate, and pack a feature, then propose its exact archive for operator-reviewed installation.
User-installed native UI is off by default. Enable Settings → Labs → Custom plugin UI, restart the Gateway, and reload browser tabs (
gateway.controlUi.experimental.customPlugins: true). Artifact approval does not enable Labs. Bundled UI remains available through the loader's recorded origin; installed plugins cannot claim that exemption through their name or manifest.Why This Change Was Made
One typed contract serves backend handlers, browser clients, and optional agent-tool/command adapters. Plugins contribute pages, navigation, panels, actions, accessories, and widgets, or replace workspace, session-list, composer, transcript, and tool-result views. Replacements can compose built-in views; Built-in restores them.
Core owns session/agent identity, drafts, send admission, independent queries, and disposal. Retiring a view or connection revokes its handles. Catalog discovery, grants, and asset serving share one Gateway policy, including retained revisions. Blocked UI explains enablement and preserves saved state.
Enabled native modules are trusted same-origin code with the signed-in operator's Gateway authority, including administrator methods for administrators. Capability declarations are not a per-plugin sandbox. Maintainer decision: accept the experimental SDK, default-off setting, shared operator authority, and verified fs-safe 0.7.2 update. Land the SDK, Workboard migration, installation lifecycle, and supporting refactors together.
User Impact
Start with
openclaw plugins init <id> --type feature; see feature-plugin authoring. Backend plugins, tools, services, iframe tabs, sandboxed widgets, and MCP Apps remain independent of this opt-in. Disabling custom UI preserves installation and saved UI state.All plugin APIs are experimental, including existing SDK, registration/runtime, provider, channel, hook, and native UI contracts. Authors should pin and test supported host versions. Existing compatibility adapters, deprecation windows, and supported-upgrade migrations remain in force.
Three entrypoints (
feature-contract,feature-plugin,control-ui) expose four runtime helpers, 45 types, and 27 direct host methods. Two existing normalization helpers are reexported. Four RPCs—plugins.controlUi.list,.reload,.report,.status—and one event manage revisions. One default-off setting is added; no SQLite schema or Gateway protocol-version bump occurs.Assets, grants, and routing honor the Control UI URL prefix. Authenticated native UI requires HTTPS or a browser-trusted loopback URL; plain-HTTP pages show recovery guidance before loading code. Related repairs cover template reapplication, stale widget reads, repeated Windows builds, session search, and UI test isolation.
fs-safe #194 is merged; 0.7.2 is released and on npm. Both dependencies use it with no local patch. The awaited-guard race failed on 0.7.1 and passed on 0.7.2; eight tarballs, signatures, and provenance were verified with native release CI.
Follow-up: managed npm compensation. Snapshot restoration and npm-pack rollback must use the original lifecycle guard and retain recovery artifacts after closure. This pre-existing gap is separate from sealed-artifact installation; an already-dispatched syscall cannot be cancelled.
Evidence
Candidate
f1186148d9302ff7054dd2258982e730ceaf2b33, based on8d94ab0d1e258fd0f148263fc3f75e17b4628adf. All 34 feature commits are retained through the rebase.pnpm buildpassed in 257.673 seconds; 796 finalized UI assets verified. Startup JavaScript is 349,523 gzip bytes against a 350,141-byte limit.protocol:checkpassed with the upstream Canvas method and native plugin methods preserved.All three real Chromium/Gateway replays passed with isolated state, unchanged source/build hashes, no browser errors, and all processes joined:
Primary CI, iOS Periphery, and shared OpenClawKit Periphery passed on
f1186148, including the shared intersection check. The dead-code scans passed on attempt 2 through their existing macOS runner recovery after the initial jobs remained unassigned; no workflow, timeout, or check was weakened.Move-adjusted LOC: production +9,281/−3,677 (net +5,604); tests/support +12,405/−4,160 (net +8,245). Separate net totals: docs +524, localization +4,791, generated metadata +178, tooling/config +125. Counts discount 16,894 unchanged lines each direction across 42 moves and exclude lockfiles/bundles. This growth provides the typed SDK, native host and lifecycle/admission boundaries, with Workboard consuming those public interfaces.
Review dispositions: HTTP and prefix defects are repaired without weakening secure cookies. The earlier missing-grant claim was an aliased-set false positive; deletion now names that set directly. The stored-model heuristic flagged Knip configuration and a test fixture, not runtime schema changes. The trust and compatibility decisions are explicit above.
Earlier CI follow-ups: Chromium selected-tab creation/relay lifetime and macOS exit-observer/grace timing passed unchanged focused reruns. Watch first-send fixture synchronization remains a named follow-up from an earlier failure; the iOS test lane passed on the current
f1186148candidate. No timeout increases or bypasses were added.Live UI proof
Synthetic data from the final candidate, recorded against the real Gateway. The complete recording preserves the Labs enable/disable and restart transitions.
Default-off gate, enabled UI, recovery, and deployment checks
labs-off-on-off-f1186148.mp4