refactor(desktop): own Conversation publication and observation #5869
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5869"
general
weight: 0.35
hqhq1025
Summary
Refs #4582 — R2 M2 / C, based on
d6876d708fdb8dc0bf35fd8e194ada4d69c92599after #5850 and #5851.AppShell currently owns transcript publication, observation resources and the messages threaded into its children. This moves those responsibilities into a persistent
ConversationProviderandConversationLifecycle. Actual transcript, pending-message, usage and approval readers subscribe below that owner. An ordinary durable-message update with unchanged chrome/pending/usage projections no longer renders Shell or Composer in the production-component harness.Catalog readers filter rail-only bookkeeping while still observing status/profile changes. Reading-position failures retain their original localized action-failed copy and
desktopdiagnostic scope. Transcript read/refresh copy has one production source and direct tests; consumer Session refs are readonly, and unused bootstrap/ShellRun forwarding modules are removed.No intended product, visual, shortcut, IPC or storage change. The render evidence establishes notification isolation for the tested path, not elapsed-time or full-app performance gains.
Verification
Local checks passed with Node 24.19.0 / npm 11.19.0:
upstream/mainand AppShell hook gate passed.7fb2baaa3a236626451fc84772ae82dd36206916, after rebuilding: all 34 Electron tests passed (20 files, 3.7 minutes, one worker, no retries). This includes streaming/remount recovery, local-message persistence across renderer/application restart, unavailable live endpoint with cached history, history paging, references, draft focus,/compact, Workbar/Terminal/Side Chat lifetimes and WorkHub native window reconstruction.git diff --checkpassed.New tests mount the production owner/readers and exercise notification isolation, persistent Composer and observer lifetimes, A→B→C handoff, stale results, seed-before-transcript ordering, retry and cleanup. The fake transcript rejects snapshots before its first batch, matching the Desktop adapter.
Windows native interaction and real-account acceptance were not run locally.
Integration and review focus
The current assumptions remain Catalog-owned selection, the existing Main/preload Host observer, distinct requested/published/owner identities, and one Conversation workspace per renderer. See the feature README for public capabilities, retained transitional consumers and redesign triggers. Shared observation across surfaces or a relocated Host observer requires revisiting this lifecycle seam.
Review gates
7fb2baaa3a236626451fc84772ae82dd36206916. The previous implementation run passed on7524313ab; it does not validate this follow-up commit.AI use
Tool(s) and scope: OpenAI Codex implemented the refactor, tests and documentation and ran the local verification. The commit includes
Generated-by: OpenAI Codex; retain it in the final squash commit. Final review and merge remain human decisions.Checklist
Does this PR entail a change in behavior?