fix: 修复自动导演创建页偶发白屏 - #143
Open
bighuixiang wants to merge 7 commits into
Open
Conversation
bighuixiang
force-pushed
the
fix/auto-director-select-white-screen
branch
from
August 21, 2026 02:24
fdc759c to
9f14cca
Compare
问题背景:章节执行合同缺失或质量门禁失败时,任务中心只能显示通用失败,用户无法准确定位章节,也无法从任务中心恢复正文生产。\n\n处理内容:\n- 为执行合同质量门禁引入结构化失败信息,保留小说、卷、章节和章序定位。\n- 在任务摘要和任务中心识别合同缺失、待复核和可恢复状态,提供章节处理页与 AI 补齐本章任务单入口。\n- 补齐目标字数与章节合同生成链路的默认和回填逻辑,兼容历史任务。\n- 增加目标字数与任务中心路由测试,确保恢复入口稳定且不依赖错误文本解析。\n\n验证:已完成客户端构建、服务端构建及相关章节合同和任务中心测试。
问题背景:暂停后恢复请求虽然能够写入状态,但重复请求、失败重试、卷纲合同延后和跟进页面实时状态之间存在断点,用户可能看到自动推进中却不知道后台是否真正继续。\n\n处理内容:\n- 为暂停动作加入同一幂等键的串行保护、数据库 processing 状态、失败重试和过期租约接管,避免重复取消并允许中断后安全恢复。\n- 统一取消后的最近检查点恢复路径,保留已保存产物和可恢复状态。\n- defer_and_continue 仅记录局部质量债;已有且仍匹配的数据库执行合同不被清空,章节规划发生实质变化时进入 needs_repair。\n- 跟进中心在 queued/running 状态下持续刷新任务列表和当前详情,显示心跳、章节和流水线推进,恢复后页面不再停留在静态状态。\n- 补充暂停、幂等、合同保留与失配、手动复核和跟进中心场景测试,并记录运行时恢复边界。\n\n验证:已完成客户端构建、服务端构建、自动导演暂停与卷纲同步定向测试(28/28),并通过差异空白检查。
问题背景:自动导演以 defer_and_continue 同步整本书时,完全缺失执行合同的章节没有进入 needs_repair;同时,数据库合同保留逻辑读取 Chapter 表不存在的边界字段,导致可复用合同被误判为不一致并被清空。\n\n处理内容:\n- 让延后同步在指定章节范围和整本书同步两种场景下都记录完全缺失的执行合同,统一进入质量债和 needs_repair 路径。\n- 将数据库合同保留判定改为比较同步前后的卷纲章节身份、目标、边界和执行约束,不再读取 Chapter 表不存在的字段。\n- 无法证明规划一致时采取安全修复路径,避免新规划与旧任务单、场景卡混用。\n- 补充全量延后同步及边界字段不在 Chapter 表时仍能正确保留合同的回归测试,并更新章节规划边界 Wiki。\n\n验证:服务端 TypeScript 构建通过;自动导演跟进与卷纲同步定向测试共 36 项全部通过;差异空白检查通过。
…b.com/bighuixiang/AI-Novel-Writing-Assistant into fix/auto-director-select-white-screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
自动导演创建页在没有可选世界样本时会出现两个空值选项,可能触发 React 的无限更新并白屏。
修复
将选择控件的内部选项标识与业务值分离,保证每个选项在 Radix 中唯一,同时继续向业务层回传原始值。
验证