Repository navigation
refactor(ui): use optimistic actions for read-aloud playback - #180433
Conversation
…hat-d-read-aloud-replacement-v2
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR replaces manually synchronized read-aloud presentation with a Solid optimistic action while preserving the existing audio playback owner. Example: Read aloud for “Local voice is working.”
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it is an owner-directed, focused refactor with no actionable correctness or security findings. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe chat message action passes text to GatewaySpeechPlayback, which requests Gateway synthesis and plays returned audio; Solid owns the button presentation. flowchart LR
A[Chat message] --> B[Read aloud control]
B --> C[Speech playback owner]
C --> D[Gateway synthesis]
D --> E[Browser audio]
C --> F[Optimistic presentation]
F --> B
Technical reviewBest possible solution: Retain the existing speech owner and use the focused optimistic action solely for playback presentation. Do we have a high-confidence way to reproduce the issue? This is primarily a behavior-preserving refactor; source inspection establishes the affected path, and no target code was executed during this read-only review. Is this the best way to solve the issue? The implementation follows the existing Solid action recipe, preserves synchronous gesture-time audio preparation, and keeps cancellation and stale-response disposal in their established owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d08aeb1d984a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +18, Tests +28. Total +46 across 3 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 22, 2026, 4:22 AM ET / 08:22 UTC. |
|
Merged via squash.
|
Whole-scope CHAT-D census,
fc43063b639f→fbce70775a7c. Raw cleanup/owner APIs include named exceptions; unlanded families remain counted.Total files: 281; production LOC: 57725 → 57743.
I1–I10: 0, 10, 7, 5 → 4, 1, 6, 0, 0, 0, 3.
What Problem This Solves
The read-aloud button manually synchronized playback progress on start, stop, completion, and failure. A Solid action now owns the optimistic playback presentation while the existing speech-playback owner retains audio admission, cancellation, and stale synthesis disposal.
Audio preparation still starts synchronously inside the native click before any await, preserving Safari user activation. A plain synchronous admission flag handles immediate start/stop clicks before presentation settles. Playback completion automatically retires the optimistic state, and synthesis errors remain visible and retryable.
This replaces #179854 with the same focused three-file change integrated with current main. The old PR's ambiguous managed-checkout metadata is preserved; the replacement uses a fresh native workflow destination.
Evidence
Production LOC: 125 → 143 (+18). Direct test LOC: 350 → 378 (+28). The additional lines preserve synchronous audio admission while an explicit action presents progress. No new owner, dependency, tag, class, route, or lazy import boundary.
Touched-file checklist I1–I10: 0→0, 0→0, 0→0, 1→0, 0→0, 0→0, 0→0, 0→0, 0→0, 0→0. Retained generation and admission fields are cancellation identity and synchronous operation admission, not parallel rendered progress.
Paired build measurements
Base
fc43063b639f99fffa03ab9585446b551bd31a75and headfbce70775a7c815274e3c17f99d6e4447e1dfe13use fixed metadata and disabled compile/build caches. Every lazy boundary is retained.The attached ready and pending images each represent their byte-identical before/after pair. Captures use only synthetic data and an isolated Chromium instance.
Inherited local Knip findings
Exact base and head both report these same 13 unused files:
src/auto-reply/heartbeat-reply-payload.ts;src/infra/heartbeat-active-hours.ts,heartbeat-delivery-normalization.ts,heartbeat-dispatch.ts,heartbeat-runner-config.ts,heartbeat-runner-execution.ts,heartbeat-runner-prompt.ts,heartbeat-runner-run.ts,heartbeat-runner-scheduler.ts,heartbeat-runner-session.ts,heartbeat-runner.ts,heartbeat-session-publication.ts, andheartbeat-wake-policy.ts. This records the local static-analysis result; it is not a waiver for any new CI failure.Before / after
The independently captured pairs are byte-identical, so each row reuses its uploaded image.