(runs.map((run) => [run.id, run]));
- if (runDetail && runDetail.workflowId === selectedWorkflowId) byId.set(runDetail.id, runDetail);
+ if (runDetail && runDetail.projectId === selectedProjectId) byId.set(runDetail.id, runDetail);
return [...byId.values()].sort((left, right) => runTimestamp(right) - runTimestamp(left));
- }, [runDetail, runs, selectedWorkflowId]);
+ }, [runDetail, runs, selectedProjectId]);
const selectedRun = useMemo(
() => runOptions.find((run) => run.id === selectedRunId) || runDetail,
[runDetail, runOptions, selectedRunId],
);
const selectedProject = projects.find((project) => project.id === selectedProjectId);
- const selectedWorkflow = workflows.find((workflow) => workflow.id === selectedWorkflowId);
+ const selectedWorkflow = workflows.find((workflow) => workflow.id === (selectedRun?.workflowId || selectedWorkflowId));
const childRuns = useMemo(
() => runOptions.filter((run) => run.parentRunId === selectedRunId),
[runOptions, selectedRunId],
@@ -268,7 +266,7 @@ export default function DataAssets() {
- 依次选择项目、工作流和 Capture 执行记录,查看这条采集记录的全部输入、中间产物和最终结果。
+ 依次选择项目和 Capture,查看该 Capture 的输入、中间产物、切片与最终结果;工作流只用于筛选处理来源。
@@ -290,16 +288,35 @@ export default function DataAssets() {
+
-
{selectionError ? (
diff --git a/src/pages/ProjectDetail.tsx b/src/pages/ProjectDetail.tsx
index e0b3026f..623bd8be 100644
--- a/src/pages/ProjectDetail.tsx
+++ b/src/pages/ProjectDetail.tsx
@@ -496,6 +496,7 @@ export default function ProjectDetail() {
if (!project) return
项目未找到
;
const canManage = canManagePipelineDesign(role);
+ const canManageMembers = canManage || role === "supplier_manager";
const projectAssetsPath = buildDataAssetsPath({
tab: DATA_ASSET_PACKAGES_TAB,
projectId: project.id,
@@ -1759,7 +1760,7 @@ export default function ProjectDetail() {
)}
@@ -2785,6 +2786,17 @@ export default function ProjectDetail() {
{Math.round(record.samplingDecision.probability * 100)}%
) : null}
+ {record.parentRunId ? (
+
+ 父 Run:{record.parentRunId}
+
+ ) : null}
+ {record.error ? (
+
+ {record.failedNodeId ? `失败节点 ${record.failedNodeId}:` : "失败原因:"}
+ {record.error}
+
+ ) : null}
{record.fileCount} 个 · {formatBytes(record.totalBytes)}
diff --git a/src/services/api/human-loop.ts b/src/services/api/human-loop.ts
index 31d3657b..e09802a1 100644
--- a/src/services/api/human-loop.ts
+++ b/src/services/api/human-loop.ts
@@ -26,7 +26,8 @@ export const humanLoopApi = {
listItems: async (filters: HumanItemFilters = {}) =>
(await apiRequest<{ items: HumanItem[] }>(`/api/human-items${queryString(filters)}`)).items,
getItem: (id: string) => apiRequest<{ item: HumanItem }>(`/api/human-items/${encodeURIComponent(id)}`),
- subjectContentURL: (id: string) => `/api/human-items/${encodeURIComponent(id)}/subject-content`,
+ subjectContentURL: (id: string, side: "left" | "right" = "left") =>
+ `/api/human-items/${encodeURIComponent(id)}/subject-content${side === "right" ? "?side=right" : ""}`,
evidenceContentURL: (id: string, artifactId: string) =>
`/api/human-items/${encodeURIComponent(id)}/evidence/${encodeURIComponent(artifactId)}/content`,
listEvidenceMembers: (
diff --git a/src/types.ts b/src/types.ts
index f135b9be..84d1c033 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -1114,6 +1114,7 @@ export interface CaptureRecord {
maxAttempts?: number;
nextRetryAt?: string;
parentRunId?: string;
+ failedNodeId?: string;
businessStage?: CaptureBusinessStage;
contractRevision?: string;
runtimePolicyRevision?: number;
@@ -1877,6 +1878,19 @@ export interface AnnotationLabelRecord {
status: "active" | "inactive";
version: number;
updatedAt: string;
+ history?: Array<{
+ version: number;
+ code: string;
+ name: string;
+ category?: string;
+ description?: string;
+ example?: string;
+ color?: string;
+ aliases?: string[];
+ status: "active" | "inactive";
+ updatedByUserId: string;
+ updatedAt: string;
+ }>;
}
export interface ProjectAnnotationLabelsRecord {
@@ -1968,6 +1982,8 @@ export interface AnnotationTaskRecord {
nodeId?: string;
artifactId?: string;
sourceVideo: string;
+ rightArtifactId?: string;
+ rightSourceVideo?: string;
clipStart: number;
clipEnd: number;
sourceIsFullVideo?: boolean;
diff --git a/tests/backend/test_fanyu_annotation_operators.py b/tests/backend/test_fanyu_annotation_operators.py
index 69f03956..0f3e3670 100644
--- a/tests/backend/test_fanyu_annotation_operators.py
+++ b/tests/backend/test_fanyu_annotation_operators.py
@@ -434,12 +434,19 @@ def test_package_multiport_binds_directory_media_semantic_segment_and_summary(tm
assert len({item["id"] for item in artifacts}) == len(artifacts)
-def test_v58_package_organizes_accepted_revision_directory_without_first_cut(tmp_path):
+def test_v58_package_organizes_accepted_revision_directory_without_first_cut(tmp_path, monkeypatch):
accepted_root = tmp_path / "accepted" / "revision-000001"
source_slice = accepted_root / "slices" / "slice-000001"
source_slice.mkdir(parents=True)
- for name in ("left.mp4", "right.mp4", "left_pts.csv", "right_pts.csv", "imu.csv", "annotation.json"):
+ for name in ("left.mp4", "right.mp4"):
(source_slice / name).write_bytes(b"accepted-materialized-file")
+ for name in ("left_pts.csv", "right_pts.csv"):
+ (source_slice / name).write_text("frame_index,timestamp_ms,clip_time_ms\n0,1000,0\n1,1500,500\n", encoding="utf-8")
+ (source_slice / "imu.csv").write_text(
+ "timestamp_ms,clip_time_ms,x,y,z,type\n1000,0,0,0,9.8,accel\n1000,0,0,0,0,gyro\n1500,500,0,0,9.8,accel\n1500,500,0,0,0,gyro\n",
+ encoding="utf-8",
+ )
+ (source_slice / "annotation.json").write_text(json.dumps({"actions": []}), encoding="utf-8")
(source_slice / "synchronized-slice.json").write_text(json.dumps({"schemaVersion": "droboticflow.synchronized-slice/v1"}), encoding="utf-8")
(accepted_root / "revision-manifest.json").write_text(json.dumps({
"schemaVersion": "droboticflow.slice-materialization/v2",
@@ -457,7 +464,7 @@ def test_v58_package_organizes_accepted_revision_directory_without_first_cut(tmp
imu_calibration.write_text("imu: real\n", encoding="utf-8")
inputs = [
{"id": "accepted-directory", "name": "revision.directory.index", "path": str(accepted_root), "type": "file", "portId": "acceptedSliceDirectory", "data": {}},
- {"id": "acceptance", "name": "acceptance-summary.json", "type": "json", "portId": "acceptanceSummary", "data": {"finalAcceptance": {"sampled": False, "samplingDecision": "not_selected", "samplingProbability": 0.5, "samplingPolicyRevision": 2, "samplingRandomValue": 0.8, "poseDelivery": {"headpose": "include", "handpose": "exclude"}}}},
+ {"id": "acceptance", "name": "acceptance-summary.json", "type": "json", "portId": "acceptanceSummary", "data": {"capture": {"captureId": "capture-a", "prefix": "test/capture-a", "fingerprint": "sha"}, "qualityReviews": [{"decision": "approved", "revision": 1}], "finalAcceptance": {"sampled": False, "samplingDecision": "not_selected", "samplingProbability": 0.5, "samplingPolicyRevision": 2, "samplingRandomValue": 0.8, "poseDelivery": {"headpose": "include", "handpose": "exclude"}}}},
{"id": "headpose", "name": "headpose.json", "type": "json", "portId": "headpose", "data": {"schemaVersion": "droboticflow.headpose/v1", "frames": [{"frameIndex": 0, "timestampSeconds": 0.5, "yawDeg": 0, "pitchDeg": 0, "rollDeg": 0}]}},
{"id": "handpose", "name": "handpose.json", "type": "json", "portId": "handpose", "data": {"schemaVersion": "droboticflow.wilor.hand_pose_result/v1", "result": {"frames": [{"frameIndex": 0, "timestampSeconds": 0.5}]}}},
{"id": "camera-calibration", "name": camera_calibration.name, "path": str(camera_calibration), "type": "file", "portId": "calibrations", "data": {}},
@@ -484,6 +491,7 @@ def test_v58_package_organizes_accepted_revision_directory_without_first_cut(tmp
def virtual(run_id, node_id, name, path, artifact_type, size_bytes, data=None, metadata=None, output=None):
return {"id": f"{run_id}-{name}", "name": name, "path": str(path), "type": artifact_type, "data": data or {}, "portId": output["id"], "portName": output["name"]}
+ monkeypatch.setattr(package_operator, "_ffprobe_frame_count", lambda path: 2)
artifacts = package_operator.run(
"package-run", "package", tmp_path / "output", {"outputs": outputs}, inputs,
{
@@ -508,6 +516,9 @@ def test_v58_package_organizes_accepted_revision_directory_without_first_cut(tmp
assert manifest["poseDelivery"] == {"headpose": "include", "handpose": "exclude"}
assert manifest["acceptanceSampling"] == {"sampled": False, "decision": "not_selected", "probability": 0.5, "policyRevision": 2, "randomValue": 0.8, "decidedAt": None}
assert manifest["coverage"]["contiguous"] is True
+ assert manifest["capture"]["captureId"] == "capture-a"
+ assert {item["name"] for item in manifest["rootEvidence"]} == {"capture-manifest.json", "quality-review.json", "acceptance-record.json", "sampling-evidence.json"}
+ assert json.loads((delivery / "quality-review.json").read_text(encoding="utf-8"))["reviews"][0]["decision"] == "approved"
assert {item["portId"] for item in artifacts} == {"deliveryDirectory", "deliveryManifest", "deliverySummary"}
diff --git a/tests/frontend/annotation-operations.test.mjs b/tests/frontend/annotation-operations.test.mjs
index 3fe7b4b7..40091de9 100644
--- a/tests/frontend/annotation-operations.test.mjs
+++ b/tests/frontend/annotation-operations.test.mjs
@@ -160,6 +160,10 @@ test("annotation operations uses the draggable video timeline and workflow deep
new URL("../../src/components/MaterializedSliceWorkbench.tsx", import.meta.url),
"utf8",
);
+ const workbench = fs.readFileSync(
+ new URL("../../src/components/AnnotationWorkbenchEditor.tsx", import.meta.url),
+ "utf8",
+ );
assert.match(page, /AnnotationTimelineEditor/);
assert.match(page, /requestedRunId/);
assert.match(page, /annotationStageNavigationPath/);
@@ -185,6 +189,10 @@ test("annotation operations uses the draggable video timeline and workflow deep
assert.match(page, /humanLoopApi\.subjectContentURL\(selectedHumanItem\.id\)/);
assert.match(page, /disabled=\{sliceEditorReadOnly\}/);
assert.match(page, /data-testid="slice-coverage-status"/);
+ assert.match(page, /rightVideoSource=\{selectedRightVideoSource\}/);
+ assert.match(page, /subjectContentURL\(selectedHumanItem\.id, "right"\)/);
+ assert.match(workbench, /边界异常/);
+ assert.match(workbench, /cameraMode/);
assert.match(page, /data-testid="annotation-load-recovery"/);
assert.match(page, /recoverableGatewayStatus\(loadError\)/);
assert.match(page, /setProjectLoadRetryVersion/);
diff --git a/tests/frontend/data-assets.test.mjs b/tests/frontend/data-assets.test.mjs
index 220c48e9..4bf91e37 100644
--- a/tests/frontend/data-assets.test.mjs
+++ b/tests/frontend/data-assets.test.mjs
@@ -49,17 +49,17 @@ test("artifact group parsing supports final intermediate and input", () => {
assert.equal(parseDataAssetsGroup("unexpected"), DATA_ASSET_FINAL_GROUP);
});
-test("data assets page selects project workflow and run before loading all artifacts", async () => {
+test("data assets page uses project and Capture as hierarchy with workflow as an optional filter", async () => {
const page = await readFile(new URL("../../src/pages/DataAssets.tsx", import.meta.url), "utf8");
const explorer = await readFile(new URL("../../src/components/RunArtifactsExplorer.tsx", import.meta.url), "utf8");
assert.match(page, /aria-label="选择项目"/);
- assert.match(page, /aria-label="选择工作流"/);
- assert.match(page, /aria-label="选择 Capture 执行记录"/);
+ assert.match(page, /aria-label="选择 Capture"/);
+ assert.match(page, /aria-label="按工作流筛选 Capture"/);
assert.match(page, /BusinessExecutionPath/);
assert.match(page, /primaryCaptureDirectory/);
assert.match(page, /\.listWorkflows\(selectedProjectId\)/);
- assert.match(page, /\.listRuns\(selectedWorkflowId\)/);
+ assert.match(page, /monitoringApi[\s\S]*\.listRuns\(\{ projectId: selectedProjectId, workflowId: selectedWorkflowId \|\| undefined/);
assert.match(page, /monitoringApi\.getExecutionData\(selectedRunId\)/);
assert.match(page, /monitoringApi\.getLineage\(selectedRunId\)/);
assert.match(page, /runInputArtifacts\(runDetail\)/);
diff --git a/tests/frontend/fanyu-comment-followup.test.mjs b/tests/frontend/fanyu-comment-followup.test.mjs
index 980f4c20..7fcaaff7 100644
--- a/tests/frontend/fanyu-comment-followup.test.mjs
+++ b/tests/frontend/fanyu-comment-followup.test.mjs
@@ -78,8 +78,11 @@ test("v5.8 submits a combined revision and uses strict whole-package acceptance"
assert.match(source, /pendingCombinedSubmissionId/);
});
-test("supplier managers are redirected away from non-dashboard deep links", async () => {
- const source = await readFile(appURL, "utf8");
+test("supplier managers can maintain supplier-scoped project members but remain outside engineering routes", async () => {
+ const [source, sidebar] = await Promise.all([readFile(appURL, "utf8"), readFile(sidebarURL, "utf8")]);
assert.match(source, /effectiveRole === "supplier_manager"/);
+ assert.match(source, /path !== "\/projects"/);
+ assert.match(source, /!path\.startsWith\("\/project\/"\)/);
assert.match(source, / |