"use client"; import Link from "next/link"; import { ArrowRight, CheckCircle2, ClipboardCheck, ListTree } from "lucide-react"; import { Button } from "@/components/ui/Button"; import { StatusNote } from "@/components/ui/StatusNote"; import type { AcceptResponse } from "@/lib/api/types"; import { buildAcceptPreview } from "@/lib/review/accept-preview"; import { ThinkingIndicator } from "@/components/ThinkingIndicator"; import { reviewChapterHref } from "@/lib/review/chapterNav"; import { buttonClass } from "@/lib/ui/variants"; 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 (
终稿已晋升为正式版本,章节摘要和裁决留痕已按验收事务写回。
留痕:{result.review_id}
) : null} {/* 验收闭环 → 写下一章入口(修「验收后无路可走」的断点)。 */}以上为预期,最终以验收回执为准。