Skip to content

refactor(ui): simplify retained chat pane composition - #174723

Merged
steipete merged 8 commits into
mainfrom
solid2/w-idiom4-chat-pane
Oct 17, 2026
Merged

steipete merged 8 commits into
mainfrom
solid2/w-idiom4-chat-pane

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Retained chat panes still routed Solid publication through an extra owner module, and the board duplicated the embedded panels' presentation listener.

User Impact

Chat keeps its transcript, draft, focus handoff, and parked-panel behavior. Host tags, selectors, and lazy route boundaries stay intact.

Why This Change Was Made

The pane view now owns publication, initial mounting, and disposal in one composition. It consumes the synchronous pane runtime directly, removes the intermediate owner object and frozen prop handoffs, and reads progress-card scope from its owner instead of maintaining a second binding copy. The board shares the pane presentation helper, page listeners use owned teardown, and notice classes use Solid arrays.

Remaining effects synchronize the progress-card watch, browser timer, committed DOM/focus, and Gateway/presentation event streams. The single render effect supplies native bridge inputs before the first pane render. Remaining snapshots, native DOM queries, and domain listeners have explicit ownership comments. The active composer lane's files remain untouched.

The final main integration resolves the session-prefetch.ts conflict by taking main's owned-listener implementation and boundary comments in full; that file drops out of this PR.

Evidence

Final head: 03747c87161a40b77e9745f48b87d2d03077483b. Merge base: b0ab44081ef483fcd0a86c8afae3b4eb30e9bc24.

Proof Result
Fresh full CI ci:full run 38988467031 completed successfully on the final head
Final UI typecheck pnpm tsgo:ui passed after conflict resolution
Independent review Final focused diff: no actionable P0–P2 findings
Focused tests before final main integration 13 cases across three UI files passed; all eight frame-update browser cases passed after the startup-render repair
Targeted lint / formatting / diff check Passed; final conflict adopted main's file without a runtime edit
Production Knip No chat findings; exact baseline reproduces all outside-scope findings byte-for-byte. No new ignores
Production build + strict performance, merge base 340,565 B startup JS gzip; 1 startup CSS request
Production build + strict performance, final head 340,572 B startup JS gzip (+7 B); 1 startup CSS request
Synthetic visual proof Narrow pair identical. Desktop differs only in the retained-draft pencil badge: 39 pixels in a 10×10 region

One production build per side on the same machine, Node 26.12.0 and pnpm 12.11.1. Both strict checks passed without warnings or violations. Raw startup JS is unchanged at 1,036,482 B across seven requests; startup CSS is 38,666 B gzip in one request. The 7-byte gzip increase remains below the 374,285-byte budget, with no added startup request or eager page import.

The desktop capture fills the draft, waits for fonts and two animation frames, then captures; it does not wait for the 200 ms persistence timer and asynchronous draft-presence projection. All eight inspected badge-pipeline files are identical between the compared commits. Timing is a plausible explanation for the marker difference, not an established cause. This is an accepted capture limitation; no transcript, composer, or layout pixels differ. All four complete images were inspected and contain synthetic data only.

Refactor measure, touched production files Before After
LOC 6,227 6,219
Controller-pattern references 7 7
createEffect 6 6
createRenderEffect 2 1
untrack 8 6
Native listener registrations 7 2
DOM queries, including generic calls 14 14
Hand-built class strings 2 0
Production flush / captured Solid owners 0 / 0 0 / 0

Production delta: −8 lines, including the boundary comments. Test/support delta: no net added lines. The seven controller-pattern matches are native invalidation callbacks in the frame adapter. Remaining queries cross retained pane, transcript, header, suggestion-card, or plugin-composer renderer boundaries; the two raw listeners belong to synchronous domain owners with dispose cleanup. No dependency or ignore changes.

Before: desktop chat and retained draft

After: desktop chat and retained draft

Before: narrow chat and retained draft

After: narrow chat and retained draft

Failure investigation and limits

CI exposed a second startup render caused by seeding the progress projection from a fresh object instead of its scope memo. Seeding it from the memo preserved identity. The existing frame-update browser file reproduced five failures, then passed all eight cases after the repair and again after the earlier main integration.

Historical CI run 38980625929 failed six variants of Control UI metadata observation > shares pending catalog reads across metadata invalidations: single, shared, late follower, late follower without metadata, late follower without metadata, metadata first, and late follower, catalog first. All six reproduced on its exact main parent be6eedf5e0d5a081a0e89a1f8a44d3b4fe4f02a8 with models.list expected 2, observed 3. Main commit 2b3e9726390 subsequently corrected these stale expectations and is included in the current base.

That historical run also timed out in Control UI cross-channel automation management with a real Gateway > configured owners and admin chat manage a Telegram-created job while a non-owner cannot, at the line-496 provider-result poll. It remains unclassified. Baseline behavior reached a successful final verdict but failed artifact cleanup. One later two-case invocation at prepared runtime head 712fbf2437734982ab979d71eeb63414591c9962 passed Gateway replacement (236.768 s); the owner/admin case hit its 240-second outer timeout after bootstrap alone consumed 172.349 s. That local timeout did not reproduce the CI assertion and is not passing proof. A queued Testbox allocation was stopped without executing tests. No further local replay was run. Final exact-head full CI run 38988467031 completed successfully; that current proof qualified the landing without claiming the historical timeout was fixed by comment changes.

Knip attribution: the identical production command exits 1 on both exact commits with output SHA-256 26365230143e4100741f1b597fbea8186d1a227271ae2fe8d272cb11c8b1dac1. All finding-file blobs match: extensions/discord/src/internal/discord.ts, extensions/discord/src/internal/rest.ts, extensions/discord/src/monitor/provider-session.runtime.ts, src/agents/agent-tools.params.ts, src/agents/embedded-agent-runner/run/attempt-stage-timing.ts, src/agents/runtime/internal-hooks.ts, and src/commands/doctor-maintenance-foreground.ts.

@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-17T00:56:58.242055Z 03747c8 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 P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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 consolidates retained chat-pane rendering and lifecycle composition and reuses shared presentation and listener helpers.

Example: Display chat with “A retained draft” at 1280×900 and 560×900.

  • Before: The transcript and draft render through a separate pane-owner module.
  • After: The consolidated composition renders byte-identical screenshots at both widths.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The inspected visual evidence is strong and the previous defect is fixed, but failed exact-head catalog assertions leave validation confidence limited.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected desktop and narrow before/after browser screenshots showing identical transcript and draft presentation; existing boundary tests support lifecycle preservation, and maintainer-authored work is outside the ordinary contributor proof gate.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: The area owner's follow-on refactor removes composition indirection without changing settings, public contracts, retained DOM ownership, or lazy-loading behavior.

Merge readiness

⛔ Needs changes before merge - 1 item remains

The previous startup identity finding is fixed, and no new source defect was found; exact-head CI now has catalog-observation failures that still need attribution.

Priority: P3
Reviewed head: 712fbf2437734982ab979d71eeb63414591c9962

Before merge

  • Complete next step - Attribute the six metadata-observation failures in the exact-head UI E2E shard using a matching base failure or a head-versus-revert comparison, then repair only any demonstrated diff-caused defect.

Findings

None.

Agent review details

How this fits together

The Control UI pane composition consumes synchronous chat runtime facts and Gateway projections, then publishes retained DOM frames and coordinates commit completion, focus, subscriptions, and disposal.

flowchart TD
  A[Gateway and application owners] --> B[Synchronous chat runtime]
  C[Native pane bridge inputs] --> B
  B --> D[Pane view composition]
  D --> E[Parked render lifecycle]
  E --> F[Retained chat DOM]
  F --> G[Commit and focus callbacks]
  G --> B
Loading

Technical review

Best possible solution:

Retain the consolidated composition and resolve the catalog-observation CI attribution before landing.

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

This refactor reports no current product bug; source comparison confirms the earlier startup identity defect is repaired, without executing target code.

Is this the best way to solve the issue?

The consolidation is appropriate because it preserves synchronous runtime authority, removes the intermediate owner, and shares existing presentation behavior.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Pane publication and commit ownership keeps the original intent (e4f7386: Retire the simulated host lifecycle while keeping synchronous domain owners and an explicit publication/commit fence.)
  • Progress-card projection and parked subscription keeps the original intent (3c53daf: Let Solid own presentation subscriptions while the Gateway-scoped store retains hydration, cache, and card-lifetime authority.)
  • Retained presentation and notice composition keeps the original intent (5dd456a: Render retained chat panes with Solid while preserving tags, selectors, focus, drafts, and retained node identity.)
  • Page listener lifecycle keeps the original intent (58a7c26: Move page lifecycle ownership into Solid while retaining synchronous layout mutations and commit-aware routing.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit de691c1 adds ui/src/pages/chat/solid-render-lifecycle.ts:25 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: de691c1ec3c0; files: ui/src/pages/chat/solid-render-lifecycle.ts)

PR surface

Source -21, Tests 0. Total -21 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 8 235 256 -21
Tests 2 3 3 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 238 259 -21

Review metrics

Metric Value Why it matters
Production versus test delta Production +235/−256 LOC; tests/support +3/−3 LOC. Production shrinks by 21 lines while removing the intermediate composition owner; test assertions are retained.

Labels

Label changes:

  • add P3: This is an internal simplification with preserved user-facing behavior and no established urgent product regression.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • remove P2: Current review triage priority is P3, so this older priority label is no longer current.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P3: This is an internal simplification with preserved user-facing behavior and no established urgent product regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 (1 earlier review cycle)
  • reviewed 2026-10-16T22:40:49.546Z sha ebb61a2 :: needs changes before merge. :: [P2] Initialize the progress projection with the memoized scope

Reviewed October 16, 2026, 7:32 PM ET / 23:32 UTC (Revision 2).

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The startup progress-scope identity finding is fixed, all eight frame-update browser cases pass, and the final body includes refreshed exact-base build and screenshot proof.

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 16, 2026
@steipete
steipete merged commit 86abec4 into main Oct 17, 2026
118 checks passed
@steipete
steipete deleted the solid2/w-idiom4-chat-pane branch October 17, 2026 01:10
@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 17, 2026
* refactor(ui): simplify retained chat pane composition

* refactor(ui): keep composer-owned view cleanup out of pane scope

* refactor(ui): remove unused pane reveal option

* fix(ui): preserve initial progress projection identity

* docs(ui): document retained pane teardown queries

* docs(ui): explain retained chat boundary ownership
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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L 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