Skip to content

refactor(ui): publish chat workspace state to Solid - #175471

Merged
steipete merged 6 commits into
mainfrom
solid2/w-idiom6-workspace
Oct 17, 2026
Merged

steipete merged 6 commits into
mainfrom
solid2/w-idiom6-workspace

Conversation

@steipete

@steipete steipete commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Chat workspace files, filters, and preview tabs still depend on a pane redraw callback after their state changes.

User Impact

No intended user-visible change. Files and preview tabs preserve loading, navigation, error, reconnect, and editor behavior.

Why This Change Was Made

A synchronous workspace owner now publishes mutations through the pane's Solid projection. Workspace, preview, and editor objects stay raw, preserving immediate write-then-read behavior and object identity. All 12 workspace requestUpdate references are removed. The runtime's shared state accessor is generalized to readState() with its callers migrated.

The retained frame preserves the workspace, composer, realtime, active-resource, discussion, progress, and lazy-panel-readiness projections. There are no route, markup, stylesheet, selector, or dependency changes. This is one focused slice of chat redraw retirement.

Evidence

Proof Result
Four directly changed workspace/file-panel test files 66 tests pass; loading, stale responses, reconnect ownership, previews, binary download, and draft identity covered
Targeted frame-cadence browser unit 8 cases pass after runtime integration
UI and chat test typechecks; scoped lint/format; git diff --check Pass
Independent P0–P2 review All runtime integrations scoped-clean
Full CI for aaec90a19e7f Run 39033019528: all 39 planned jobs pass, including all 3 UI unit, 9 E2E/extension, and 2 real-Gateway shards
Strict startup/performance check Current head passed: startup 338,698 B gzip / 1,028,062 B raw; CSS 1 request / 38,594 B gzip. Chat boot +120 B and New Session +1 B against the same-run base; request counts unchanged.
Initial same-machine local build comparison Startup 338,864 → 338,876 B gzip (+12 B), raw JS unchanged at 1,028,267 B; CSS remains 1 request / 38,594 B gzip
Production Knip on final head Only the same existing root unused dependency, @modelcontextprotocol/client; no new unused files or dependencies

No visual rendering changed, so screenshots are not applicable to this state-publication refactor.

Production LOC: 2,162 → 2,203 (+41); tests: 1,902 → 1,917 (+15). Growth supplies the missing workspace subscription and its first projection consumer. Touched production counts: requestUpdate 15 → 3 (the remaining three belong to other pane behavior), .subscribe( 1 → 1, createEffect( 2 → 2, untrack( 2 → 2, and createSignal( 2 → 2. Workspace-specific redraw references: 12 → 0.

The final tested merge is f8f907052f75882d39a3e0ca0d8e258cfbfd7b04, based on main 65920347cf86d6738252f578e52af0bf40e02d2d and PR head aaec90a19e7f39adbe5611fec436c9c8441950a7. It includes the landed goal, companion, and send-scheduling changes.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 17, 2026
@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.

@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-17T12:36:59.030476Z aaec90a 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.

@steipete
steipete enabled auto-merge (squash) October 17, 2026 11:35
@steipete
steipete disabled auto-merge October 17, 2026 11:36
@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 changes before merge.

What this changes

This PR replaces workspace redraw callbacks with synchronous owner notifications consumed by the pane’s Solid projection.

Example: Open notes.md, then select the Read filter.

  • Before: The workspace changes synchronously and requests a pane redraw.
  • After: The workspace changes synchronously and publishes to Solid, preserving the preview and editor identities.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, source-consistent implementation with useful harness coverage and no discrete finding; behavioral confidence remains below shipped-entry-point proof.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored internal refactor is outside the ordinary contributor proof gate; supplied coverage exercises workspace owners and a mounted Solid rail with controlled Gateway responses.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: No current user-facing defect is asserted; workspace rendering still depends on manual pane redraw notifications.
Reason: The maintainer-authored direction continues the established Solid migration with one publication owner and preserved interaction contracts.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-directed refactor completes a distinct workspace publication path, with no actionable introduced defect found; GitHub reports a merge conflict.

Priority: P3
Reviewed head: 0a74888bc278057c5741824b74e045622c7e4343

Before merge

  • Complete next step - Resolve GitHub’s reported merge conflict while preserving current main’s realtime projection and this PR’s workspace projection.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not demonstrate workspace publication through the shipped chat pane, and no base/head regression run is shown.
Agent review details

How this fits together

The Control UI workspace owner receives file, artifact, filter, and navigation changes and supplies loading state, listings, and retained previews to the chat pane.

flowchart LR
  Actions[Workspace actions] --> Owner[Synchronous workspace owner]
  Gateway[Gateway responses] --> Owner
  Owner --> Projection[Solid owner projection]
  Projection --> Frame[Retained pane frame]
  Frame --> Panels[Files and preview panels]
Loading

Technical review

Best possible solution:

Complete the workspace-owner projection cutover while preserving synchronous admission, stale-result checks, and retained editor identities.

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

This is a behavior-preserving refactor, not a reported defect; source inspection confirms the redraw dependency being replaced, and no target code was executed.

Is this the best way to solve the issue?

The change follows the existing projection contract, preserves synchronous mutable state, and removes the replaced workspace callbacks without creating a second state store.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Workspace state and redraw callbacks changes intended behavior with a stated reason (029f6c1: The workspace module extraction separated state/loading from orchestration while preserving behavior; later cleanup retained host redraw callbacks.)
  • Retained preview identity and revalidation keeps the original intent (ecfd906: Explicit reopen refreshes clean files while preserving drafts, editor identity, and newer read intent.)
  • Listing ownership keeps the original intent (9062067: Directory and search responses belong to their captured query and must not replace newer selection intent.)
  • Retained pane composition keeps the original intent (86abec4: The Solid pane owns publication, mounting, parking, and disposal while the synchronous runtime retains domain state.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 86abec4 adds ui/src/pages/chat/chat-pane-runtime-view.tsx:115 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 86abec416118; files: ui/src/pages/chat/chat-pane-runtime-view.tsx)

PR surface

Source +42, Tests +15. Total +57 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 6 57 15 +42
Tests 4 42 27 +15
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 99 42 +57

Review metrics

Metric Value Why it matters
Production versus test LOC Production +57/-15; tests +42/-27 The net production growth supplies the missing synchronous subscription contract and its production projection consumer.

Labels

Label changes:

  • add P3: Internal state-publication 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: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: Internal state-publication 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: ⏳ 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 17, 2026, 7:59 AM ET / 11:59 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The runtime conflicts are resolved on aaec90a19e7f39adbe5611fec436c9c8441950a7, preserving all owner projections. Full CI 39033019528 passed all 39 planned jobs, including the UI, E2E, and real-Gateway suites. The PR body contains the final proof and startup measurements.

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete merged commit 82599a2 into main Oct 17, 2026
105 checks passed
@steipete
steipete deleted the solid2/w-idiom6-workspace branch October 17, 2026 12:57
@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
* refactor(ui): publish chat workspace state to Solid

* test(ui): observe workspace owner in file tab harness
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: S 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