Skip to content

feat(workbench): reach a Bot's workers from its Chat - #6637

Merged
M4n5ter merged 8 commits into
rust-previewfrom
feat/bot-worker-panel
Nov 5, 2026
Merged

M4n5ter merged 8 commits into
rust-previewfrom
feat/bot-worker-panel

Conversation

@liugddx

@liugddx liugddx commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Refs #6504. The Bot's Chat shows only what it sent with SendUser, so a worker it started was invisible while it ran, and its report arrived as one block. This lets the user reach a worker from the Bot's Chat, with no new stored data. It follows the interaction discussed in #6504: keep the conversation as the entry point and open the execution record beside it, using the side panes the app already has ("Open to the side").

  • A reply links to the run it reports. When the Bot is woken because a worker finished, the opening message of that Turn already carries the worker as its origin (bot_worker). A Bot reply to such a Turn shows "View the record of " under it, which opens that conversation beside the Bot's. Replies to the user's own messages show no link.
  • Running and waiting workers show in the Chat. The Chat ends with one line for each conversation the Bot created that is working ("<title> is working. See its progress.") or waiting for the user ("<title> is waiting for your reply. Open it."), waiting first. A worker waiting for an approval never ends its run, so the Bot is not told and says nothing; without this line the request was visible only as a count in the sidebar and the Bot looked stalled.
  • The Bot's conversations come from the Host's catalog stream. agent.catalog with scope: children for the Bot, so a worker starting, waiting, finishing, being renamed or archived reaches the Chat as it happens and nothing is polled. Each window is read through its continuation cursor before the activity filter is applied, so a running or waiting worker behind a full page of idle ones is still listed; a window that changes revision mid-read is discarded for the next pushed one. The sidebar list only holds top-level conversations, so it never contains a worker. The stream is not opened for a replaced Bot.
  • Titles and existence of older workers come from the message-sender lookup the history window already runs (archived included), so archived and older workers keep their title and a deleted one shows no link; a wake message also shows the sender badge in the trajectory.
  • Where no side pane fits (narrow window, files panel open, terminal) a worker opens in the current pane instead of a disabled button.

Not in this PR: nested quotations and attachments from the prototype in #6504.

Verification

  • reportedWorker and activeWorkers are pure functions with tests: a worker-triggered Turn reports its worker and others report none; only the Bot's own, live, running or waiting conversations are listed, waiting first, and archived, someone else's and ordinary conversations are not. The transcript tests (14) pass; biome and the ui_types typecheck are clean.
  • Checked in the desktop app (macOS build, real model) by a person looking at the window: after a worker-triggered reply the link appears with the worker's title and opens the worker beside the Bot; a running worker and a worker waiting for a network approval each show their line; replies to the user's own messages show no link. I could not take screenshots myself.
  • Paging: assembleChildren is a pure function with tests: a waiting worker behind two full pages of idle ones is found by following the cursor (the test fails without it), a catalog that changes revision mid-read is refused, and a cursor that does not advance ends the read.
  • Not checked: the Chat while many workers are active; the narrow-window fallback and the catalog stream were not run in the desktop app after the review changes.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code (Claude Opus 5.5) wrote the code, the tests and this description; the changes were run and checked in the app by the contributor. The commits carry Generated-by: Claude Code.

Checklist

  • Tests cover the change and fail without it
  • Format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

liugddx and others added 5 commits November 4, 2026 19:12
A Turn the Bot starts because a worker finished carries that worker as the origin
of its opening message. When the Bot replies to such a Turn, Chat now shows a
link under the reply that opens the worker's conversation beside the Bot's, using
the side-pane support the app already has. Replies to the user's own messages
show no link.

Generated-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… waits for the user

A conversation the Bot created can stop to ask for an approval or an answer. It then
has not ended its run, so the Bot is not woken and says nothing, and the request
shows only as a count in the sidebar. The Bot's Chat now ends with a line for each
such live conversation, "<title> is waiting for your reply. Open it.", which opens
that conversation beside the Bot's.

Generated-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the worker in the link

- The Bot's Chat now ends with a line for each conversation it created that is
  running or waiting for the user, which opens it beside the Bot's. While a worker
  runs the Bot says nothing, so this is where its progress can be reached.
- The Bot's own conversations are read from the Host and refreshed every few
  seconds while it is visible. The sidebar list only holds top-level conversations,
  so the earlier attempt to read them from there never saw a worker, and the worker
  link fell back to a generic title.

Generated-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep both sides where the Bot restart change (#6569) and the worker link and
active-worker lines touch the same places: the Bot imports, the Bot view helpers,
and the Bot transcript tests.

Generated-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@liugddx
liugddx requested a review from sunrioa November 5, 2026 02:30

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.

I reviewed all six changed files at 5ea10f369da758bbc551f8ca9bc538a5b584b3f7: worker-origin reply links, child-session polling, activity filtering/order, side-pane actions, translations and transcript tests.

P2: active workers beyond the first catalog page never appear. The new poll always requests position: start, replaces its state with page.sessions, and ignores page.after. The Host returns at most 32 sessions, ordered by pinning and recency rather than activity. With 32 earlier idle children and an older child still waiting for approval or running, every poll returns the same idle page; the active child has no progress/approval link in the Bot Chat. Follow the catalog cursor before filtering for activity, with appropriate revision/retry handling.

Validation: all 16 existing transcript tests passed locally with Node 24.18.1. A controlled check executing the actual refreshBotChildren function omitted a waiting child and a running child on three consecutive polls each; a cursor-following control against the same adapter found both. I checked the production 32-session limit, catalog ordering and pagination contract. This adapter check did not run a real Host or render the native UI.

Actual merge into ed79386f826ab0c2d4267dafa361240487d2f30e succeeded. CI 41955407473 failed an external-agent consent timeout and a keyboard UI wait; I have not established that this PR caused those failures. No schema or protocol change is introduced here. I did not independently repeat the contributor's macOS visual check or test a slow remote Host.


Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

scope: { kind: 'children', sessionId },
position: { kind: 'start' },
});
if (alive) botChildren.set(page.sessions);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Follow the child catalog past its first page

agent.list is paginated (SessionPage.after, at most 32 sessions). This assignment discards the continuation cursor, and each subsequent poll starts over. For example, 32 newer idle children can fill the first page while an older child is still waiting for approval or running. activeWorkers then sees no active child, so the new Chat entry never appears, however long the user waits. Read the remaining pages before applying the activity filter, accounting for catalog revision changes. The actual refresh function reproduced this for both activities with a controlled paginated Host adapter; a cursor-following control found the missing child.

@github-actions github-actions Bot added the effort/M Under 500 readable lines label Nov 5, 2026
@sunrioa

sunrioa commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

I tested 5ea10f3 on macOS. Opening workers beside the Bot conversation and inspecting their progress worked in the scenarios tested.

I also reproduced the pagination issue already reported here. Two additional UI observations:

  • P3 — Worker titles remain stale after renaming. In Conversation.tsx:3153, workers={() => initial.workers} retains the initial snapshot. When only a title changes, the outer key stays unchanged and the displayed title does not update. A native NSH component check reproduced this; reading the current entry instead updated the title correctly.
  • P3 — Worker buttons have indistinguishable accessible names. In BotReply.tsx:87, every worker button uses the same accessibility label. The native accessibility tree confirmed identical names for two different workers. Including the worker title would make the targets distinguishable.

Separately, I observed a mismatch between the model displayed in worker panes and the model used for Bot-dispatched runs. The Bot and global default were DeepSeek, but two created workers retained GPT-6.1 Sol and GLM-5.3 as their saved backend preferences. Their Bot-dispatched requests actually used DeepSeek. Sending “continue” directly in the GPT-labelled worker then issued a GPT request and failed with HTTP 403 / MODEL_NOT_IN_PLAN.

How direct input from the side pane should interact with Bot-created workers, including which model should apply, seems worth discussing separately. The immediate UI concern is that the displayed model does not clearly represent the model used for the Bot-dispatched run, leaving the distinction unclear to the user.

This model-state behavior also exists in the base branch and can be tracked separately from this PR.

Local validation completed:

  • Workbench tests: 90 passed.
  • Host catalog tests: 6 passed.
  • Generated native UI typecheck, Biome checks for all six changed files, and desktop build passed.
  • Pagination was checked with a controlled Host adapter; title updates and accessible names were checked through native NSH component rendering.

No additional issues were found in the desktop scenarios tested so far.

Code inspection, automated checks, and drafting were assisted by Codex. The desktop usage scenarios were tested manually.

简体中文

我在 macOS 上测试了 5ea10f3。在本轮测试的场景中,从 Bot 对话旁边打开工作会话并查看进度,可以正常使用。

我也复现了这里已经报告的分页问题。另外还有两个 UI 问题:

  • P3 — 工作会话重命名后,列表标题没有更新。 Conversation.tsx:3153 中的 workers={() => initial.workers} 保留了初始快照。仅标题变化时,外层 key 不变,显示的标题也不会更新。原生 NSH 组件检查复现了该问题;改为读取当前 entry 后,标题能够正确更新。
  • P3 — 工作会话按钮的无障碍名称无法区分。 BotReply.tsx:87 为所有工作会话按钮使用同一个无障碍标签。原生无障碍树确认,两个不同工作会话的按钮名称完全相同。名称中包含工作会话标题,会更方便辨认目标。

此外,我观察到了工作会话面板显示的模型与 Bot 派发时实际使用的模型不一致。Bot 和全局默认模型都是 DeepSeek,但创建的两个工作会话分别保存了 GPT-6.1 Sol 和 GLM-5.3 作为模型偏好。由 Bot 派发时,它们实际请求的仍然是 DeepSeek;直接在显示 GPT 的工作会话里发送“继续”后,则实际请求了 GPT,并返回 HTTP 403 / MODEL_NOT_IN_PLAN。

至于从侧栏直接输入应如何影响 Bot 创建的工作会话,包括此时应该使用哪个模型,我认为可以单独讨论。目前首先想反馈的是:界面显示的模型没有清楚反映 Bot 派发时实际使用的模型,用户难以理解两者的区别。

这个模型状态问题在基线中也已经存在,可以与本 PR 分开跟踪。

本地验证结果:

  • Workbench 测试:90 项通过。
  • Host 会话目录测试:6 项通过。
  • 基于原生声明生成的 UI 类型检查、全部六个改动文件的 Biome 检查,以及桌面构建均通过。
  • 分页问题通过受控 Host 适配器验证;标题更新和无障碍名称通过原生 NSH 组件渲染验证。

目前测试过的桌面使用场景中,暂未发现其他问题。

代码检查、自动测试和评论起草使用了 Codex 协助;桌面使用场景由本人手工测试。

@M4n5ter M4n5ter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English

Reviewed 5ea10f369. Linking Bot replies and active workers directly from MessageOrigin::BotWorker and the child catalog without adding stored state is clean, and the two cli slice failures on CI run 41955407473 are unrelated rust-preview flakes.

Three everyday-path issues worth addressing:

  1. Replace the 3-second setTimeout poll with an agent.catalog subscription (plugins/agent/conversations/ui/Conversation.tsx:451-478)

    • refreshBotChildren queries agent.list every 3 seconds whenever the Bot conversation is visible. That repeatedly scans partition SQLite databases while completely idle and adds up to 3 seconds of stale UI lag on transitions—for example, wake.rs wakes the Bot ~250ms after a worker finishes, so the Bot can already be streaming or posting its reply while the bottom of Chat still shows <worker> is working.
    • Host agent.catalog (scope: { kind: 'children', sessionId }, includeArchived: false) already pushes immediately when child sessions are created, start/end a turn, enter/leave waiting approval state, rename, or archive (the same stream products/maka/workbench/app/browsing.ts:160-243 uses). Subscribing there—and skipping it when formerBot() is true—eliminates both idle polling and state lag.
  2. Resolve historical BotReply worker titles and existence via createMessageSenders instead of botChildren (plugins/agent/conversations/ui/Conversation.tsx:479-482, 610-628, 3162-3168, products/maka/workbench/app/messageSenders.ts:30-32)

    • workerTitle(id) only checks botChildren() (includeArchived: false, first 32 unarchived children) and props.knownSession (rootsOnly: true, which never holds child workers). Once a finished worker is archived, or the Bot accumulates more than 32 child runs over time, or the user views a replaced former Bot, historical replies degrade to the generic "View the record of the worker"; if a worker session was deleted, the button also stays clickable.
    • Conversation.tsx already mounts createMessageSenders (position: { kind: 'at', cursor: id }, includeArchived: true) for the visible history window. Extending senderSession(origin) in messageSenders.ts to cover origin?.kind === 'bot_worker' resolves real titles for archived and older workers, lets <BotReply> disable/hide the link when senders.session(id) === null (deleted), and gives the Bot's Trajectory view a SenderBadge on the wake message as well.
  3. Fall back to opening the worker in the current pane when side-by-side panes don't fit (plugins/agent/conversations/ui/SessionSurface.tsx:2138-2145, plugins/agent/conversations/ui/Conversation.tsx:3150-3168, products/maka/workbench/app/BotReply.tsx:60-100)

    • Per sidePaneRoom (products/maka/workbench/app/Workbench.tsx:39-45) and App.tsx:220-222, openBeside is undefined whenever the window is < 960px (half-screen split), < 1280px while the right Files/Terminal panel is open (common 13"/14" laptop logical widths), or in the terminal TUI.
    • Because child workers are omitted from the sidebar (rootsOnly: true), in those layouts <BotWaiting> renders active-colored text "{title} is waiting for your reply. Open it." on a disabled button that does nothing when clicked, leaving no way to reach the blocked approval; <BotReply> hides its record button altogether.
    • Falling back to shell()?.openSession(sessionId) when openBeside is unavailable keeps workers reachable in narrow/preview-open layouts and TUI (with the Bot pinned at the top of the sidebar to switch right back). While updating BotReply.tsx, please also add maxWidth: '100%' on the row <Button> and flexShrink: 1 (with textOverflow: 'ellipsis') on <Text> so long worker titles truncate instead of overflowing a narrowed split column.
简体中文

看完了 5ea10f369。直接基于 MessageOrigin::BotWorker 和子会话目录打通汇报消息与活跃工作会话、不引入额外持久化状态的做法很干净;本次 CI(41955407473)挂掉的两个 cli 分片属于 rust-preview 基线已有的偶发抖动,与本 PR 无关。

有 3 个常规使用路径就会触发的问题建议一并处理:

  1. 用 agent.catalog 订阅替代 3 秒 setTimeout 轮询(plugins/agent/conversations/ui/Conversation.tsx:451-478)

    • 当前只要 Bot 会话可见,refreshBotChildren 就会每 3 秒调一次 agent.list。这既会在界面完全空闲时反复扫描分区 SQLite,又会带来最高 3 秒的状态滞后——例如 wake.rs 在工作会话结束后约 250ms 就会唤醒 Bot,经常会出现 Bot 已经在流式生成或发出汇报消息了,Chat 底部仍挂着 <worker> 正在处理。
    • Host 的 agent.catalog(scope: { kind: 'children', sessionId }, includeArchived: false)在子会话创建、回合开始/结束、进入/退出等待审批(waiting)、改名与归档时都会立即推送(侧栏 products/maka/workbench/app/browsing.ts:160-243 正是用它实时更新)。改为订阅该流(并在 formerBot() 为真时跳过订阅)即可同时消除空闲轮询与状态滞后。
  2. 历史汇报的 worker 标题与存在性应复用已挂载的 createMessageSenders,而非依赖 botChildren(plugins/agent/conversations/ui/Conversation.tsx:479-482, 610-628, 3162-3168、products/maka/workbench/app/messageSenders.ts:30-32)

    • workerTitle(id) 只查 botChildren()(includeArchived: false,仅前 32 条未归档子会话)和 props.knownSession(rootsOnly: true,不含子会话)。一旦已完成的工作会话被归档、Bot 长期累计运行超过 32 个子会话,或用户在查看被替换的归档旧 Bot,历史回复下方的按钮就会全部退化为无区分度的「查看『工作会话』的执行记录」;若工作会话已被删除,按钮也依然保持可点击。
    • Conversation.tsx 原本就已经按当前可见历史窗口挂载了 createMessageSenders(position: { kind: 'at', cursor: id }, includeArchived: true)。直接让 messageSenders.ts 的 senderSession(origin) 同时覆盖 origin?.kind === 'bot_worker',就能自动拿到已归档和更早工作会话的真实标题,在会话已删除(senders.session(id) === null)时禁用/隐藏入口,并顺带让 Bot 的 Trajectory 视图也在唤醒消息上展示对应的 SenderBadge。
  3. 分栏空间不足或终端模式下回退为在当前面板打开工作会话(plugins/agent/conversations/ui/SessionSurface.tsx:2138-2145、plugins/agent/conversations/ui/Conversation.tsx:3150-3168、products/maka/workbench/app/BotReply.tsx:60-100)

    • 按 sidePaneRoom(products/maka/workbench/app/Workbench.tsx:39-45)和 App.tsx:220-222 计算,窗口 < 960px(常见左右半屏)、打开右侧文件/终端面板时 < 1280px(常见 13/14 寸笔记本逻辑宽度),以及终端 TUI 下,openBeside 均为 undefined。
    • 由于侧栏默认列表不含子会话(rootsOnly: true),在这些布局下 <BotWaiting> 会用正常字色显示「{title} 在等你的回复,点这里处理。」,但按钮处于 disabled 状态点击无反应,用户无法进入工作会话处理审批;<BotReply> 的执行记录按钮则会直接消失。
    • 建议在 openBeside 不可用时回退到 shell()?.openSession(sessionId) 在当前面板打开(侧栏顶部常驻 Bot 入口,处理完可一键切回)。顺带给 BotReply.tsx 的行级 <Button> 加上 maxWidth: '100%'、内部 <Text> 加上 flexShrink: 1(及 textOverflow: 'ellipsis'),避免打开右侧分栏后超长标题横向撑出阅读列。

Automated review generated by Antigravity.

liugddx and others added 2 commits November 5, 2026 15:47
…er titles from history, open workers in the pane when none fits

Review of #6637.

- The Bot's workers come from the Host's `agent.catalog` stream (scope: children)
  instead of a 3-second poll, so the Chat follows a worker starting, waiting or
  finishing without lag, and nothing is read while idle. The stream is not opened
  for a replaced Bot.
- Each catalog window is read through its continuation cursor before the activity
  filter is applied, so a running or waiting worker behind a full page of idle ones
  is still listed. A window that changes revision while its pages are read is
  discarded and the next pushed one is used.
- A reply's worker title and existence come from the message-sender lookup that the
  history window already runs (archived included), so older and archived workers
  keep their title and a deleted one shows no link. A wake message also shows the
  sender badge in the trajectory.
- When no side pane fits (narrow window, files panel open, terminal), a worker opens
  in the current pane instead of leaving a disabled button. The rows truncate long
  titles.

Generated-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.

I reviewed all nine changed files at 230287562f8e4a03661458fa9b5a63c656f7cc1e, separating the worker-panel changes from the incoming Rust branch updates. The implementation now subscribes to the Bot's child catalog, follows continuation pages, resolves historical worker titles through sender metadata, and provides a current-pane fallback.

The previous first-page-only counterexample is fixed: both waiting and running workers behind 32 or 64 idle children are found. Two P2 issues remain, detailed inline:

  • Silent truncation after 16 pages. assembleChildren returns a successful partial list with a continuation cursor still present. With 512 newer idle children, an older running or waiting worker is omitted on every catalog refresh. The new limit moves the original visibility failure rather than fully resolving it.
  • A cancelled or ended catalog subscription never reconnects. createBotWorkers retains its last list and exits. With the same visible Bot still selected, nothing retriggers that effect: a worker can remain displayed as working after it needs approval, or disappear from this entry point entirely after an initial subscription failure. The native subscription wrapper propagates pull cancellation/end; its retry on initial subscription admission does not reopen an already-ended stream.

Validation: all 19 transcript tests passed locally with Node 24.18.1. Controlled checks executed the actual assembleChildren/activeWorkers functions at the 32, 64, 511 and 512 idle-child boundaries. A separate check executed the actual watcher body with deterministic reactive and Host adapters: after one working page, both cancellation and clean stream end left stale state; a fresh subscription exposed the waiting worker. These checks did not run a real Host or native UI.

Actual merge into a98b7d485b2dcbd3ca0d8ffc89acc074627e8e0b succeeded. CI 41990067324 is queued at this check. No schema or protocol change is introduced here. I did not independently repeat the contributor's visual check, exercise narrow-window rendering, or compile the complete generated UI types.


Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

): Promise<S[]> {
const rows = new Map(first.sessions.map((session) => [session.id, session]));
let tail = first;
for (let pages = 1; tail.after && pages < MAX_PAGES; pages += 1) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Do not silently publish a truncated child catalog

At 16 pages this loop stops even when tail.after is still present, then returns the rows as a complete successful result. The Host pages at 32 sessions, ordered by pinning/recency before the activity filter. With 512 newer idle children and an older child waiting for approval or running, the actual function returns only the 512 idle records, so the Chat still has no link to that worker. A refresh starts from the beginning again. The 32/64/511 boundary controls find the worker; the 512 boundary omits it for both activities. Continue through valid advancing cursors, or retain an explicit incomplete result and schedule continuation rather than silently treating this prefix as the whole catalog.


Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

// its next window, and any later change pushes again.
}
}
})().catch(() => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Reopen the child catalog after its observation ends

A rejection from opened.next() reaches this empty catch; null also returns above. Neither path reconnects. The effect only depends on the Bot ID and enabled/visibility state, so subsequent worker activity cannot refresh this list while the same Bot stays visible. A controlled execution of this actual watcher accepted a working page, then received agent_observation_cancelled; it made no second subscription and kept the worker working even though a fresh catalog reported it waiting. Clean stream end behaves the same. Native ScopedSubscription.next forwards pull errors/end, and the native retry in subscribe covers initial admission only. Reconnect recoverable observations with cleanup and lifecycle guards, as the other persistent catalog consumers do.


Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

@M4n5ter M4n5ter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English

Thanks for the quick update in 952288a02! Subscribing to agent.catalog, routing historical worker titles/existence through createMessageSenders, and falling back to openSessionHere when no side pane fits all look great.

Two small follow-ups after the rust-preview merge (230287562), plus the remaining UI polish:

  1. Drop the hardcoded MAX_PAGES = 16 cap in assembleChildren (products/maka/workbench/app/botTranscriptCore.ts:251, 267):
    Tracking visited continuation cursors (seen) already guarantees loop termination on a fixed catalog revision without silently truncating long-lived Bots once unarchived child history exceeds 512 sessions.
  2. Align createBotWorkers with #6638 observation-cancellation reconnects (products/maka/workbench/app/botWorkers.ts:42-74):
    230287562 merged #6638 (ed79386f8), where persistent workbench subscriptions rebind on isObservationCancelled across UI service handoffs. Adding the same reconnect loop (and skipping continuation reads when page.revision is unchanged) keeps active workers live across reconfiguration.
  3. Reactive entry() + per-worker accessibilityLabel + Trajectory SenderBadge fallback (Conversation.tsx, BotReply.tsx):
    Reading entry() reactively with a stable 'bot/waiting' key refreshes live worker renames in place, passing the current-pane fallback to createMessageSenders keeps Trajectory wake badges clickable in narrow windows/TUI, and using the {title}-bearing visible label as accessibilityLabel makes multiple worker buttons distinguishable.

I'll push a small commit for these and merge directly.

简体中文

感谢在 952288a02 中快速跟进!改为订阅 agent.catalog、通过 createMessageSenders 解析历史工作会话标题与存在性,以及无分栏空间时回退到 openSessionHere 的处理都很干净。

合入最新 rust-preview(230287562)后顺手收尾两处细节与 UI 小问题:

  1. 移除 assembleChildren 中硬编码的 MAX_PAGES = 16 页数上限(products/maka/workbench/app/botTranscriptCore.ts:251, 267):
    记录已访问游标(seen)即可在固定 revision 快照上保证不死循环,避免长期使用的 Bot 累计超过 512 个未归档子会话后静默截断。
  2. 为 createBotWorkers 补齐 #6638 的 isObservationCancelled 自动重连(products/maka/workbench/app/botWorkers.ts:42-74):
    230287562 刚合入了 #6638(ed79386f8),工作台持久订阅在 UI 服务重绑取消观察时会自动重连;补齐同一重连循环(并在 page.revision 未变时跳过重复续页拉取)可避免配置变更后底部活跃工作会话停留在旧快照。
  3. 响应式读取 entry()、区分按钮 accessibilityLabel 及同步 Trajectory SenderBadge 回退(Conversation.tsx、BotReply.tsx):
    固定 'bot/waiting' key 并响应式读取 entry() 使重命名实时刷新,把当前面板打开回退一并传给 createMessageSenders 使窄窗口/TUI 下 Trajectory 唤醒徽章同样可点,并用含 {title} 的可见文案作为 accessibilityLabel 以区分多个工作会话按钮。

我直接补一个精简提交处理掉这些并合入。

Automated review generated by Antigravity.

…efresh worker labels

- Remove the hardcoded MAX_PAGES = 16 limit in assembleChildren and rely on visited continuation cursors so long-lived Bots do not truncate child sessions.
- Reconnect createBotWorkers on observation cancellation (#6638) and skip continuation reads when the catalog revision is unchanged.
- Read entry() reactively for BotWaiting and BotReply with a stable waiting key, pass the current-pane fallback to createMessageSenders, and use worker-specific visible copy as accessibilityLabel.

Generated-by: Antigravity

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.

Follow-up on my two findings, at final 718f6ad56aa86d69491a3eb5b4bee31e860d620e.

The concrete pagination and observation-cancellation counterexamples are fixed. I read the six-file fix increment, including cursor cycle detection, cancellation rebinding and stream cleanup, stable reactive worker rows, sender navigation fallback and accessible labels. Controlled old/new executions now find both running and waiting workers behind 512 and 640 idle children. After agent_observation_cancelled, the actual watcher closes the old stream, subscribes again and accepts the waiting worker; the old implementation remained stale. All 20 transcript tests passed locally with Node 24.18.1, using the test's reactive/Host adapters.

I also checked the production catalog producer in plugins/agent/native/src/service.rs:58–110. It loops and ends with typed errors, rather than returning clean EOF. My earlier adapter's null case alone therefore did not establish a reachable catalog failure. The consumer still returns on null; I am not treating that adapter-only observation as a remaining P2 or claiming that every terminal error recovers.

All nine final PR file blobs match current rust-preview at 06e9852cf961c6b617abcc4b8cecfdd3b2d31f4f. This is a targeted fix verification, not a repeat of the contributor's native visual checks. I did not run Rust, the full generated UI typecheck, or the real Host. Final-head CI still has queued build/product checks at this check; no schema/protocol change is introduced by this fix.


Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants