Skip to content

feat(composer): add an opt-in subagent presence bar - #2550

Merged
Tioit-Wang merged 4 commits into
mainfrom
feat/2549-subagent-presence
Nov 24, 2026
Merged

Tioit-Wang merged 4 commits into
mainfrom
feat/2549-subagent-presence

Conversation

@Tioit-Wang

@Tioit-Wang Tioit-Wang commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary / 概要

「设置 → 对话 → 子代理样式」提供两种互斥的展示方式,切换即时生效,不改变对话历史。

样式 输入框 对话里的 Task
对话内(默认) 没有贴靠条 原有子代理拓扑卡
输入框贴靠条 有活动子代理时显示,全部结束后消失 普通可展开的工具调用行:保留调用详情,不再显示拓扑卡或嵌套的子代理过程;结束后仍是普通行
  • 贴靠条最多容纳六个头像,更多代理收进 +N 名单。头像详情支持查看 WorkPanel 记录和停止操作,可用键盘聚焦、Esc 关闭,并遵循减少动画偏好。
  • 旧设置及未知值回退到「对话内」。Host 确认写入后通知 renderer,不改变设置 RPC 契约。生命周期工具行、WorkPanel 和持久化历史不受样式切换影响。
  • node scripts/reuse-worktree-deps.mjs [source-checkout] 校验锁文件,复用第三方依赖,让仓内包指向当前 worktree,并隔离可写的 .bin。运行 pnpm 前设置 pnpm_config_verify_deps_before_run=false 可避免自动安装。

实际截图

同一生产构建、同一本地模型会话,切换设置前后对比:

对话内:拓扑卡,无贴靠条 贴靠条:普通工具行,TaskDock 已折叠
默认对话内样式 浅色输入框贴靠条

暗色详情卡:键盘焦点和减少动画

验证

  • Windows,基线 8e258d0bf,候选 056a1037a。生产构建、Desktop 类型检查、样式令牌和 git diff --check 通过。

  • node scripts/e2e-subagent-stop.mjs:在隔离环境中启动真实 Electron、Host 和回环流式模型。从默认样式切换到贴靠条后,同一批 Task 消息变为普通工具行,可展开且不重复显示子代理记录。切回即恢复卡片。覆盖跨会话、停止、全部结束和重启后的行为。

  • 41 项对话与贴靠条回归测试、21 项本地化测试和 5 项版本说明测试通过。

  • 设置 RPC 契约用例本地复现并修复;该测试文件 14 项通过,最终候选的真实 Electron E2E 已复验。

Requirement link / 需求关联

Refs #2549 · 原始需求原型。最终设计采用互斥样式,而非原型中两处同时展示的方案。

Keep transcript-only behavior by default while making active delegates
easy to inspect and stop from the composer. Reuse compatible worktree
dependencies without resolving workspace packages from another branch.

The production build, desktop typecheck, focused interaction tests and
host restart persistence check passed. The full stop E2E exposed a
missing settings broadcast; the fix is built but its full E2E rerun,
Windows fixture isolation and before/after captures remain pending.

Refs #2549
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Deploying pi-desktop with  Cloudflare Pages  Cloudflare Pages

Latest commit: cc79ff1
Status: ✅  Deploy successful!
Preview URL: https://5d94e75b.pi-desktop.pages.dev
Branch Preview URL: https://feat-2549-subagent-presence.pi-desktop.pages.dev

View logs

Use the validated style after the host acknowledges persistence, so the
composer updates without a restart. Exercise the real Electron flow and
record the opt-in behavior in both themes.

Keep pnpm shims private to each worktree so local validation can reuse
dependencies without rewriting the primary installation.
@Tioit-Wang
Tioit-Wang marked this pull request as ready for review November 24, 2026 13:32
When the composer bar is selected, keep each Task as an expandable tool
record instead of repeating its topology or worker transcript. Switching
back restores the existing cards without changing the underlying history.

Verify the transition on real running delegates, including after they
settle, and record both presentations in the localized copy and captures.
The host acknowledges a settings write rather than returning settings.
Keep the partial-write guard scoped to the settings handler and its
validated payload so a reply type annotation cannot break the check.
@Tioit-Wang
Tioit-Wang merged commit 3c3835e into main Nov 24, 2026
6 checks passed
someone97421 pushed a commit to someone97421/CK-PI-Desktop that referenced this pull request Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant