Repository navigation
refactor(ui): project realtime call and camera state - #175476
Conversation
Publish realtime voice and camera state through its synchronous owner and Solid projection. Preserve disconnected-start error publication and capture projected transcript changes during render preparation. Keep microphone level updates independent of pane rendering.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c0363abb6
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| > { | ||
| return { | ||
| /** Synchronous call/device authority; projections observe complete state transitions. */ | ||
| class ChatRealtimeOwner { |
There was a problem hiding this comment.
Reduce the refactor's production footprint
This commit adds 262 and removes 178 lines across the touched production files, for a net increase of 84 lines, even though the Solid refactor checklist mandated by ui/AGENTS.md requires refactors to reduce net production LOC. Consolidate the repeated snapshot plumbing or split/rework the owner cutover so the refactor meets the repository's maintainability gate.
AGENTS.md reference: ui/AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
|
Merged via squash auto-merge.
|
Publish realtime voice and camera state through its synchronous owner and Solid projection. Preserve disconnected-start error publication and capture projected transcript changes during render preparation. Keep microphone level updates independent of pane rendering.
What Problem This Solves
Realtime voice and camera updates still depended on the retired Lit redraw callback instead of publishing their owning state to Solid.
User Impact
No intended visual or interaction change. Voice handoffs, microphone recovery, camera controls, transcript reconciliation, and route cleanup keep their synchronous ownership checks.
Why This Change Was Made
Move the existing call/device fields into one plain TypeScript realtime owner. Actions publish state patches; the retained pane reads that owner through
projectOwner, including when its page-state owner changes. The independent microphone-level source still avoids pane redraws. Realtime call and device transitions no longer userequestUpdate. The existing disconnected-start error callback remains until shared page errors are projected; the page host also retains its other migration callbacks.This preserves media-stream, session, and conversation-entry identities. Render preparation now captures transcript changes from owner projections before committing scroll work. There are no new effects, writable signal copies, dependencies, startup imports, or lazy-boundary changes. The additional production lines make the synchronous snapshot and explicit mutation boundary visible.
Evidence
pnpm tsgo:uipassed@modelcontextprotocol/client; no new unused files or dependenciesThis is a state-publication refactor with unchanged markup and styles, so no visual screenshots or local E2E runs were added. Local UI builds were omitted under the migration's lighter-proof policy because boot/startup code is unchanged.
Touched production: 2,727 → 2,811 LOC (+84); tests: 7,966 → 8,063 LOC (+97). Production
requestUpdatereferences: 36 → 13;.subscribe(: 2 → 2;createEffect(: 2 → 2;untrack(: 1 → 1;createSignal(: 2 → 2. The remaining redraw references in these shared files belong to other migration slices.