Repository navigation
fix(sessions): 激活分支后清除旧会话选择状态 - #2191
Conversation
侧边栏分支完成时同步清除旧选择,避免界面继续显示旧会话正在切换;被新导航替代的分支不清除新选择。 Refs vastsa#2086
合入已完成的 MCP 修复,保留分支激活回归及双方文档内容,避免提交落后于主线。
|
独立对照已确认问题:保留候选回归测试,仅恢复当前 main 的 session-coordination.ts,分支激活用例失败(selectingSessionId 仍为 parent),其余 4 项通过;恢复候选后 5/5 通过,包括新导航覆盖、运行中父会话和失败路径。当前仅完成生产 store 行为验证,未完成最新 main 集成及真实界面 E2E,尚未批准合入。 |
There was a problem hiding this comment.
AIUO CodePilot · Preliminary review
Diff-only 初步审查:核心修改在分支激活状态中增加 selectingSessionId: undefined,测试新增两条分支选择场景及 harness 补字段,文档配对更新。未发现可由新增行确切引用支撑的确定缺陷。因无仓库/运行权限,未核实该状态字段在其他调用路径(尤其非 fork 激活的 session 切换)中是否也被清除、文档与测试是否完整覆盖 PR 描述场景;仅限本次 diff 的静态核对。
No evidenced findings in the supplied diff.
Head: 9868c2d
Base: f692995
CI: success; mergeable: false.
Validation: code/tests NOT EXECUTED. Diff-only preliminary analysis; not approval. Human review and repository gates remain required.
Preserve both appended acceptance sections while integrating current main. No additional runtime behavior changes are introduced.
There was a problem hiding this comment.
AIUO CodePilot · Preliminary review
Diff-only preliminary review of #2191. The change adds selectingSessionId: undefined on fork activation in session-coordination.ts and extends fork tests/docs. No concrete defects evidenced from added lines; without repository or execution access I could not verify surrounding state transitions, test behavior, or CI claims.
No evidenced findings in the supplied diff.
Head: 607d2b5
Base: f23440c
CI: pending; mergeable: true.
Validation: code/tests NOT EXECUTED. Diff-only preliminary analysis; not approval. Human review and repository gates remain required.
侧边栏分支可以在父会话后台重新读取时触发。分支完成后 activeSessionId/retained pane 已变为子会话,但旧 selectingSessionId 保留,使侧边栏选中和 ChatSurface 切换状态仍指向父会话。
本修复在真正激活分支时一并清除旧选择。被后续导航替代的分支仍只加入列表,保留新导航状态。
Refs #2086
验证:实际 session slice 到 coordination 公共操作回归先在旧代码失败(selectingSessionId 仍为 parent),修复后分支相关 10 项通过;覆盖侧边栏创建、运行中父会话、被新导航替代、失败保持原会话。Desktop TypeScript、文档配对及 diff-check 通过。无模型请求。
仅修复 issue 的分支界面子问题中的这一条确定状态路径;没有宣称处理其内存占用、图片粘贴延迟或所有分支场景。
最新验证:已非破坏性集成最新 main b94d1fb,head b2ed95e 的 6 项 CI 全部成功。