diff --git a/frontend/src/app.ts b/frontend/src/app.ts index 6529f6c..4707314 100644 --- a/frontend/src/app.ts +++ b/frontend/src/app.ts @@ -94,7 +94,6 @@ const statusText = byId("statusText"); const inferenceSummary = byId("inferenceSummary"); const candidateList = byId("candidateList"); const eventLog = byId("eventLog"); -const viewerTitle = byId("viewerTitle"); const stepSlider = byId("stepSlider"); const stepValue = byId("stepValue"); const lossCanvas = byId("lossCanvas"); @@ -158,7 +157,7 @@ const state: AppState = { file: null, jobId: null, status: "idle", - statusText: "Drop a fake sprite in here and let the machine explain itself for once.", + statusText: "Waiting for input.", inputPreviewImage: null, sourceImage: null, preprocessedImage: null, @@ -431,9 +430,8 @@ function renderInference(): void { function renderMetrics(): void { metricsPanel.innerHTML = ""; const frame = getSelectedFrame(); - const items: Array<[string, string]> = []; + const items: Array<[string, string]> = [["Stage", state.currentStage]]; if (frame) { - items.push(["Frame", `${frame.step}/${frame.totalSteps}`]); items.push(["Loss", frame.loss === null ? "n/a" : formatNumber(frame.loss, 4)]); for (const [key, value] of Object.entries(frame.terms)) { items.push([key.replaceAll("_", " "), formatNumber(value, 4)]); @@ -445,8 +443,6 @@ function renderMetrics(): void { formatNumber(readNestedNumber(state.runSummary, ["source_fidelity", "final_output", "score"])), ]); items.push(["Source color ratio", formatNumber(readNestedNumber(state.runSummary, ["output_colors_from_source_ratio"]))]); - } else { - items.push(["Status", state.currentStage]); } for (const [label, value] of items) { const node = document.createElement("div"); @@ -485,7 +481,6 @@ async function renderViewer(): Promise { let leftLabel = "Source"; let middleLabel = "Edge Scout"; let rightLabel = "Output"; - let title = state.currentStage; if (state.latticeImage) { leftAsset = state.latticeImage; @@ -502,16 +497,13 @@ async function renderViewer(): Promise { leftLabel = "Sampling Overlay"; middleLabel = "Displacement"; rightLabel = "Current Output"; - title = frame.step === 0 ? "Initial nearest-sample placement" : `Solver step ${frame.step} / ${frame.totalSteps}`; } else if (state.cleanupImage) { middleAsset = state.heatmapImage ?? middleAsset; middleLabel = "Cleanup Heatmap"; rightAsset = state.cleanupImage; rightLabel = "Cleaned Output"; - title = state.finalOutputImage ? "Finalized output" : "Cleanup pass"; } - viewerTitle.textContent = title; leftVizLabel.textContent = leftLabel; middleVizLabel.textContent = middleLabel; rightVizLabel.textContent = rightLabel; diff --git a/src/repixelizer/gui_static/app.js b/src/repixelizer/gui_static/app.js index 1e3fead..7c9122e 100644 --- a/src/repixelizer/gui_static/app.js +++ b/src/repixelizer/gui_static/app.js @@ -17,7 +17,6 @@ const statusText = byId("statusText"); const inferenceSummary = byId("inferenceSummary"); const candidateList = byId("candidateList"); const eventLog = byId("eventLog"); -const viewerTitle = byId("viewerTitle"); const stepSlider = byId("stepSlider"); const stepValue = byId("stepValue"); const lossCanvas = byId("lossCanvas"); @@ -77,7 +76,7 @@ const state = { file: null, jobId: null, status: "idle", - statusText: "Drop a fake sprite in here and let the machine explain itself for once.", + statusText: "Waiting for input.", inputPreviewImage: null, sourceImage: null, preprocessedImage: null, @@ -330,9 +329,8 @@ function renderInference() { function renderMetrics() { metricsPanel.innerHTML = ""; const frame = getSelectedFrame(); - const items = []; + const items = [["Stage", state.currentStage]]; if (frame) { - items.push(["Frame", `${frame.step}/${frame.totalSteps}`]); items.push(["Loss", frame.loss === null ? "n/a" : formatNumber(frame.loss, 4)]); for (const [key, value] of Object.entries(frame.terms)) { items.push([key.replaceAll("_", " "), formatNumber(value, 4)]); @@ -346,9 +344,6 @@ function renderMetrics() { ]); items.push(["Source color ratio", formatNumber(readNestedNumber(state.runSummary, ["output_colors_from_source_ratio"]))]); } - else { - items.push(["Status", state.currentStage]); - } for (const [label, value] of items) { const node = document.createElement("div"); node.className = "metric-chip"; @@ -384,7 +379,6 @@ async function renderViewer() { let leftLabel = "Source"; let middleLabel = "Edge Scout"; let rightLabel = "Output"; - let title = state.currentStage; if (state.latticeImage) { leftAsset = state.latticeImage; leftLabel = "Lattice Prep"; @@ -400,16 +394,13 @@ async function renderViewer() { leftLabel = "Sampling Overlay"; middleLabel = "Displacement"; rightLabel = "Current Output"; - title = frame.step === 0 ? "Initial nearest-sample placement" : `Solver step ${frame.step} / ${frame.totalSteps}`; } else if (state.cleanupImage) { middleAsset = state.heatmapImage ?? middleAsset; middleLabel = "Cleanup Heatmap"; rightAsset = state.cleanupImage; rightLabel = "Cleaned Output"; - title = state.finalOutputImage ? "Finalized output" : "Cleanup pass"; } - viewerTitle.textContent = title; leftVizLabel.textContent = leftLabel; middleVizLabel.textContent = middleLabel; rightVizLabel.textContent = rightLabel; diff --git a/src/repixelizer/gui_static/index.html b/src/repixelizer/gui_static/index.html index b14e97b..d8e986c 100644 --- a/src/repixelizer/gui_static/index.html +++ b/src/repixelizer/gui_static/index.html @@ -127,24 +127,8 @@
-
-
-

Algorithm View

-

Pipeline Stages

-
-
- Instrument Panel -
- Idle -
-

Drop a fake sprite in here and let the machine explain itself for once.

-

Watch inference, edge scouting, field prep, solver drift, cleanup, then patch any stubborn pixels yourself.

-
-
-
- - - No frames yet +
+

Pipeline Stages

@@ -162,7 +146,20 @@
-
+
+
+
+ Idle +

Waiting for input.

+
+
+ + + No frames yet +
+
+
+
diff --git a/src/repixelizer/gui_static/styles.css b/src/repixelizer/gui_static/styles.css index a9ffe2a..531a113 100644 --- a/src/repixelizer/gui_static/styles.css +++ b/src/repixelizer/gui_static/styles.css @@ -262,8 +262,9 @@ p { .brand, .brand-lockup, .copy-stack, -.viewer-head-summary, -.viewer-status-panel { +.viewer-heading, +.viewer-metrics, +.metrics-status { display: grid; gap: 10px; } @@ -532,54 +533,35 @@ p { } .viewer-head { - display: grid; - grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); - gap: 18px 24px; - align-items: start; -} - -.viewer-head-summary { - display: grid; - grid-template-columns: minmax(220px, 260px) minmax(320px, 1fr); - gap: 18px 24px; - min-width: 0; - align-items: start; -} - -.viewer-title-block { - align-content: start; + display: flex; + justify-content: space-between; + align-items: flex-end; gap: 12px; } -.viewer-status-panel { - align-content: start; - gap: 8px; +.viewer-heading { min-width: 0; - padding-left: 20px; - border-left: 3px solid rgba(255, 216, 74, 0.22); + align-content: start; } -.viewer-status-row { - display: flex; - align-items: center; - gap: 10px; +.viewer-metrics { + gap: 12px; } -.viewer-status-label { - font-size: 0.74rem; - line-height: 1; - color: var(--ui-text-muted); - text-transform: uppercase; +.metrics-toolbar { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); + gap: 16px 20px; + align-items: start; } -.status-text { - max-width: 26ch; +.metrics-status { + min-width: 0; + align-content: start; } -.viewer-status-note { - font-size: 1rem; - line-height: 1.12; - max-width: 34ch; +.metrics-status-text { + max-width: 42ch; } .scrubber { @@ -587,8 +569,6 @@ p { display: grid; gap: 10px; align-content: start; - padding-left: 20px; - border-left: 3px solid rgba(255, 216, 74, 0.22); } .step-value { @@ -793,9 +773,8 @@ select:focus-visible { } @media (min-width: 1500px) { - .viewer-head-summary { - grid-template-columns: minmax(240px, auto) minmax(300px, 1fr); - align-items: start; + .metrics-toolbar { + grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); } } @@ -805,16 +784,9 @@ select:focus-visible { grid-template-columns: 1fr; } - .viewer-head { + .metrics-toolbar { grid-template-columns: 1fr; } - - .scrubber { - padding-left: 0; - padding-top: 14px; - border-left: 0; - border-top: 3px solid rgba(255, 216, 74, 0.22); - } } @media (max-width: 940px) { @@ -827,16 +799,8 @@ select:focus-visible { flex-wrap: wrap; } - .viewer-head-summary { - grid-template-columns: 1fr; - gap: 14px; - } - - .viewer-status-panel { - padding-left: 0; - padding-top: 12px; - border-left: 0; - border-top: 3px solid rgba(255, 216, 74, 0.22); + .viewer-head { + align-items: flex-start; } .brand-lockup {