From 19e9680aa7f792fd5e0d549f33faf7146abe5187 Mon Sep 17 00:00:00 2001 From: d-robotics Date: Tue, 27 Oct 2026 09:18:17 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Keep=20read-only=20review=20foot?= =?UTF-8?q?er=20and=20fold=20task=20diagnostics=20into=20each=20top=20row?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A quality review that loses its edit lease no longer falls through to the annotator's slice-confirmation bar; it shows its own read-only footer with a takeover hint. The task-scoped connection-diagnostics link joins the subnav, work-page or focus-heading row instead of taking a line of its own. Co-Authored-By: Claude Opus 5.5 --- .scratch/workbench-ui-polish/work.md | 7 ++-- docs/review-workspace-guide.zh-CN.md | 2 +- src/components/CaptureAnnotationWorkbench.tsx | 18 +++++++- src/pages/AnnotationOperations.tsx | 41 +++++++++++++------ src/styles/capture-workspace.css | 12 ++++-- .../capture-annotation-workbench.test.mjs | 33 +++++++++++++++ 6 files changed, 92 insertions(+), 21 deletions(-) diff --git a/.scratch/workbench-ui-polish/work.md b/.scratch/workbench-ui-polish/work.md index cbbabcc0..cb54d075 100644 --- a/.scratch/workbench-ui-polish/work.md +++ b/.scratch/workbench-ui-polish/work.md @@ -2,7 +2,8 @@ Goal: make the annotator / QC / final-acceptance workbenches (normal and focus layouts, rework and re-review states) tidier and smoother without changing any function; interaction changes need the user's approval first Agent: Claude Code (desktop session, 2026-10-27) -Base: codex/frontend-polish-20261026 @ de96cfc2 (unmerged; it carries the production line review-runtime-trace, whose annotation workbench differs from origin/dev by ~1300 lines). Pending the user's confirmation. +Base: codex/frontend-polish-20261026 @ de96cfc2 (unmerged; it carries the production line review-runtime-trace, whose annotation workbench differs from origin/dev by ~1300 lines). Confirmed by the user on 2026-10-27. Scope: src/index.css, src/styles/{capture-workspace,review-workspace,review-captions}.css, display-only class names in src/pages/AnnotationOperations.tsx and src/components/* used by the four workbenches -Out of scope: interaction changes (entry points, shortcuts, panel positions, confirmations, auto-claim/continuation behaviour), API, data, other pages -Risk: display only +Approved interaction changes (2026-10-27 compare sheet): the task-scoped 当前任务连接诊断 link joins each layout's top row; a read-only quality review shows its own footer and takeover hint instead of the annotator slice bar. Declined: moving the QC opinion panel below the video; adding an action list to review focus. +Out of scope: other interaction changes (entry points, shortcuts, panel positions, confirmations, auto-claim/continuation behaviour), API, data, other pages +Risk: display plus one footer-routing fix; no API, data or shortcut changes diff --git a/docs/review-workspace-guide.zh-CN.md b/docs/review-workspace-guide.zh-CN.md index bef6ed9f..2d80f9cb 100644 --- a/docs/review-workspace-guide.zh-CN.md +++ b/docs/review-workspace-guide.zh-CN.md @@ -67,7 +67,7 @@ Shift + Delete(Mac:Shift + Backspace)删除列表中选中的本轮问题 刷新、直接打开地址、只读预览不会自动开启;普通与专注布局切换不算重新进入。显式暂停、提交异常、窗口过小或被接管后保持暂停,条件恢复后需要手动继续;自动进入的下一条沿用原连续会话。 -同一账号在两个页面打开同一任务时,只能一个页面编辑。另一个页面可查看,并可明确接管;接管后原页面停止写入,已保存草稿保留。这项能力适用于公司普通 HTTP 入口。 +同一账号在两个页面打开同一任务时,只能一个页面编辑。另一个页面可查看,并可明确接管;接管后原页面停止写入,已保存草稿保留。只读页面的底栏显示「质检审核模式(只读查看)」和「本页只读,点上方「在本页接管审查」后可审核」,不显示通过/退回按钮,也不显示标注员的切片确认条。这项能力适用于公司普通 HTTP 入口。 ## 供应商共享验收池(2026-09-29) diff --git a/src/components/CaptureAnnotationWorkbench.tsx b/src/components/CaptureAnnotationWorkbench.tsx index 81c14057..3ed9f348 100644 --- a/src/components/CaptureAnnotationWorkbench.tsx +++ b/src/components/CaptureAnnotationWorkbench.tsx @@ -201,6 +201,8 @@ type Props = ReviewViewingProps & { */ captionsViewable?: boolean; reviewWriteLocked?: boolean; + /** Footer hint shown while a review is read-only, e.g. why and how to regain the decision buttons. */ + reviewReadOnlyNotice?: string; reviewApprovalBlocked?: boolean; reviewMode?: "quality" | "acceptance"; reviewCaption?: ReviewCaption; @@ -385,6 +387,7 @@ export function CaptureAnnotationWorkbench({ isQualityReview = false, captionsViewable = false, reviewWriteLocked = false, + reviewReadOnlyNotice = "", reviewApprovalBlocked = false, reviewMode = "quality", reviewCaption: providedReviewCaption, @@ -6451,7 +6454,9 @@ export function CaptureAnnotationWorkbench({ )} - ) : phase === "slice" ? ( + ) : phase === "slice" && !isQualityReview ? ( + // A read-only review falls through to the read-only footer below, never + // the annotator's slice-confirmation bar. <> {claimLocked @@ -6505,7 +6510,16 @@ export function CaptureAnnotationWorkbench({ {operationNotice}

)} - {segments.length} 个描述已确认 + + {isQualityReview + ? `${slices.length} 个切片 · ${segments.length} 个动作` + : `${segments.length} 个描述已确认`} + + {isQualityReview && reviewReadOnlyNotice ? ( + + {reviewReadOnlyNotice} + + ) : null} {isQualityReview ? "质检审核模式(只读查看)" : `${readOnlyStatusLabel}(只读查看)`} diff --git a/src/pages/AnnotationOperations.tsx b/src/pages/AnnotationOperations.tsx index 3386875f..5aa81f43 100644 --- a/src/pages/AnnotationOperations.tsx +++ b/src/pages/AnnotationOperations.tsx @@ -6064,6 +6064,17 @@ export default function AnnotationOperations({ workPage = false }: { workPage?: ); const showViewportPrompt = viewportPaused && pendingTaskId === null && leaveBlocker.state !== "blocked"; + // Rendered once, at the end of whichever top row the current layout shows. + const taskDiagnosticsLink = ( + + 当前任务连接诊断 + + ); const workspaceContent = (
-
- - 当前任务连接诊断 - -
{reviewFocused && (

{workspaceMode === "acceptance" ? "最终验收" : "质检审查"}

@@ -6138,6 +6139,7 @@ export default function AnnotationOperations({ workPage = false }: { workPage?: > 返回任务池 + {taskDiagnosticsLink}
)} {draftGuardNotice && ( @@ -6358,7 +6360,8 @@ export default function AnnotationOperations({ workPage = false }: { workPage?: 工作模式由个人任务池旁的开关控制

-
+
+ {!reviewFocused && taskDiagnosticsLink} workSession.pauseContinuous("已返回任务池,连续工作暂停。")} to={workPoolPath} @@ -6371,7 +6374,16 @@ export default function AnnotationOperations({ workPage = false }: { workPage?: ) : ( <>

{workspaceTitle}

- +
+
+ +
+ {!reviewFocused && ( +
+ {taskDiagnosticsLink} +
+ )} +
)} {!workPage || !selectedTaskId ? ( @@ -7772,6 +7784,11 @@ export default function AnnotationOperations({ workPage = false }: { workPage?: )) } reviewWriteLocked={reviewWriteLocked || Boolean(reviewDecision.pending)} + reviewReadOnlyNotice={ + reviewSessionEnabled && !reviewSession.writable + ? "本页只读,点上方「在本页接管审查」后可审核" + : "" + } reviewProblemPanel={reviewProblemPanel} reviewTracePanel={reviewTracePanel} onReviewNavigate={reviewDraft.onNavigate} diff --git a/src/styles/capture-workspace.css b/src/styles/capture-workspace.css index 1b74f762..ed500df8 100644 --- a/src/styles/capture-workspace.css +++ b/src/styles/capture-workspace.css @@ -1784,7 +1784,9 @@ html.dark .capture-camera-inspection-controls button[aria-pressed="true"] { } /* 任务池顶栏(普通与专注):工作模式、容量、领取、任务切换和返回按钮统一为 28px 高的同一套控件。 */ .annotation-operations-page .annotation-work-buffer :is(button, select), -.annotation-operations-page[data-workspace-compact] .annotation-work-page-navigation a { +.annotation-operations-page[data-workspace-compact] + .annotation-work-page-navigation + a:not(.annotation-task-diagnostics) { min-height: 28px; border-radius: 6px; background-color: var(--app-panel); @@ -1793,13 +1795,17 @@ html.dark .capture-camera-inspection-controls button[aria-pressed="true"] { color 0.15s, background-color 0.15s; } -.annotation-operations-page[data-workspace-compact] .annotation-work-page-navigation a { +.annotation-operations-page[data-workspace-compact] + .annotation-work-page-navigation + a:not(.annotation-task-diagnostics) { padding: 3px 12px; font-size: 13px; line-height: 20px; } .annotation-operations-page .annotation-work-buffer :is(button, select):hover:not(:disabled), -.annotation-operations-page[data-workspace-compact] .annotation-work-page-navigation a:hover { +.annotation-operations-page[data-workspace-compact] + .annotation-work-page-navigation + a:not(.annotation-task-diagnostics):hover { border-color: rgb(59 130 246 / 60%); } .capture-caption-strip { diff --git a/tests/frontend/capture-annotation-workbench.test.mjs b/tests/frontend/capture-annotation-workbench.test.mjs index 9a1ae9ea..6a2e96d9 100644 --- a/tests/frontend/capture-annotation-workbench.test.mjs +++ b/tests/frontend/capture-annotation-workbench.test.mjs @@ -484,3 +484,36 @@ test("local mock preview is guarded by Vite development mode", () => { assert.match(preview, /href=\{href\}/); assert.match(preview, /onReturnToPool=\{\(\) => setView\("pool"\)\}/); }); + +test("a read-only quality review keeps its own footer instead of the annotator slice bar", () => { + const footer = workbench.slice(workbench.indexOf("")); + // Slice phase only routes to the annotator's confirmation bar outside quality review. + assert.match(footer, /\) : phase === "slice" && !isQualityReview \? \(/); + const readOnlyFooter = footer.slice(footer.indexOf(") : readOnly ? (")); + assert.match(readOnlyFooter, /isQualityReview && reviewReadOnlyNotice \?/); + assert.match(readOnlyFooter, /质检审核模式(只读查看)/); + // The hint appears exactly when the page offers the takeover button. + assert.match( + annotationOperations, + /reviewReadOnlyNotice=\{\s*reviewSessionEnabled && !reviewSession\.writable\s*\? "本页只读,点上方「在本页接管审查」后可审核"/, + ); + assert.match( + annotationOperations, + /reviewSessionEnabled && !reviewSession\.writable && \(\s* { + assert.equal(annotationOperations.match(/当前任务连接诊断/g)?.length, 1); + assert.doesNotMatch(annotationOperations, /