Skip to content

refactor(ui): project chat rendering state from its owners - #174940

Merged
steipete merged 1 commit into
mainfrom
solid2/w-idiom5-subs-chat
Oct 17, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-idiom5-subs-chat

Conversation

@steipete

@steipete steipete commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Chat renderers still manage subscriptions and revision counters solely to redraw synchronous owner state.

User Impact

No intended visual or behavioral change. Voice bars, companion attachments, native file actions, and pending-session drafts keep their current tags, styles, and owner contracts.

Why This Change Was Made

Use owner-scoped projections for upload configuration, native Gateway state, microphone levels, and pending-session owners. Microphone levels now update the existing bar bindings without walking DOM children. Pending-session image custody still closes synchronously on Gateway/create events; image changes no longer rebuild the whole pending-session view. Request, stream, reconnect, and ordered lifecycle subscriptions remain direct.

The simplify pass keeps the existing domain owners and removes three effects. For the four touched production files: 1,507 → 1,505 LOC; .subscribe( 7 → 1; createEffect( 7 → 4; untrack( 0 → 0; createSignal 2 → 1. Render effects, manual owner capture, native listener registrations, and production flush calls remain zero. Tests add 18 lines to the existing microphone test for source replacement, DOM identity, and disposal.

Evidence

Check Result
pnpm tsgo:ui Pass
Focused chat view + transcript invalidation/message-index + pane/thread/snapshot retention 228 tests pass across six files, 162.97 s total wrapper wall time
Microphone replacement/disposal Pass; preserves the bar host and ignores retired sources
Scoped format/lint Pass; pre-existing rail reactivity warning unchanged
Production Knip Pass (5m 0.5s)
Independent Codex autoreview No actionable P0–P2 findings
CI performance Startup 340,347 B gzip, one CSS request (38,666 B); chat boot 1,622,315 → 1,622,339 B (+24 B), CSS unchanged; strict check passed
Broad UI/browser/Gateway proof All application checks passed in CI run 38991688577; inherited baseline-ratchet failure described below

No startup files or lazy boundaries change. Per the campaign's local compute limit, no local production build, startup-byte measurement, or browser suite was run. CI owns the broad performance/build checks. No appearance change is intended; no screenshots are needed for this subscription-only refactor.

The completed CI run is red only because the mock-factory ratchet rejects src/cli/update-cli/update-command-service-maintenance-native.test-support.ts:52. That fixture, the scanner, and the baseline ledger are byte-identical between the tested merge and its main parent 8919729f0484. Running the checker against that exact baseline reproduces the same diagnostic. The CI merge changes only these five chat files. This is recorded for the authorized inherited-failure landing route; the failed check is not claimed green.

@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-17T01:40:46.227668Z a50235c 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.

@steipete
steipete enabled auto-merge (squash) October 17, 2026 01:51
@clawsweeper

clawsweeper Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces manual chat-rendering subscriptions and revision counters with owner-scoped Solid projections.

Example: Microphone activity changes from 0.2 to 0.8 while Talk mode is active.

  • Before: The seven-bar activity meter grows through imperative DOM updates.
  • After: The same meter grows through reactive bindings while retaining its DOM identity.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, apparently correct refactor with meaningful rendering coverage; confidence in runtime behavior remains supported by harness evidence rather than demonstrated shipped-entry-point proof.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; supplied validation exercises real rendering code in process, including microphone replacement and disposal, but supplies no shipped-browser runtime artifact.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Chat rendering carries redundant subscription and revision bookkeeping around existing synchronous owners.
Reason: The established area owner supports this direction, and the focused change adopts the documented adapter without adding configuration or changing product contracts.

Merge readiness

✅ Ready for maintainer review

Keep open: this useful maintainer-authored refactor preserves existing owners and rendering contracts, with no actionable introduced defect found; the failing ratchet check also fails on the pinned base.

Priority: P3
Reviewed head: a50235c92ab7fcb858e3029b9edfede2bc086c4f

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not show these subscriptions running through a shipped browser entry point.
Agent review details

How this fits together

Control UI chat components consume synchronous Gateway, configuration, submission, and microphone owners and project their notifications into rendered controls.

flowchart LR
  A[Synchronous domain owners] --> B[Owner projections]
  B --> C[Solid chat components]
  C --> D[Chat controls and voice bars]
  A --> E[Ordered lifecycle events]
  E --> F[Synchronous image release]
Loading

Technical review

Best possible solution:

Use the shared projection adapter for rendering while retaining synchronous domain ownership and direct ordered lifecycle subscriptions.

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

This is a behavior-preserving refactor rather than a reported product bug; source inspection confirms the manual rendering subscriptions it replaces.

Is this the best way to solve the issue?

The change follows the existing projection contract, removes superseded rendering wiring, and keeps event-driven custody with its synchronous owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Pending-session rendering and image custody keeps the original intent (5dd456a: Render retained chat panes in Solid while preserving plain-TypeScript session and lifecycle authority.)
  • Microphone activity rendering keeps the original intent (a423f19: Port attachment and media rendering to Solid while preserving host tags, actions, and existing domain owners.)
  • Companion rail configuration and native detail-panel refresh keeps the original intent (refactor(ui): port chat rails and header views to Solid #169442: Migrate chat rendering while retaining synchronous owners, selectors, focus behavior, and lazy boundaries; subsequent simplification preserved those contracts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -2, Tests +18. Total +16 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 61 63 -2
Tests 1 18 0 +18
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 79 63 +16

Review metrics

Metric Value Why it matters
Production versus test changes Production +61/-63 lines; tests +18 lines Production shrinks slightly while the existing microphone test gains distinct replacement, identity, and disposal assertions.

Labels

Label changes:

  • add P3: Focused rendering maintenance with no intended user-visible behavior change or demonstrated urgent defect.
  • 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: Focused rendering maintenance with no intended user-visible behavior change or demonstrated urgent defect.
  • 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, 9:54 PM ET / October 17, 2026, 01:54 UTC.

@steipete
steipete disabled auto-merge October 17, 2026 01:55
@steipete
steipete merged commit 7807f20 into main Oct 17, 2026
105 of 110 checks passed
@steipete
steipete deleted the solid2/w-idiom5-subs-chat branch October 17, 2026 02:16
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

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. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant