Skip to content

修复失败刷新恢复与长会话恢复入口 - #92

Merged
2002yy merged 11 commits into
mainfrom
p0/recovery-refresh-visibility
Jul 29, 2026
Merged

修复失败刷新恢复与长会话恢复入口#92
2002yy merged 11 commits into
mainfrom
p0/recovery-refresh-visibility

Conversation

@2002yy

@2002yy 2002yy commented Jul 29, 2026

Copy link
Copy Markdown
Owner

范围

仅修复 Study Agent 主学习工作台的恢复闭环。Closes #91

修复

  • 最新 turn 为 failed 时,刷新后恢复为 retry-only 状态
  • 零 token 失败不显示“从断点继续”,不伪造部分回答
  • 中断 turn 仍可从原 turn 断点续写
  • 恢复卡在 conversation flex 序列中固定到消息尾部,并在当前 viewport 内 sticky 可见
  • failed-before-reply 不显示“部分回答已保留/复制”快捷条
  • 不改变后端 failed / interrupted durable status
  • 不推进 committed learning state,不触碰 Provider、群聊、新闻、工具或 claim UI

回归

  • 单元测试覆盖 latest failed、interrupted、completed/abandoned 后不误恢复
  • 新增长历史恢复可见性 fixture,覆盖 desktop、390×844、360×520
  • real-stack 覆盖 zero-token failure -> reload -> retry -> parent superseded + one completed child
  • 保留 partial interruption -> reload -> same-turn continuation

合并门禁

保持 Draft,等待完整 pytest、RAG K1、Ruff、detect-secrets、mypy、frontend、browser journeys 与 real-stack 全绿。

@2002yy
2002yy marked this pull request as ready for review July 29, 2026 14:43
@2002yy
2002yy merged commit 47d252e into main Jul 29, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 97e849c117

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

onAbandonInterrupted: () => Promise<void> | void;
}) {
if (streamRecovery) {
const hasPartialReply = hasPartialRecoveryReply(streamRecovery.reply);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep failed continuations retry-only

When continuing an interrupted turn fails before emitting another token, ChatService.fail_turn preserves the previous partial reply but records the turn as failed. After reload, this reply-only check consequently exposes “从断点继续”; however, ChatService._validate_turn_command rejects continuation targets whose status is not interrupted, so clicking it only produces an error. Carry the restored turn status into the recovery state and offer continuation only for interrupted turns, while leaving failed turns retry-only.

Useful? React with 👍 / 👎.

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