Repository navigation
Desktop: complete Runtime Host message queue parity #2262
Description
English
Context
#2222 adds mid-turn steering for the embedded Desktop runtime. It solves the current-turn path, including same-turn continuation and live transcript presentation.
The work only partially overlaps with the remaining Desktop queue slice. In particular, #2222 does not connect Host-backed Desktop sessions to the Runtime Host message authority, and it intentionally removed its earlier component-local queue UI.
Remaining gap
Host-backed Desktop needs to use the Runtime Host as the single authority for message admission and queue state:
- submit ordinary text through
turn.message.submitso the Host atomically decides between current-turn steering and starting a successor turn; - expose an explicit next-turn queue while a response is active;
- mirror authoritative
queue_updatestate per Session, including reconnect hydration; - allow queued text to be retracted back into the composer;
- restore retractable queued text when Stop interrupts a turn;
- preserve equivalent automatic follow-up behavior for the embedded runtime;
- keep behavior correct when multiple clients observe or submit to the same Session.
This is complementary to #2222: the current-turn embedded behavior should land there, while this slice supplies the shared Desktop controls and Runtime Host integration.
Implementation status
A validated implementation is available on feat/desktop-message-queue.
The branch currently includes #2222 as its implementation base. After #2222 merges, it should be rebased onto main and published as an independent PR rather than as a cross-fork stack.
Acceptance criteria
- Embedded and Host-backed Desktop expose the same current-turn and next-turn message behavior.
- Host-backed sends do not race a client-side active-turn snapshot.
- Queue state remains authoritative across multiple connected clients.
- Retract and Stop do not silently discard queued text.
- Normal SessionEvent ordering is unchanged when no between-turn queue mutation occurred.
- Runtime, Desktop, and UI regression suites pass.
中文
背景
#2222 为 embedded Desktop runtime 增加了运行中 steering,解决了当前轮路径,包括同轮继续执行和实时对话记录展示。
这项工作与剩余的 Desktop 消息队列 slice 只有部分重叠。具体而言,#2222 没有把 Host-backed Desktop 会话接入 Runtime Host 的消息权威,也按评审意见移除了此前位于组件内部的本地队列 UI。
尚存缺口
Host-backed Desktop 需要以 Runtime Host 作为消息准入和队列状态的唯一权威:
- 普通文本通过
turn.message.submit提交,由 Host 原子决定注入当前轮还是启动后继轮; - 回答进行期间提供明确的下一轮消息队列;
- 按 Session 镜像权威
queue_update状态,并支持重连后的状态恢复; - 允许把排队文本撤回输入框;
- Stop 中断当前轮时,将仍可撤回的排队文本恢复到输入框;
- 为 embedded runtime 保留等价的自动 follow-up 行为;
- 多个客户端观察或向同一 Session 提交消息时仍保持正确行为。
本项工作是 #2222 的补充:当前轮 embedded 行为应由 #2222 合入,本 slice 则补齐共享 Desktop 控件和 Runtime Host 集成。
实现状态
已验证的实现位于 feat/desktop-message-queue 分支。
该分支目前以 #2222 的实现为基础。#2222 合并后,应将该分支 rebase 到 main,再作为独立 PR 发布,而不是创建 cross-fork stack。
验收标准
- Embedded 与 Host-backed Desktop 提供一致的当前轮和下一轮消息行为。
- Host-backed 发送不会与客户端侧的活动轮快照发生竞态。
- 多客户端连接时,队列状态仍由权威来源统一维护。
- Retract 和 Stop 不会静默丢弃排队文本。
- 没有跨轮队列变化时,正常 SessionEvent 顺序保持不变。
- Runtime、Desktop 和 UI 回归测试全部通过。
Activity
Astro-Han commentedon Aug 23, 2026
Closing as completed. The Runtime Host is now the sole message and queue authority: ordinary submissions use
turn.message.submit, authoritativequeue_updatestate drives Desktop, busy-send races are handled at the Host boundary, and #3513/#3544 added the user-facing queue plus per-entry promote, retract, restore-to-draft, and reorder operations.The original embedded-runtime parity clause predates the Runtime Host production cutover and no longer represents a separate supported execution authority.
Triage and wording were prepared with OpenAI Codex and reviewed by the maintainer.
fix(ui): render queued steering in the transcript and fold follow-ups…