Skip to content

Commit c2bcb75

Browse files
committed
fix(v7-q10): RunResultModal dark-theme contrast matches HelpModal
The Pipeline result modal was rendering as a white card on a dark app, with #6b7280 muted-grey text and very-low-contrast #f9fafb / #fef2f2 / #f3f4f6 row backgrounds. On a dark canvas it looked like faint blue stripes — operator couldn't read the stage list. Re-skin to match HelpModal (#22d3ee cyan title, #e2e8f0 light body, #94a3b8 muted, dark-blue blurred surface): - backdrop: rgba(15,23,42,0.75) + backdropFilter blur(8) - modal: rgba(30,41,59,0.97) + 1px rgba(255,255,255,0.1) border + borderRadius 12 + same boxShadow as HelpModal - title h3: #22d3ee + letterSpacing 0.2px - close button: circular rgba(255,255,255,0.05) + light text - header bottom border: rgba(255,255,255,0.1) - table head row border: rgba(255,255,255,0.15) - table row borders: rgba(255,255,255,0.08) - isFirstFailed row tint: rgba(220,38,38,0.18) + 2px outline rgba(248,113,113,0.7) — readable red on dark - expanded-row background: rgba(15,23,42,0.6) — dark-blue panel - th label: #94a3b8 (muted) - td body: #e2e8f0 (high-contrast light) - dt metric label: #94a3b8 (was #6b7280, invisible on dark) Status pill colors (ok=green, fail=red, skipped=grey, cancelled= amber) unchanged — already high-contrast on the new dark surface. Regression: vbgui vitest 474 -> 483 PASS (RunResultModal 18/18, no test depends on the old white background).
1 parent db829a4 commit c2bcb75

1 file changed

Lines changed: 59 additions & 24 deletions

File tree

vbgui/src/components/RunResultModal.tsx

Lines changed: 59 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function ExtrasEntry({
100100
if (Array.isArray(v)) {
101101
return (
102102
<div style={{ display: "flex", gap: 8 }}>
103-
<dt style={{ color: "#6b7280", minWidth: 140 }}>{k}</dt>
103+
<dt style={{ color: "#94a3b8", minWidth: 140 }}>{k}</dt>
104104
<dd style={{ margin: 0 }}>
105105
<ol data-testid={base}
106106
style={{ margin: 0, padding: "0 0 0 16px",
@@ -125,7 +125,7 @@ function ExtrasEntry({
125125
// prefix the test framework already expects.
126126
return (
127127
<div style={{ display: "flex", gap: 8 }}>
128-
<dt style={{ color: "#6b7280", minWidth: 140 }}>{k}</dt>
128+
<dt style={{ color: "#94a3b8", minWidth: 140 }}>{k}</dt>
129129
<dd style={{ margin: 0 }}>
130130
<dl data-testid={base}
131131
style={{ margin: 0, paddingLeft: 8 }}>
@@ -139,7 +139,7 @@ function ExtrasEntry({
139139
}
140140
return (
141141
<div style={{ display: "flex", gap: 8 }}>
142-
<dt style={{ color: "#6b7280", minWidth: 140 }}>{k}</dt>
142+
<dt style={{ color: "#94a3b8", minWidth: 140 }}>{k}</dt>
143143
<dd data-testid={base} style={{ margin: 0 }}>
144144
{v === null || v === undefined ? "null" : String(v)}
145145
</dd>
@@ -178,31 +178,57 @@ export function RunResultModal({
178178
role="dialog" aria-modal="true"
179179
onClick={onClose}
180180
style={{
181-
position: "fixed", inset: 0, background: "rgba(15,23,42,0.45)",
181+
position: "fixed", inset: 0,
182+
// V7-Q10: match HelpModal — dark+blur backdrop.
183+
background: "rgba(15, 23, 42, 0.75)",
184+
backdropFilter: "blur(8px)",
182185
display: "flex", alignItems: "center", justifyContent: "center",
183186
zIndex: 50, fontFamily: "system-ui, sans-serif",
184187
}}>
185188
<div data-testid="run-result-modal"
186189
onClick={(e) => e.stopPropagation()}
187190
style={{
188-
background: "white", borderRadius: 6, padding: 16,
189-
minWidth: 540, maxWidth: 720, maxHeight: "80vh",
191+
// V7-Q10: dark theme matching HelpModal — operator reads
192+
// the pipeline result on the same surface they read help
193+
// on. Light text on dark for contrast.
194+
background: "rgba(30, 41, 59, 0.97)",
195+
backdropFilter: "blur(16px)",
196+
border: "1px solid rgba(255, 255, 255, 0.1)",
197+
borderRadius: 12,
198+
padding: 20,
199+
minWidth: 540, maxWidth: 720, maxHeight: "85vh",
190200
overflowY: "auto",
201+
color: "#e2e8f0",
202+
boxShadow: "0 20px 40px rgba(0, 0, 0, 0.5), "
203+
+ "0 0 0 1px rgba(255, 255, 255, 0.05)",
191204
}}>
192-
<header style={{ display: "flex", justifyContent: "space-between",
193-
alignItems: "center", marginBottom: 12 }}>
194-
<h3 data-testid="run-result-title" style={{ margin: 0, fontSize: 14 }}>
205+
<header style={{ display: "flex",
206+
justifyContent: "space-between",
207+
alignItems: "center",
208+
marginBottom: 14, paddingBottom: 10,
209+
borderBottom: "1px solid rgba(255,255,255,0.1)" }}>
210+
<h3 data-testid="run-result-title"
211+
style={{ margin: 0, fontSize: 15, fontWeight: 700,
212+
color: "#22d3ee", letterSpacing: "0.2px" }}>
195213
Pipeline result{" "}
196214
<span data-testid="run-result-overall"
197215
style={{ color: report
198216
? COLORS[report.overall_status]
199-
: COLORS.fail }}>
217+
: COLORS.fail,
218+
fontWeight: 600 }}>
200219
{report ? ${report.overall_status} · ` +
201-
`${report.total_elapsed_ms.toFixed(1)} ms`
220+
`${(report.total_elapsed_ms ?? 0).toFixed(1)} ms`
202221
: "· error"}
203222
</span>
204223
</h3>
205-
<button data-testid="run-result-close" onClick={onClose}>×</button>
224+
<button data-testid="run-result-close" onClick={onClose}
225+
style={{
226+
background: "rgba(255,255,255,0.05)",
227+
border: "1px solid rgba(255,255,255,0.1)",
228+
borderRadius: "50%",
229+
width: 30, height: 30, color: "#e2e8f0",
230+
cursor: "pointer", fontSize: 16, lineHeight: 1,
231+
}}>×</button>
206232
</header>
207233

208234
{normalizedError && (
@@ -211,12 +237,13 @@ export function RunResultModal({
211237
</div>
212238
)}
213239

214-
{report && (
240+
{report && report.stages && (
215241
<table data-testid="run-result-stages"
216242
style={{ width: "100%", fontSize: 12,
217243
borderCollapse: "collapse" }}>
218244
<thead>
219-
<tr style={{ borderBottom: "1px solid #e5e7eb" }}>
245+
<tr style={{ borderBottom:
246+
"1px solid rgba(255,255,255,0.15)" }}>
220247
<th style={th}></th>
221248
<th style={th}>Stage</th>
222249
<th style={th}>Status</th>
@@ -237,14 +264,15 @@ export function RunResultModal({
237264
data-first-failed={isFirstFailed
238265
? "true" : undefined}
239266
style={{
240-
borderBottom: "1px solid #f3f4f6",
267+
borderBottom:
268+
"1px solid rgba(255,255,255,0.08)",
241269
// V7-L47: visual highlight on the first
242-
// failing row so the user sees it without
243-
// scrolling.
270+
// failing row — dark-mode compatible red tint.
244271
background: isFirstFailed
245-
? "#fef2f2" : undefined,
272+
? "rgba(220,38,38,0.18)" : undefined,
246273
outline: isFirstFailed
247-
? "2px solid #fca5a5" : undefined,
274+
? "2px solid rgba(248,113,113,0.7)"
275+
: undefined,
248276
outlineOffset: isFirstFailed ? -2 : undefined,
249277
}}>
250278
<td style={td}>
@@ -293,7 +321,7 @@ export function RunResultModal({
293321
</tr>
294322
{open && s.error && (
295323
<tr data-testid={`run-result-detail-${s.name}`}>
296-
<td colSpan={5} style={{ ...td, background: "#f9fafb",
324+
<td colSpan={5} style={{ ...td, background: "rgba(15,23,42,0.6)",
297325
fontFamily: "monospace",
298326
fontSize: 11 }}>
299327
<strong>{s.error.type ?? "Error"}</strong>:{" "}
@@ -303,7 +331,7 @@ export function RunResultModal({
303331
)}
304332
{open && hasExtras && (
305333
<tr data-testid={`run-result-extras-row-${s.name}`}>
306-
<td colSpan={5} style={{ ...td, background: "#f9fafb",
334+
<td colSpan={5} style={{ ...td, background: "rgba(15,23,42,0.6)",
307335
padding: "6px 12px" }}>
308336
{s.name === "train" && Array.isArray(extras.losses)
309337
&& extras.losses.length > 0 && (
@@ -356,6 +384,13 @@ function toggle(set: Set<string>, setter: (s: Set<string>) => void,
356384
setter(next);
357385
}
358386

359-
const th: React.CSSProperties = { textAlign: "left", padding: "4px 6px",
360-
color: "#6b7280", fontWeight: 600 };
361-
const td: React.CSSProperties = { padding: "4px 6px" };
387+
// V7-Q10: dark-modal palette. Light muted for table headings,
388+
// bright light for cell text so contrast is readable on
389+
// rgba(30,41,59,0.97) modal background.
390+
const th: React.CSSProperties = {
391+
textAlign: "left", padding: "4px 6px",
392+
color: "#94a3b8", fontWeight: 600,
393+
};
394+
const td: React.CSSProperties = {
395+
padding: "4px 6px", color: "#e2e8f0",
396+
};

0 commit comments

Comments
 (0)