🩹 Keep read-only review footer and fold task diagnostics into each top row

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 <noreply@anthropic.com>
This commit is contained in:
d-robotics 2026-10-27 09:18:17 +08:00
parent 71cc91b9d7
commit 19e9680aa7
6 changed files with 92 additions and 21 deletions

View File

@ -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

View File

@ -67,7 +67,7 @@ Shift + Delete(Mac:Shift + Backspace)删除列表中选中的本轮问题
刷新、直接打开地址、只读预览不会自动开启;普通与专注布局切换不算重新进入。显式暂停、提交异常、窗口过小或被接管后保持暂停,条件恢复后需要手动继续;自动进入的下一条沿用原连续会话。
同一账号在两个页面打开同一任务时,只能一个页面编辑。另一个页面可查看,并可明确接管;接管后原页面停止写入,已保存草稿保留。这项能力适用于公司普通 HTTP 入口。
同一账号在两个页面打开同一任务时,只能一个页面编辑。另一个页面可查看,并可明确接管;接管后原页面停止写入,已保存草稿保留。只读页面的底栏显示「质检审核模式(只读查看)」和「本页只读,点上方「在本页接管审查」后可审核」,不显示通过/退回按钮,也不显示标注员的切片确认条。这项能力适用于公司普通 HTTP 入口。
## 供应商共享验收池(2026-09-29)

View File

@ -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({
)}
</div>
</>
) : phase === "slice" ? (
) : phase === "slice" && !isQualityReview ? (
// A read-only review falls through to the read-only footer below, never
// the annotator's slice-confirmation bar.
<>
<span className="mr-auto text-xs text-amber-700">
{claimLocked
@ -6505,7 +6510,16 @@ export function CaptureAnnotationWorkbench({
{operationNotice}
</p>
)}
<span className="mr-auto text-xs text-slate-500">{segments.length} 个描述已确认</span>
<span className="mr-auto text-xs text-slate-500">
{isQualityReview
? `${slices.length} 个切片 · ${segments.length} 个动作`
: `${segments.length} 个描述已确认`}
</span>
{isQualityReview && reviewReadOnlyNotice ? (
<span role="status" className="text-xs text-amber-700 dark:text-amber-300">
{reviewReadOnlyNotice}
</span>
) : null}
<span className="rounded bg-slate-200/80 px-3 py-1.5 text-xs font-medium text-slate-700 dark:bg-slate-800 dark:text-slate-300">
{isQualityReview ? "质检审核模式(只读查看)" : `${readOnlyStatusLabel}(只读查看)`}
</span>

View File

@ -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 = (
<a
className="annotation-task-diagnostics shrink-0 text-xs text-slate-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-300"
target="_blank"
rel="noopener noreferrer"
href={`/diagnostics?${new URLSearchParams({ itemId: reviewSessionItem?.id || detail?.humanItem?.id || selectedHumanItem?.id || "", taskId: detail?.task?.id || selectedTaskId || "" })}`}
>
当前任务连接诊断
</a>
);
const workspaceContent = (
<div
@ -6077,16 +6088,6 @@ export default function AnnotationOperations({ workPage = false }: { workPage?:
data-workspace-stage={combinedEditorPhase}
data-workspace-compact={focusedStageLayout || undefined}
>
<div className="flex justify-end text-xs">
<a
className="text-slate-500 hover:text-blue-600"
target="_blank"
rel="noopener noreferrer"
href={`/diagnostics?${new URLSearchParams({ itemId: reviewSessionItem?.id || detail?.humanItem?.id || selectedHumanItem?.id || "", taskId: detail?.task?.id || selectedTaskId || "" })}`}
>
当前任务连接诊断
</a>
</div>
{reviewFocused && (
<div className="review-focus-heading">
<h1>{workspaceMode === "acceptance" ? "最终验收" : "质检审查"}</h1>
@ -6138,6 +6139,7 @@ export default function AnnotationOperations({ workPage = false }: { workPage?:
>
返回任务池
</button>
{taskDiagnosticsLink}
</div>
)}
{draftGuardNotice && (
@ -6358,7 +6360,8 @@ export default function AnnotationOperations({ workPage = false }: { workPage?:
工作模式由个人任务池旁的开关控制
</p>
</div>
<div className="flex items-center gap-2">
<div className="flex items-center gap-3">
{!reviewFocused && taskDiagnosticsLink}
<Link
onClick={() => workSession.pauseContinuous("已返回任务池,连续工作暂停。")}
to={workPoolPath}
@ -6371,7 +6374,16 @@ export default function AnnotationOperations({ workPage = false }: { workPage?:
) : (
<>
<h1 className="sr-only">{workspaceTitle}</h1>
<PageSubnav compact items={annotationStageTabs} label="标注中心阶段导航" />
<div className="flex items-end">
<div className="min-w-0 flex-1">
<PageSubnav compact items={annotationStageTabs} label="标注中心阶段导航" />
</div>
{!reviewFocused && (
<div className="flex min-h-8 shrink-0 items-start border-b border-slate-200 pl-3 dark:border-[#2a2b2f]">
{taskDiagnosticsLink}
</div>
)}
</div>
</>
)}
{!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}

View File

@ -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 {

View File

@ -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("<footer"), workbench.indexOf("</footer>"));
// 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*<button[\s\S]{0,200}在本页接管审查/,
);
});
test("task connection diagnostics joins each layout's top row instead of taking its own line", () => {
assert.equal(annotationOperations.match(/当前任务连接诊断/g)?.length, 1);
assert.doesNotMatch(annotationOperations, /<div className="flex justify-end text-xs">\s*<a/);
const focusHeading = annotationOperations.slice(
annotationOperations.indexOf('<div className="review-focus-heading">'),
annotationOperations.indexOf('<div className="annotation-workspace-heading'),
);
assert.match(focusHeading, /返回任务池\s*<\/button>\s*\{taskDiagnosticsLink\}/);
assert.match(annotationOperations, /\{!reviewFocused && taskDiagnosticsLink\}\s*<Link/);
assert.match(
annotationOperations,
/<PageSubnav compact items=\{annotationStageTabs\}[^>]*\/>\s*<\/div>\s*\{!reviewFocused && \(\s*<div[^>]*>\s*\{taskDiagnosticsLink\}/,
);
});