Repository navigation
feat(host): expose linked child session lifecycle - #1400
Conversation
|
I found two Desktop projection issues that should be addressed before merging. The event fan-out and CLI behavior look good overall. [P1] Apply navigation filtering to child sessions too
Since child rows expose the normal archive/flag actions, the tree projection needs to be filter-aware—for example, retain the necessary ancestor path for a matching descendant or promote the matching child—and pass a correspondingly filtered child map. Please add coverage for independently archived/flagged parents and children. Relevant code: [P2] Preserve linked children across revision collapseCollapsing revisions before building the linked-session tree detaches children from non-selected physical revisions. For example, if Please aggregate children across the revision family or remap their parent to the selected representative, and add an edit-and-resend regression test. |
Summary
This is PR 4, the final slice of #1366.
--continuefrom silently promoting the latest child session, while preserving explicit--resume <child-session-id>.Design boundary
This does not add a second agent runtime or a subagent-specific protocol. A child remains a normal Session with durable parent metadata; the host only projects the relation and routes the already-existing Session event stream.
Forked parent context is intentionally not included here. That changes creation semantics and data-copy policy, so it should remain a separate follow-up rather than expanding this lifecycle/observation PR.
Validation
npm run buildnpm run typechecknpm run lintnpm run format:checknpm run test:fastreaches two unrelated macOS sandbox failures (/usr/localexecutable-root ordering and Homebrewrg/PCRE2 dylib access); both reproduce unchanged onorigin/mainCloses #1366
中文
概要
这是 #1366 的 PR 4,也是最后一个实现切片。
--continue不再无意中把最近的 child session 当成主会话,但显式--resume <child-session-id>仍然支持。设计边界
这个 PR 不增加第二套 agent runtime,也不引入 subagent 专用协议。child 仍然是带有持久化父关系元数据的普通 Session;host 只负责关系投影和复用既有 Session event stream 的路由。
父会话上下文 fork 有不同的创建语义和数据复制策略,因此有意留作独立后续,不扩张这个 lifecycle/observation PR。
验证
npm run buildnpm run typechecknpm run lintnpm run format:checknpm run test:fast仅剩两个与本 PR 无关的 macOS sandbox 失败(/usr/localexecutable-root 顺序,以及 Homebrewrg/PCRE2 dylib 访问);两项都能在未改动的origin/main上复现