"use client"; import Link from "next/link"; import type { AcceptResponse } from "@/lib/api/types"; import { buildAcceptPreview } from "@/lib/review/accept-preview"; import { ThinkingIndicator } from "@/components/ThinkingIndicator"; interface AcceptPanelProps { projectId: string; chapterNo: number; // 本页是否已有审稿结果(进页带留痕 或 本次重审完成)。用于区分 // 「审过且 0 冲突→可直接验收」与「未审稿→先审稿」,避免把"未知"当"无冲突"。 reviewed: boolean; conflictCount: number; unresolvedCount: number; // R3:当前伏笔建议数(验收前清单提醒,只读不自动落库)。 foreshadowCount: number; accepting: boolean; result: AcceptResponse | null; onAccept: () => void; } // 验收 gate(UX §9 / §8.4):未决禁验收(置灰 + 文案),验收后呈现「本次将更新」清单。 export function AcceptPanel({ projectId, chapterNo, reviewed, conflictCount, unresolvedCount, foreshadowCount, accepting, result, onAccept, }: AcceptPanelProps) { const blocked = unresolvedCount > 0; const preview = buildAcceptPreview({ conflictCount, foreshadowSuggestions: foreshadowCount, }); if (result) { return (

本章已验收

{/* 验收闭环 → 写下一章入口(修「验收后无路可走」的断点)。 */}
→ 写第 {chapterNo + 1} 章 返回大纲
); } return (
{blocked ? (

尚有 {unresolvedCount} 项冲突未裁决,处理完才能验收。

) : ( <>

{conflictCount === 0 ? reviewed ? "无冲突,可直接验收。" : "尚未审稿——建议先点「重新审稿」确认本章无冲突,再验收。" : "全部冲突已裁决,可验收本章。"}

{/* R3:验收前「本次将更新」清单(预期,落库口径以验收回执为准)。 */}

本次验收将更新

以上为预期,最终以验收回执为准。

)}
); }