Skip to content

refactor(ui): own session detail state with Solid - #174684

Merged
steipete merged 1 commit into
mainfrom
solid2/w-idiom-components-session-details
Oct 16, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-idiom-components-session-details

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem and change

Session detail rendering used a controller class with a host-notify callback. The menu wrapped that callback in a second revision publisher, while the Sessions page consumed the same controller through its domain projection.

Replace the class with one owner-scoped createSessionDetails factory used by both callers. The session capability remains the row authority; synchronous binding and request admission reject duplicate requests and stale replies. A local request-status signal drives loading and errors, and row invalidation follows the existing observation. The Sessions page reads request status outside its deliberately untracked domain projection. Cleanup releases observations without publishing state. The menu's host adapter and redundant effect untrack are removed.

Proof

Check Result
session-menu.communication.test.ts 7 passed, once; stale target proof also checks exactly two describe requests
sessions-page.typing.test.ts 19 passed, once, 38.25 s; includes expanded compact rows, deep links, close-before-reply and refresh
pnpm tsgo:ui Passed on complete two-caller cutover
Targeted lint / formatting / diff check Passed
Production Knip Passed
Independent Codex review Scoped-clean, complete, on the final two-caller cutover; coordinator source review found no issue
Full UI CI (ci:full) All jobs passed except the unrelated initial About-navigation case below; native admin evidence retains the failure

The initial UI typecheck and Knip found the second page caller; it is migrated in this PR. An initial lint finding required braces around the observation callback. Both are corrected. The initial isolated review covered the menu; the final review includes both callers and the domain projection contract.

No markup, styles, routes, tags, selectors, or lazy boundaries changed. This is a state-only refactor, so no startup build or visual capture was needed.

Touched production metric Before After
LOC 1,819 1,818
SessionDetailsOwner references 5 0
createEffect 1 1
untrack 1 0
Direct addEventListener 0 0

The old owner file is 114 lines; the factory is 120. The menu drops from 101 to 93, and its coupled Sessions-page caller changes from 1,604 to 1,605. Test LOC: 278 → 279. The local row revision observes canonical row/binding invalidation only; it is not a generic host repaint publisher.

CI attribution

The sole failing case times out during page.goto(settings/about) at link-hover-preview.e2e.test.ts:227, before hovering or opening any session menu. The diagnostic has booted=true, gateway connected, rosterReady=true, routeReady=false and About route.status=error. The actual tested merge changes only the shared session-detail factory, its menu settings caller/test, and its lazy Sessions-page caller. About, app, readiness, hover, fixtures, build/dependency inputs and the menu-render callers are byte-identical to the actual CI base. The changed factory runs only inside a requested session menu or the lazy Sessions page, neither exercised by initial About navigation. This is source-audited unrelated-failure admission; the route error cause remains unknown and no matching-main failure is claimed.

Run 38967368962, job checks-ui-e2e (5/9) (117197644612): Link hover previews > keeps title hints when the optional hover runtime cannot load. 464/465 cases in the shard passed. Every other job, including both real-Gateway shards and security-fast, passed.

The native failure reporter classifies the case as new because the latest comparable scheduled main job passed. The exception relies on the inspected tested merge and source ownership, not a matching-main claim. Memory Import and Snapshot observed the same initial About-route failure. No local E2E rerun or speculative product fix was performed.

Share the owner-scoped detail factory between menus and the Sessions page. Preserve synchronous request admission and read request status outside the page projection.
@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-16T21:12:13.784558Z ae54ef9 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: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Replace the shared session-details class and notification callbacks with one Solid-scoped factory used by session menus and the Sessions page.

Example: Open settings for agent:main:next while a descriptor for agent:main:old is pending.

  • Before: The class admits the current descriptor and updates rendering through notification callbacks.
  • After: The factory preserves descriptor admission and updates rendering through Solid signals.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A coherent, behavior-preserving refactor supported by focused UI harness validation and source inspection.
Proof confidence 🦐 gold shrimp (3/6) The supplied maintainer-authored classification exempts ordinary contributor proof; reported menu and Sessions-page tests exercise the changed factory through rendered controls, with no live runtime artifact claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: No intended user-visible change; session detail presentation still relied on callback-driven invalidation across two Solid consumers.
Reason: The established feature owner directs a small, complete conversion that removes notification plumbing while preserving synchronous domain decisions.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a coherent, owner-directed refactor, and source review found no actionable correctness or security defect.

Priority: P3
Reviewed head: ae54ef98f674e6eb761756b42c34330c9d235003

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied scenarios use mounted production UI with mocked Gateway I/O rather than a shipped Control UI run; this maintainer-authored refactor is outside the ordinary contributor proof gate.
Agent review details

How this fits together

Control UI menus and expanded session rows request descriptors through the session capability, which owns canonical row facts; the shared factory manages observation lifetime and presentation status.

flowchart LR
  A[Session menu] --> C[Session details factory]
  B[Sessions page] --> C
  C --> D[Session capability]
  D --> E[Gateway descriptor RPC]
  D --> F[Canonical row observations]
  F --> C
  C --> G[Solid presentation]
Loading

Technical review

Best possible solution:

Use the shared factory for both rendering lifetimes while retaining synchronous request admission and capability-owned row reconciliation.

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

This refactor reports no product defect to reproduce; source inspection and existing mounted-UI scenarios establish the behavior it intends to preserve, and no target code was executed during review.

Is this the best way to solve the issue?

The conversion is appropriately scoped: both callers share one implementation, request decisions remain synchronous, and Solid observes presentation state outside the untracked page projection.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Descriptor loading and reconciliation keeps the original intent (69b2627: Load exact descriptors for expanded compact rows without refetching full session lists.)
  • Shared menu observation lifetime keeps the original intent (bc8b7dd: Let Solid own menu observation lifetime while preserving immediate registration, current-target admission, and capability-owned metadata.)
  • Synchronous owner semantics keeps the original intent (de195e1: Keep synchronous observation registration and current-session admission outside deferred reactive state.)
  • Sessions page domain projection keeps the original intent (376ccd5: Keep query and mutation decisions synchronous while Solid owns rendering and disposal.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -1, Tests +1. Total 0 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 132 133 -1
Tests 1 1 0 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 133 133 0

Review metrics

Metric Value Why it matters
Production versus test delta Production +132/-133; tests +1/-0 The complete two-caller conversion slightly reduces production code without adding a parallel implementation.

Labels

Label changes:

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

Reviewed October 16, 2026, 5:24 PM ET / 21:24 UTC.

@steipete
steipete merged commit 9cdaf71 into main Oct 16, 2026
101 of 108 checks passed
@steipete
steipete deleted the solid2/w-idiom-components-session-details branch October 16, 2026 22:25
@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
Share the owner-scoped detail factory between menus and the Sessions page. Preserve synchronous request admission and read request status outside the page projection.
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: 👀 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