Skip to content

refactor(ui): keep private presentation with its page and host owners - #175155

Merged
steipete merged 5 commits into
mainfrom
deslop/z25-14-ui-owner-surfaces-20261015
Oct 17, 2026
Merged

steipete merged 5 commits into
mainfrom
deslop/z25-14-ui-owner-surfaces-20261015

Conversation

@steipete

@steipete steipete commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Private UI presentation helpers duplicate their single caller's fields and actions in parameter bags, even though that caller already owns the page operation.

User Impact

No user-visible change or migration is intended. Rendering, controls, lazy routes, native hosts, and Gateway/security authority stay unchanged.

Why This Change Was Made

Keep plugin settings editing in its existing page owner. Keep Desktop presentation in its existing Solid entry, retaining the one reactive view prop. Keep Debug's presentation local to the page, reading its live owner facts directly instead of constructing a 21-field transfer object. Existing public Debug tests now enter through the real page and Gateway fixture boundary; all 80 original assertions remain. Keep Activity and Lobsterdex presentation private to their page owners, and Browser/Terminal content private to their native host registration owners. Existing component boundaries and reactive JSX bindings remain; Lobsterdex retains its value-prop boundary so storage parsing is not repeated by every view read.

This is an area split of the wider single-consumer family, under the campaign's rule 11. The lint-repaired candidate removes 121 net production lines across 14 production paths (+1,157/-1,278) against base 51ebf30. Reviewed/repaired head: 7923cd8. The 20-path slice keeps CI attribution area-sized. Main's newer native Desktop owner is retained, so the reduction is smaller than the earlier 169-line candidate. No moved body is counted as deleted implementation.

Best-effort tradeoffs accepted

None. No guard or supported behavior is removed. Plugin credential matching, per-edit flush acknowledgment, Gateway/agent scopes, request ordering, lifecycle cleanup, and Desktop's imperative island stay with their current owners. No public SDK/protocol/config/schema/dependency contract or protected Phase E backend changes. The canonical keyless generator relocates one raw-copy baseline entry to Debug's new source owner, retaining the same text, count, and total 78 entries; translation memory and locale/fallback metadata are unchanged.

Evidence

The fresh isolated suppression suite passes 3/3 (86.46 seconds Vitest, 175.1 seconds wrapper); no allowance, assertion, timeout, retry, or skip was changed.

The constituent source packets received independent P0–P2 reviews with no remaining accepted/actionable findings. The earlier four-fold review caught a strict-null access in the moved Lobsterdex body; optional access on the second feedback read fixes it without changing its reactive binding. The fresh-main replay intentionally preserves main's Debug value-and-formatter memo tracking, visibility listener cleanup, Activity effect-returned animation-frame cancellation, and Lobsterdex theme-scoped projection/highlight teardown. Both replay slices received fresh independent scoped-clean P0–P2 reviews (0.96 each).

Source comparison preserves markup and reactive/lifecycle boundaries, and explicit existing stylesheet prefixes preserve CSS evaluation order under canonical import sorting; no styles changed. git diff --check passes. The Solid skill guided preservation of live prop and owner reads; no signal copies or lifecycle adapters were added. Tests now exercise the real Activity page/state and Lobsterdex page/storage owners, not test-only presentation exports. Full-index retired-path scanning found no remaining code imports. Canonical raw-copy generation passes (206.6 seconds including validation): 78 entries, 10,743 English keys, 8,564 literal references and 312 template-prefix references, plus plugin catalog validation. Its only generated delta is the source-path relocation described above.

All 11 surviving changed TypeScript/TSX files pass formatting (688 ms, one thread). Focused one-worker UI proof passes 9 files / 116 tests, covering the migrated Activity, Debug and Lobsterdex page tests plus existing plugin settings, Desktop, Browser and Terminal owner tests. Vitest duration: 515.59 seconds; isolated end-to-end command wall time: 731.4 seconds under shared host load. Targeted UI package types pass via the canonical scripts/run-tsgo.mjs -p tsconfig.ui.json --incremental owner in isolated HOME/OpenClaw/XDG state. The generated metadata-only followup received a fresh independent P0–P2 scoped-clean review (0.99) and was committed normally as cc6ba70. Suppression proof is in progress; lint/cycle checks remain subject to exact-head hosted CI under the local compute budget. The selection-only changed-check dry run failed before producing its plan because its selector subprocess received SIGILL; this is an incomplete tooling check, not a product or inherited-failure claim. Exact-head PR CI remains the broad gate. No live service, operator state, or real user data is used.

Conflict-only recovery onto bbb775 preserves native Desktop ownership, both surface refs, Debug's current agent transitions, Activity animation-frame cleanup, and Lobsterdex projection/highlight teardown. The earlier runtime/type results above are prior-head evidence, not current-head CI. The generated raw-copy baseline is byte-identical to the previously generated/reviewed blob; no translation, fallback metadata or allowance was added. Final formatting passes all 11 files (122 ms, one thread), and diff checks pass.

Fresh independent P0–P2 review completed after the conflict repair. Its sole finding claimed the Debug highlighter spy was not cleared before an update; this is rejected against the captured source: mount is awaited at line 222, highlight.mockClear() runs at line 229, update is awaited at line 238, and the incremental count is asserted at line 247. The test intentionally excludes initial hydration while retaining DOM identity and changed-diagnostics checks. The reviewer otherwise described the production folds as behavior-preserving. No accepted/actionable finding remains; the review's overall verdict is not described as scoped-clean. No assertion, timeout, retry or skip was weakened. Fresh focused conflict-surface replay and exact-head hosted CI remain pending.

GitHub subsequently reported that replay conflicting before attaching CI. The fresh-main replay onto 51eb preserves the complete newer Browser and Terminal native registrations and transplants each current content function unchanged, with only its private export retired. Exact comparisons confirm both registrations and both moved function bodies retain main's behavior after formatting. Debug retains main's newly awaited lazy highlighter setup before capturing DOM tokens or clearing the spy. Plugin-settings and raw-copy metadata patches are identical; diff checks pass and the three conflict files pass formatting (59 ms). Prior independent reviews are reused for this mechanically verified replay, not described as new-head runtime proof. No local suppression run is active. Fresh focused conflict-surface proof and exact-head hosted CI remain pending.

Solid refactor measures are unchanged between 51eb and the final candidate across touched production paths: rendering-controller lifecycle patterns 0, createEffect 9, createRenderEffect 0, untrack 2, native addEventListener 0, DOM query calls 2 (retained islands), flush 0, owner escapes 0. No host tag, visible markup, stylesheet, or layout behavior changes.

Hosted CI run 39022478211 on 0255096 failed one PR-caused leaf: check-lint-core-2 /117367403871 reported five no-shadow errors introduced by the folds. The four nested Activity component props shadowed the outer page props, and Desktop's local JSX augmentation shadowed its imported JSX type. Signed repair 7923cd8 renames only the outer binding to pageProps and imports the type as SolidJSX. No reactive read, JSX markup, owner, assertion, or runtime behavior changes. Fresh independent P0-P2 review is scoped-clean; exact two-file syntax lint, matching 0.72.0 formatting, whitespace, normal commit hooks and signature verification pass. The sparse checkout could not run type-aware lint because required type prerequisites were absent; that is a tooling gap, not a passing lint result. New-head hosted CI must validate the complete type/lint/runtime graph. No CI rerun or inherited-failure exception is used.

The isolated one-worker pre-push suppression guard at exact 7923cd8 passed all 14 cases: 31.23 seconds Vitest, 56.2 seconds wrapper, including Git enumeration and the unchanged explicit suppression tail. No allowance, timeout, assertion, retry or skip changed.

Completed exact-head hosted CI run 39039137961 is successful. The exact-head watcher completed GREEN with zero pending proof checks; superseded administrative contexts are not test failures. The five PR-caused lint errors above are repaired and the current complete hosted graph is green. Earlier pending-proof sentences describe historical checkpoints, not the final hosted result. Native current-head review and preparation are proceeding without a CI rerun, synthetic code push or inherited-red exception.

@clawsweeper

clawsweeper Bot commented Oct 17, 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 17, 2026 05:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 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-17T14:06:47.842875Z 7923cd8 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.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR moves private presentation and plugin settings helpers into their existing page and native-host owners.

Example: Filter Live Activity to the read tool under /control/activity.

  • Before: The page forwards filter state and callbacks through a separate presentation module.
  • After: Private presentation reads the page-owned filters directly and preserves the same controls and results.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, source-verified consolidation with production-owner harness coverage; supplied evidence does not establish a shipped-entry-point run of this refactor.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; submitted focused tests exercise production page and panel owners, while inspected historical screenshots support only the predecessor credential layout.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
Reason: The maintainer-authored direction reduces private forwarding while retaining existing rendering, state authority, routes, and native hosts.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored PR open: the consolidation is useful, the binding-name repair preserves behavior, and no actionable correctness finding remains.

Priority: P3
Reviewed head: 7923cd88c30c2757afd5c740405fed0366f679d8

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI pages and native panel registrations consume existing domain owners and Gateway projections, then render controls whose actions return to those same owners.

flowchart LR
  A[Routes and native hosts] --> B[Page and panel owners]
  C[Gateway and browser state] --> B
  B --> D[Reactive projections]
  D --> E[Private Solid presentation]
  E --> F[User controls]
  F --> B
Loading

Technical review

Best possible solution:

Land the private-owner consolidation once the existing exact-head CI gates pass.

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

No product defect is claimed; source comparison establishes the duplicated forwarding and private-module boundaries being removed.

Is this the best way to solve the issue?

The consolidation fits existing ownership, preserves live JSX reads and component lifetimes, and removes the superseded paths without adding another abstraction.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9f967b15e389.

Provenance checked

  • Activity presentation and local interaction state keeps the original intent (10c95d1: Move filters, expansion, scrolling, and page lifetimes into Solid while retaining synchronous request authority.)
  • Debug presentation and diagnostics keeps the original intent (d64ce70: Port Debug to Solid while preserving routes, Gateway contracts, and request/subscription retirement.)
  • Lobsterdex presentation keeps the original intent (facdd3c: Render the page with Solid while preserving discovery storage, existing controls, and domain ownership.)
  • Desktop presentation keeps the original intent (dd6429f: Give Solid presentation and cleanup ownership while a synchronous domain factory retains connection and dock intent.)
  • Browser native presentation keeps the original intent (3a70852: Use the native bridge and a retained presentation factory while preserving synchronous navigation and native-browser admission.)
  • Terminal native presentation keeps the original intent (52ddcbc: Replace rendering controllers with retained factories while keeping synchronous PTY admission and session lifetime.)
  • Plugin credential settings keeps the original intent (04ce867: Support credential metadata inspection and editing while preserving field-scoped cancellation and acknowledged persistence.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduction reviewed: The introduced diff folds existing implementations into their consumers; current-main changes in the affected directories concern other files and do not supersede this consolidation. (7923cd88c30c)
  • Latest repair preserves reactive reads: Compared with the previous reviewed head, the repair consistently renames outer Activity props to pageProps and aliases Desktop's imported JSX type to SolidJSX; it changes no markup, actions, or lifecycle logic. (ui/src/pages/activity/activity-page-view.tsx:125, 7923cd88c30c)
  • Credential contract retained: The moved code retains edit admission, exact credential-path matching, draft discard, and acknowledgment by the flush captured for that edit, preserving the contract established in feat: inspect and edit plugin credentials in settings #149286. (ui/src/pages/plugins/plugins-page.ts:143, 7923cd88c30c)
  • Complete private-path cutover: Tracked-source searching found no remaining imports of the retired presentation modules or settings factory; the surviving Debug test-inventory reference names an existing test file. (7923cd88c30c)
  • Exact-head CI remains active: Run 39039137961 has passing i18n, performance, security, architecture guards, and initial lint checks; typed lint, types, and UI runtime checks remain in progress, with the aggregate gate pending. (7923cd88c30c)
  • Prepared media assessed: All four prepared images were inspected and show historical credential-settings before/after layouts from the linked predecessor, rather than this refactor's runtime behavior. (/home/runner/work/clawsweeper/clawsweeper/artifacts/event/codex/proof-scratch/175155/media-proof-manifest.json)

Likely related people:

  • Peter Steinberger: Raw commit 3a70852 adds ui/src/components/browser/browser-panel-registration.tsx:47 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3a7085249382; files: ui/src/components/browser/browser-panel-registration.tsx)

PR surface

Source -121, Tests +109. Total -12 across 20 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 15 1158 1279 -121
Tests 5 499 390 +109
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 20 1657 1669 -12

Review metrics

Metric Value Why it matters
Production versus test LOC Production +1,157/-1,278 (net -121); tests +499/-390 (net +109). Production shrinks while relocated assertions exercise real page, Gateway-fixture, and storage-owner boundaries instead of private presentation exports.

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is an internal ownership refactor with no intended user-visible behavior change.
  • 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.

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-17T05:47:53.561Z sha cc6ba70 :: needs changes before merge. :: none
  • reviewed 2026-10-17T09:45:10.721Z sha 37b3b016fbc74c0c254ad73aeeb2cb74f65024b4 :: needs changes before merge. :: none
  • reviewed 2026-10-17T09:52:46.937Z sha 0255096 :: needs maintainer review before merge. :: none

Reviewed October 17, 2026, 10:09 AM ET / 14:09 UTC (Revision 4).

@openclaw-barnacle openclaw-barnacle Bot reopened this Oct 17, 2026
@steipete
steipete force-pushed the deslop/z25-14-ui-owner-surfaces-20261015 branch from cc6ba70 to 37b3b01 Compare October 17, 2026 09:39
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Capture the existing page facts directly instead of passing them through a one-use settings factory. Preserve edit authority, credential matching and per-edit flush acknowledgment; keep the page below its line cap.
@steipete
steipete force-pushed the deslop/z25-14-ui-owner-surfaces-20261015 branch from 37b3b01 to 0255096 Compare October 17, 2026 09:47
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Distinguish the Activity page owner props from nested view props and alias the desktop JSX type beside its native element augmentation. This fixes the five no-shadow errors introduced while folding the single-consumer views without changing rendering or owner behavior.
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The branch and body now include the reviewed five-error no-shadow repair at 7923cd8. Only the outer Activity props name and imported Desktop JSX type alias changed. Targeted syntax lint, formatting, signature verification and the exact-head isolated pre-push guard pass (14 cases). Fresh hosted CI supplies the complete type/lint/runtime gate; no inherited-red exception is claimed.

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete merged commit 4d9a547 into main Oct 17, 2026
95 of 96 checks passed
@steipete
steipete deleted the deslop/z25-14-ui-owner-surfaces-20261015 branch October 17, 2026 19:08
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
…openclaw#175155)

* refactor(ui): keep plugin settings in their page owner

Capture the existing page facts directly instead of passing them through a one-use settings factory. Preserve edit authority, credential matching and per-edit flush acknowledgment; keep the page below its line cap.

* refactor(ui): localize single-consumer desktop and debug presentation

* refactor(ui): keep private views with their page and host owners

* chore(ui): relocate Debug raw-copy baseline to its page owner

* fix(ui): avoid shadowed bindings in folded page views

Distinguish the Activity page owner props from nested view props and alias the desktop JSX type beside its native element augmentation. This fixes the five no-shadow errors introduced while folding the single-consumer views without changing rendering or owner behavior.
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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