Skip to content

refactor(ui): scope sidebar people lifetimes to the Solid view - #174500

Merged
steipete merged 4 commits into
mainfrom
solid2/w-idiom-components-sidebar-people
Oct 16, 2026
Merged

steipete merged 4 commits into
mainfrom
solid2/w-idiom-components-sidebar-people

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Sidebar People still uses a host controller to connect presence observations, observe the profile directory, and manage its lazy person-card runtime. That lifetime belongs to the mounted Solid view.

What Changed

Replace SidebarPeopleController with createSidebarPeople and remove its host registration. The view owns presence subscriptions, directory observation, interaction listeners, and cleanup. The retained sidebar owner keeps synchronous filter/status/sort preferences because snapshot restoration reads them before row rendering.

The factory reads the raw owner projection: snapshot preparation itself reads the directory, so deriving the directory from prepared state would create a cycle. Preparation runs before People capture; DOM commit runs before People synchronization. Attention's direct Gateway-retirement subscription remains intact. Native detach dismisses cards immediately, while a same-task reparent retains working interactions. No tag, class, route, selector, markup, CSS, or lazy-boundary change is intended.

Evidence

Check Result
Codemod Dry-run completed before porting the controller and host wiring
Mounted online suite 21/21 passed on the final integrated candidate, including snapshot readiness, context replacement, native detach/reparent, filters and counts
UI typecheck pnpm tsgo:ui passed
Independent review Final full-change P0–P2 review with complete relevant owner context scoped-clean, confidence 0.85
Scoped lint/format and diff Final scoped lint, format and diff check passed
Production Knip Passed in 1m52s; no new ignores
Paired build and strict performance One build per side on the same machine; both strict checks passed against baseline 971085d5d7b88caa5a2fa8872c4e2243f84b29df
Startup JS 339,711 → 339,738 B gzip (+27); 7 JS / 1 CSS request on both sides; CSS unchanged at 38,786 B gzip
Route boot Chat 1,654,767 → 1,654,731 B (−36); new session 1,338,261 → 1,338,234 B (−27)
Visual proof Ownership/lifecycle change only; existing markup and CSS retained, with mounted behavior assertions
Broad CI Exact-head ci:full run 38942602514, attempt 1: 35 passed, 26 skipped, 4 failed; failures attributed below

The initial startup raw byte total is identical (1,034,166 B), and mapped startup source sets are unchanged; the small compressed difference accompanies generated asset-name changes. The lazy person-card runtime remains behind its existing import. No new dependency was added.

The mounted suite emits existing TimeoutOverflowWarning messages with its synthetic future presence timestamps; the unchanged presence-activity lifecycle schedules that deadline directly. The same warnings are retained in the earlier prepared-suite evidence. This PR does not claim to fix that separate timer owner.

Size and ownership

Touched-production metric Before After
LOC 2,950 2,948
Controller-pattern references 24 17
createEffect 2 3
createRenderEffect 0 0
untrack 3 3
Raw addEventListener 5 2
DOM queries 1 1

Production decreases by 2 lines; tests grow from 652 to 681 (+29) across twelve touched paths. The added effect owns an external context subscription. The synchronous preference owner is retained for snapshot restoration, while its former view lifecycle is gone. No cloud proof lease was used.

CI exception

CI tested merge feeddf2dca1a1969e04c1b71d2bc0e9a6ddee1ac, whose ordered parents are main d9f2d5b596be5c900d741b7b26d5b033de0f68b5 and exact PR head 1cae2e0db3c318674015d553f1e7e662ec462f74. An independent local merge reproduced its tree; the actual merge delta is the twelve intended People paths.

Failed job and exact case Attribution
checks-ui-e2e (5/9): Link hover previews > keeps title hints when the optional hover runtime cannot load Matches scheduled-main 38940084041, job 117105697510: the initial Field guide hover times out at line 238.
checks-ui-e2e (6/9): Claude native session catalog > auto-loads older chat without moving the viewport and disables paired-node continuation Matches the same scheduled-main run, job 117105697650: catalog request count is 2 rather than at least 3 at line 567. The unchanged fixture advances 30 seconds while main now polls every two minutes.
checks-ui (3/3): web push service worker readiness > still rejects when service worker readiness times out Source-unrelated exception. The expected readiness rejection succeeds; the following global timer-count assertion sees 1 rather than 0. This exact case passed scheduled main job 117105697791, and one local failed-file replay passed 7/7. Neither result establishes a fix or confirms flakiness.
openclaw/ci-gate Downstream aggregate of those three jobs.

The web-push test imports its runtime directly without mounting People. Its test/runtime, retry and normalization packages, error formatting/redaction, test runner and helpers, UI Vitest configuration, and lockfile are byte-identical to the actual tested main parent. The readiness owner clears its own timer in finally. This CI shard uses non-isolated Bun fork workers: per-file cleanup disposes Solid roots, restores timers, and retires DOM/module state. The installed locked Vitest source creates separate child processes and retains the process's concurrency ID. Mounted sidebar cases ran on IDs 2/3; web-push ran on ID 1. The extra timer's origin remains unknown. No timer workaround or claimed repair is included.

All other required jobs passed, including both real-Gateway shards, UI shards 1/2, the other seven E2E shards, production/test types, guards, lint, security-fast, and performance. The native operator-authorized exception retains these failures; CI is not reported green. No CI rerun or broad local suite was used.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 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 16, 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-16T17:52:43.027759Z 1cae2e0 PR opened
ℹ️ 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 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR moves sidebar People subscriptions, directory observation, and card cleanup into the mounted Solid view.

Example: Move the sidebar between desktop and drawer while Ada’s person card is open.

  • Before: The host controller manages card dismissal and subsequent interactions.
  • After: The Solid view owns interactions and cleanup, while native detach still dismisses the card immediately.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The ownership cutover is coherent and has meaningful mounted coverage, but supplied behavior evidence remains harness-based.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; its supplied validation exercises mounted sidebar code with mocked Gateway I/O rather than a shipped browser flow.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Sidebar People lifecycle resources still follow the legacy host controller after rendering moved to Solid.
Reason: The maintainer-directed change completes an existing migration, removes the superseded lifecycle owner, and preserves current interaction and preference contracts.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-directed refactor completes the sidebar People ownership cutover, and source review found no concrete introduced defect.

Priority: P3
Reviewed head: 1cae2e0db3c318674015d553f1e7e662ec462f74

Before merge

  • Complete next step - Determine whether the web-push pending-timer assertion at ui/src/app/web-push.runtime.test.ts:120 also fails on the base under the same shard conditions.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-browser lifecycle demonstration or fail-before/pass-after run is supplied; the inspected mounted cases support this behavior-preserving refactor.
Agent review details

How this fits together

The Control UI sidebar consumes Gateway presence, the authorized profile directory, and session counts to render people and lazily open activity cards.

flowchart TD
Gateway[Gateway presence] --> People[Solid People lifetime]
Directory[Authorized profile directory] --> People
Preferences[Synchronous filter preferences] --> People
People --> Sidebar[Sidebar people rows]
Sidebar --> Runtime[Lazy activity card runtime]
Loading

Technical review

Best possible solution:

Complete the Solid-owned lifecycle cutover while preserving synchronous preferences, existing directory authority, and lazy card loading.

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

This is a lifecycle refactor rather than a reported product failure; the mounted scenarios were inspected, and no target code was executed.

Is this the best way to solve the issue?

The change follows the existing Solid migration contract by deleting the controller and placing subscriptions and cleanup under the view without moving synchronous snapshot preferences into signals.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Lazy person-card interactions keeps the original intent (3aaf13c: Provide accessible person activity cards through a sidebar-owned lazy runtime.)
  • Presence deadlines and event admission keeps the original intent (2984089: Keep visible activity current without repainting the sidebar for unrelated presence publications.)
  • People filters and authorized directory keeps the original intent (4fa4e7e: Combine online presence with the existing authorized directory while preserving activity cards and session counts.)
  • Solid sidebar ownership keeps the original intent (e80558a: Migrate sidebar rendering to Solid while retaining plain TypeScript domain authority and existing UI contracts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -2, Tests +29. Total +27 across 12 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 11 223 225 -2
Tests 1 39 10 +29
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 262 235 +27

Review metrics

Metric Value Why it matters
Production versus test LOC Production +223/-225; tests +39/-10 Production shrinks by two lines while added mounted coverage protects preference retention and native detach/reparent behavior.

Labels

Label changes:

  • add P3: This is a behavior-preserving UI ownership cleanup without an established urgent user-facing defect.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is a behavior-preserving UI ownership cleanup without an established urgent user-facing defect.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • 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 16, 2026, 2:04 PM ET / 18:04 UTC.

@steipete
steipete merged commit a1c6b9e into main Oct 16, 2026
102 of 108 checks passed
@steipete
steipete deleted the solid2/w-idiom-components-sidebar-people branch October 16, 2026 20:07
@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 17, 2026
…law#174500)

* refactor(ui): own sidebar people observations in Solid

* refactor(ui): clarify sidebar profile projection binding
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 ci:full Keep ordinary native-locale CI selection on the next PR run. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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