Skip to content

fix(sessions): 激活分支后清除旧会话选择状态 - #2191

Merged
vastsa merged 4 commits into
vastsa:mainfrom
yg2224:fix/fork-navigation-2086
Nov 11, 2026
Merged

vastsa merged 4 commits into
vastsa:mainfrom
yg2224:fix/fork-navigation-2086

Conversation

@yg2224

@yg2224 yg2224 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

侧边栏分支可以在父会话后台重新读取时触发。分支完成后 activeSessionId/retained pane 已变为子会话,但旧 selectingSessionId 保留,使侧边栏选中和 ChatSurface 切换状态仍指向父会话。

本修复在真正激活分支时一并清除旧选择。被后续导航替代的分支仍只加入列表,保留新导航状态。

Refs #2086

验证:实际 session slice 到 coordination 公共操作回归先在旧代码失败(selectingSessionId 仍为 parent),修复后分支相关 10 项通过;覆盖侧边栏创建、运行中父会话、被新导航替代、失败保持原会话。Desktop TypeScript、文档配对及 diff-check 通过。无模型请求。

仅修复 issue 的分支界面子问题中的这一条确定状态路径;没有宣称处理其内存占用、图片粘贴延迟或所有分支场景。

最新验证:已非破坏性集成最新 main b94d1fb,head b2ed95e 的 6 项 CI 全部成功。

侧边栏分支完成时同步清除旧选择,避免界面继续显示旧会话正在切换;被新导航替代的分支不清除新选择。

Refs vastsa#2086
Copilot AI balanced review requested due to automatic review settings November 8, 2026 12:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

合入已完成的 MCP 修复,保留分支激活回归及双方文档内容,避免提交落后于主线。
@vastsa

vastsa commented Nov 8, 2026

Copy link
Copy Markdown
Owner

独立对照已确认问题:保留候选回归测试,仅恢复当前 main 的 session-coordination.ts,分支激活用例失败(selectingSessionId 仍为 parent),其余 4 项通过;恢复候选后 5/5 通过,包括新导航覆盖、运行中父会话和失败路径。当前仅完成生产 store 行为验证,未完成最新 main 集成及真实界面 E2E,尚未批准合入。

vastsa commented Nov 8, 2026

Copy link
Copy Markdown
Owner

已在独立工作树将最新 main f692995(含 #2190)非破坏性集成到 9868c2d。四处文档尾部追加冲突均保留双方章节,业务代码无额外修改。session-fork-running 5/5 再次通过,diff-check 通过;此前保留测试换回 main 已复现 selectingSessionId 残留。已推送现有 PR 分支,等待新 head CI 与实际合并候选验证;尚未批准,未执行真实 Electron 分支交互 E2E。

@aiuo-codepilot aiuo-codepilot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.
@vastsa

vastsa commented Nov 9, 2026

Copy link
Copy Markdown
Owner

已非破坏性集成最新 main f23440c 到 607d2b5,仅解决一处中文 E2E 文档追加冲突并保留双方章节,业务代码无额外修改。分支状态回归 5/5、Desktop TypeScript noEmit、diff-check 均通过;最初复用旧 shared 产物导致加载失败,切换为与当前 main 对应的兼容产物后通过,未改主工作区依赖。已普通推送现有 PR 分支,等待新 head CI。真实分支界面 E2E 仍待完成,因此本轮不批准、不合入。

@aiuo-codepilot aiuo-codepilot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@vastsa
vastsa merged commit 5bb1313 into vastsa:main Nov 11, 2026
6 checks passed
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.

3 participants