From 69fc140504fa7374f19a40c557ee2ea9df7003d2 Mon Sep 17 00:00:00 2001 From: hyeokjun32 Date: Wed, 29 Apr 2026 23:59:57 +0900 Subject: [PATCH] fix: clarify local studio pipeline states --- inferedgelab/studio/static/app.js | 11 ++++++++--- inferedgelab/studio/static/index.html | 4 ++-- inferedgelab/studio/static/style.css | 5 +++++ tests/test_studio_routes.py | 3 +++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/inferedgelab/studio/static/app.js b/inferedgelab/studio/static/app.js index 4dd85a0..b14c15d 100644 --- a/inferedgelab/studio/static/app.js +++ b/inferedgelab/studio/static/app.js @@ -544,11 +544,13 @@ function pipelineStatus() { const anyRunning = currentJobs.some((job) => job.status === "queued" || job.status === "running"); const anyCompleted = currentJobs.some((job) => job.status === "completed") || Boolean(importedResult); const hasCompareDecision = Boolean(activeDecision); + const hasImportedEvidence = Boolean(importedResult); + const hasGuardEvidence = Boolean(activeDecision?.guard_status); return { forge: importedResult ? "completed" : "idle", - runtime: anyRunning ? "running" : anyCompleted ? "completed" : "idle", - lab: hasCompareDecision ? "completed" : anyRunning ? "running" : "idle", - aiguard: hasCompareDecision && activeDecision?.guard_status ? "completed" : "idle", + runtime: hasImportedEvidence || anyCompleted ? "completed" : anyRunning ? "running" : "idle", + lab: hasCompareDecision || hasImportedEvidence ? "completed" : anyRunning ? "running" : "idle", + aiguard: hasGuardEvidence ? "completed" : "optional", }; } @@ -569,6 +571,9 @@ function normalizeState(state) { if (value === "running") { return "running"; } + if (value === "optional" || value === "skipped") { + return "optional"; + } return "idle"; } diff --git a/inferedgelab/studio/static/index.html b/inferedgelab/studio/static/index.html index a0d3159..14f525d 100644 --- a/inferedgelab/studio/static/index.html +++ b/inferedgelab/studio/static/index.html @@ -132,7 +132,7 @@ } } - +
@@ -275,6 +275,6 @@

Future Work

- + diff --git a/inferedgelab/studio/static/style.css b/inferedgelab/studio/static/style.css index 377f181..30f3712 100644 --- a/inferedgelab/studio/static/style.css +++ b/inferedgelab/studio/static/style.css @@ -261,6 +261,11 @@ body { color: var(--red); } +.state-pill.optional { + border-color: rgba(148, 163, 184, 0.28); + color: var(--muted); +} + .form-stack, .list-stack { display: grid; diff --git a/tests/test_studio_routes.py b/tests/test_studio_routes.py index 06f6bfc..9b84154 100644 --- a/tests/test_studio_routes.py +++ b/tests/test_studio_routes.py @@ -71,10 +71,13 @@ def test_studio_static_assets_include_redesigned_ui_contracts(): assert "responseErrorMessage" in app_text assert "runtimeModelName" in app_text assert "Same backend" in app_text + assert "hasImportedEvidence" in app_text + assert 'aiguard: hasGuardEvidence ? "completed" : "optional"' in app_text assert "#0b0f14" in style_text assert "grid-template-columns" in style_text assert ".form-stack button" in style_text assert ".tool-card" in style_text + assert ".state-pill.optional" in style_text def test_studio_app_preserves_selected_job_detail_contract():