Skip to content

清理:缺目录首条消息经文本 /repo 开工后的两个小尾巴(#2168 follow-up) #2176

Closed

Description

@deepcoldy

#2168 合入后复审中发现的两个不阻断小尾巴,都只在「首条消息因默认目录缺失被拒」的窄状态下出现,语义目前正确,记录以免丢失。

1. 文本 /repo <路径> 成功开工后未清理 ds.workingDirRecovery

卡片路径在 commitRepoSelection 成功后显式 ds.workingDirRecovery = undefined;但 command-handler.ts 的 forkPendingCli(文本 /repo <路径|项目名> 的 pending 提交)成功后没有清。

  • 目前是惰性残留,无症状:workingDirRecoveryPending 比较的是「当前工作目录 === 缺失路径」,目录已切走即为假;此时点旧卡会走 isActiveRepoCard 的「卡片已失效」toast。
  • 建议:forkPendingCli 成功提交后与卡片路径对齐,清掉 workingDirRecovery。

2. 裸 /repo(不带参数)在「被拒开场」态下的拒绝文案不贴切

该状态(pendingRepo=false + pendingRepoSetup 还在 + queued)下发裸 /repo,会先命中 hasProtectedSessionMutationOwnership 保护闸,收到「当前 Codex App 仍有未结算消息,暂不能切换仓库」——但这条会话从未有过 Codex App 派发,文案会让用户困惑。

相关

Activity

  1. deepcoldy commented on Oct 23, 2026

    @deepcoldy
    OwnerAuthor

    已由 #2188 修复并随 26242bf8 合入 master:

    • 文本 /repo <路径> 开工成功后清掉 workingDirRecovery 残留,与卡片路径行为对齐;
    • 缺目录首条消息状态下裸 /repo 不再误报「Codex App 仍有未结算消息」,改为回复缺目录引导。

    本 issue 随 #2188 合码自动关闭。同状态下 /cd <路径>、/restart 的误报另开 issue 跟进。

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions