@runwisp/ui 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -7
- package/src/lib/actions/portal.ts +0 -3
- package/src/lib/components/CronInput.svelte +0 -4
- package/src/lib/components/DataGrid.svelte +1 -3
- package/src/lib/components/Drawer.svelte +0 -3
- package/src/lib/components/Dropdown.svelte +2 -6
- package/src/lib/components/Modal.svelte +0 -3
- package/src/lib/components/Select.svelte +2 -5
- package/src/lib/components/StatusIndicator.svelte +0 -3
- package/src/lib/components/Tabs.svelte +0 -2
- package/src/lib/components/ToastContainer.svelte +0 -5
- package/src/lib/components/Tooltip.svelte +5 -2
- package/src/lib/components/dashboard/RunDetailPanel.svelte +133 -226
- package/src/lib/components/dashboard/RunFilterPopover.svelte +14 -14
- package/src/lib/components/dashboard/RunsList.svelte +29 -29
- package/src/lib/components/dashboard/run-filters.test.ts +31 -33
- package/src/lib/components/dashboard/run-filters.ts +33 -33
- package/src/lib/components/dashboard/run-helpers.test.ts +42 -17
- package/src/lib/components/dashboard/run-helpers.ts +53 -17
- package/src/lib/components/dashboard/status-config.ts +9 -8
- package/src/lib/utils/error.ts +0 -3
- package/src/lib/utils/format.test.ts +2 -6
- package/src/lib/utils/format.ts +28 -3
|
@@ -31,19 +31,14 @@
|
|
|
31
31
|
import { portal } from "../../actions/portal.js";
|
|
32
32
|
import type { Run } from "./types.js";
|
|
33
33
|
import type { LogEvent, LogSlice } from "../../log-console/types.js";
|
|
34
|
-
import {
|
|
35
|
-
formatDateTime,
|
|
36
|
-
formatFullDateTime,
|
|
37
|
-
formatClockTime,
|
|
38
|
-
formatCalendarDate,
|
|
39
|
-
formatTimeHM,
|
|
40
|
-
} from "../../utils/format.js";
|
|
34
|
+
import { formatClockTime, formatCalendarDate } from "../../utils/format.js";
|
|
41
35
|
import { formatShortId } from "../../utils/id.js";
|
|
42
36
|
import { TickingNow } from "../../utils/ticking-now.svelte.js";
|
|
43
37
|
import { getRunStatusConfig, runDisplayStatus } from "./status-config.js";
|
|
44
38
|
import {
|
|
45
39
|
runDuration,
|
|
46
40
|
runStartDelay,
|
|
41
|
+
runVerdict,
|
|
47
42
|
formatTriggeredByLabel,
|
|
48
43
|
runRetryLabel,
|
|
49
44
|
instanceSuffix,
|
|
@@ -204,41 +199,12 @@
|
|
|
204
199
|
}
|
|
205
200
|
}
|
|
206
201
|
|
|
207
|
-
//
|
|
208
|
-
//
|
|
209
|
-
//
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
if (displayed === "failed") return "non-zero";
|
|
214
|
-
if (displayed === "stopped" || displayed === "daemon_stopped") return "stopped before exit";
|
|
215
|
-
if (displayed === "timeout") return "timed out";
|
|
216
|
-
if (displayed === "crashed") return "killed";
|
|
217
|
-
return "no exit code";
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
// One-word context line under each Trigger value, mirroring the source.
|
|
221
|
-
function triggerSub(triggeredBy: Run["triggered_by"]): string {
|
|
222
|
-
if (triggeredBy === "cron") return "schedule";
|
|
223
|
-
if (triggeredBy === "api") return "manual";
|
|
224
|
-
if (triggeredBy === "service") return "supervised";
|
|
225
|
-
if (triggeredBy === "startup") return "on boot";
|
|
226
|
-
return "remote";
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// The status's accent color as a runtime CSS variable, used to wash the
|
|
230
|
-
// header in a faint tint of the outcome (the "black-box readout" look).
|
|
231
|
-
// Neutral statuses resolve to the surface itself, so the tint vanishes.
|
|
232
|
-
function accentVar(displayed: string): string {
|
|
233
|
-
if (displayed === "running" || displayed === "pending") return "var(--color-info)";
|
|
234
|
-
if (displayed === "success") return "var(--color-success-surface)";
|
|
235
|
-
if (
|
|
236
|
-
displayed === "stopped" ||
|
|
237
|
-
displayed === "timeout" ||
|
|
238
|
-
displayed === "daemon_stopped" ||
|
|
239
|
-
displayed === "queue_full"
|
|
240
|
-
)
|
|
241
|
-
return "var(--color-warning-surface)";
|
|
202
|
+
// The accent for a status that means "something to triage", or undefined
|
|
203
|
+
// when there is nothing wrong. Tint is reserved for alarms (DESIGN.md) so a
|
|
204
|
+
// failure is the one lit thing on the page — a deliberate stop or a skip is
|
|
205
|
+
// not a failure, and success least of all. Doubles as the switch for the
|
|
206
|
+
// verdict phrase's colour, so wash and wording light up together.
|
|
207
|
+
function alarmAccent(displayed: string): string | undefined {
|
|
242
208
|
if (
|
|
243
209
|
displayed === "failed" ||
|
|
244
210
|
displayed === "crashed" ||
|
|
@@ -247,7 +213,9 @@
|
|
|
247
213
|
displayed === "start_failed"
|
|
248
214
|
)
|
|
249
215
|
return "var(--color-danger-surface)";
|
|
250
|
-
|
|
216
|
+
if (displayed === "timeout" || displayed === "daemon_stopped" || displayed === "queue_full")
|
|
217
|
+
return "var(--color-warning-surface)";
|
|
218
|
+
return undefined;
|
|
251
219
|
}
|
|
252
220
|
|
|
253
221
|
function handleConsoleKeydown(event: KeyboardEvent) {
|
|
@@ -320,15 +288,16 @@
|
|
|
320
288
|
run.status === "running" ? durationTicker.now.getTime() : undefined,
|
|
321
289
|
)}
|
|
322
290
|
{@const startDelay = runStartDelay(run)}
|
|
323
|
-
{@const startedAt = run.
|
|
291
|
+
{@const startedAt = run.startAt ?? run.createdAt}
|
|
324
292
|
{@const retry = runRetryLabel(run)}
|
|
325
293
|
{@const paramEntries = run.params ? Object.entries(run.params) : []}
|
|
326
|
-
{@const suffix = instanceSuffix(run.
|
|
294
|
+
{@const suffix = instanceSuffix(run.instanceIndex, getInstanceCount(run.taskName))}
|
|
327
295
|
{@const spine = config.dot.replace(" animate-pulse", "")}
|
|
328
296
|
{@const isRunning = run.status === "running"}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
{@const
|
|
297
|
+
<!-- A code is worth the ink only when it is news: `exit 0` restates
|
|
298
|
+
"succeeded", while a non-zero code is the first thing to triage on. -->
|
|
299
|
+
{@const showCode = status === "failed"}
|
|
300
|
+
{@const verdict = runVerdict(status)}
|
|
332
301
|
{@const endLabel =
|
|
333
302
|
status === "stopped"
|
|
334
303
|
? "run stopped by operator"
|
|
@@ -341,7 +310,7 @@
|
|
|
341
310
|
status === "stopped" || status === "daemon_stopped" || status === "timeout"
|
|
342
311
|
? "warn"
|
|
343
312
|
: "muted"}
|
|
344
|
-
{@const
|
|
313
|
+
{@const alarm = alarmAccent(status)}
|
|
345
314
|
<!-- The panel: a status spine runs the full left edge across both the header
|
|
346
315
|
readout and the console below, hugging the rail divider (artifact
|
|
347
316
|
".detail .spine"). -->
|
|
@@ -352,95 +321,118 @@
|
|
|
352
321
|
class="absolute inset-y-0 left-0 z-[3] w-1 {spine} {isRunning ? 'spine-flow' : ''}"
|
|
353
322
|
aria-hidden="true"
|
|
354
323
|
></div>
|
|
355
|
-
<!-- Detailed header: a
|
|
356
|
-
run
|
|
324
|
+
<!-- Detailed header: a readout whose ink scales with how much went wrong.
|
|
325
|
+
Every run states its outcome in one phrase over one quiet fact line;
|
|
326
|
+
only a run worth triaging colours the phrase and tints the surface.
|
|
327
|
+
Nothing here is a fixed slot — every fact renders only when it is
|
|
328
|
+
true, so the header's height is itself a signal. -->
|
|
357
329
|
<div
|
|
358
330
|
class="head-region @container relative shrink-0 border-b border-outline-faint"
|
|
359
|
-
style="--rw-oc: {
|
|
331
|
+
style="--rw-oc: {alarm ?? 'var(--color-surface-raised)'}"
|
|
360
332
|
>
|
|
361
|
-
<div class="pt-[18px] pr-[22px] pb-[
|
|
333
|
+
<div class="pt-[18px] pr-[22px] pb-[16px] pl-[26px]">
|
|
362
334
|
<div class="flex items-start gap-4">
|
|
363
|
-
<!-- Verdict tile -->
|
|
364
|
-
<div
|
|
365
|
-
class="flex h-[38px] w-[38px] shrink-0 items-center justify-center rounded-[4px] {config.bg} {config.color} ring-1 ring-current/25 ring-inset"
|
|
366
|
-
>
|
|
367
|
-
<DetailIcon size={20} class={isRunning ? "animate-spin" : ""} />
|
|
368
|
-
</div>
|
|
369
|
-
|
|
370
335
|
<div class="min-w-0 flex-1">
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
336
|
+
<!-- Identity, but only where the page around the panel isn't
|
|
337
|
+
already saying it: the cross-task runs list needs the task
|
|
338
|
+
name, a task's own page already has it in the breadcrumb. -->
|
|
339
|
+
{#if showTaskName || suffix}
|
|
340
|
+
<div
|
|
341
|
+
class="mb-1.5 font-mono text-[11.5px] font-medium tracking-[0.06em] text-on-surface-muted"
|
|
342
|
+
>
|
|
343
|
+
{showTaskName ? `${run.taskName}${suffix}` : `instance ${suffix}`}
|
|
344
|
+
</div>
|
|
345
|
+
{/if}
|
|
346
|
+
|
|
347
|
+
<!-- Verdict: the outcome as one sentence, and the only large
|
|
348
|
+
type in the panel. It is prose, so the phrase is sans and
|
|
349
|
+
only the tokens inside it — the duration, a failing exit —
|
|
350
|
+
are mono (DESIGN.md's mono-vs-sans rule). The glyph is bare
|
|
351
|
+
— no plate, no ring — so it reads as part of the sentence,
|
|
352
|
+
and it alone carries the outcome colour on a healthy run:
|
|
353
|
+
green words are ink spent on nothing being wrong. -->
|
|
354
|
+
<Tooltip content={config.description} position="right" wide>
|
|
355
|
+
<h2
|
|
356
|
+
class="flex flex-wrap items-center gap-x-2.5 text-[22px] @max-2xl:text-[18px] @max-xs:text-[16px]"
|
|
357
|
+
data-testid="run-verdict"
|
|
358
|
+
data-status={status}
|
|
359
|
+
>
|
|
360
|
+
<DetailIcon
|
|
361
|
+
size={18}
|
|
362
|
+
strokeWidth={2.25}
|
|
363
|
+
class="shrink-0 {config.color} {isRunning
|
|
364
|
+
? 'animate-spin'
|
|
365
|
+
: ''}"
|
|
366
|
+
/>
|
|
367
|
+
<span
|
|
368
|
+
class="font-sans font-semibold tracking-[-0.01em] {alarm
|
|
369
|
+
? config.color
|
|
370
|
+
: 'text-on-surface'}">{verdict.verb}</span
|
|
371
|
+
>
|
|
372
|
+
{#if verdict.timed && duration}
|
|
373
|
+
<span
|
|
374
|
+
class="font-mono text-[0.86em] font-medium text-on-surface tabular-nums"
|
|
375
|
+
data-testid="run-duration">{duration}</span
|
|
376
|
+
>
|
|
377
|
+
{/if}
|
|
378
|
+
{#if showCode}
|
|
379
|
+
<!-- Grouped with its own separator so a wrap can
|
|
380
|
+
never leave the dot dangling at a line end. -->
|
|
381
|
+
<span
|
|
382
|
+
class="inline-flex items-center gap-x-2.5 font-mono text-[0.86em] font-medium tabular-nums"
|
|
383
|
+
>
|
|
384
|
+
<span class="text-on-surface-faint" aria-hidden="true"
|
|
385
|
+
>·</span
|
|
383
386
|
>
|
|
384
|
-
|
|
387
|
+
<span class="text-danger-surface" data-testid="run-exit"
|
|
388
|
+
>exit {run.exitCode}</span
|
|
389
|
+
>
|
|
390
|
+
</span>
|
|
385
391
|
{/if}
|
|
386
392
|
</h2>
|
|
387
|
-
|
|
388
|
-
outcome, so stopped reads amber, not red. -->
|
|
389
|
-
<Tooltip content={config.description} position="bottom" wide>
|
|
390
|
-
<span
|
|
391
|
-
class="rounded-[3px] border px-2.5 py-0.5 font-mono text-2xs font-bold tracking-wider uppercase {config.color} {config.bg} {config.border}"
|
|
392
|
-
>
|
|
393
|
-
{status.toUpperCase()}
|
|
394
|
-
</span>
|
|
395
|
-
</Tooltip>
|
|
396
|
-
</div>
|
|
393
|
+
</Tooltip>
|
|
397
394
|
|
|
395
|
+
<!-- Facts: when it happened and what shaped it. Queue wait,
|
|
396
|
+
retries and parameters are absent on an ordinary run and
|
|
397
|
+
appear inline the moment they exist. -->
|
|
398
398
|
<div
|
|
399
|
-
class="mt-
|
|
399
|
+
class="mt-2.5 flex flex-wrap items-center gap-x-2 gap-y-1 font-mono text-[11.5px] text-on-surface-faint tabular-nums"
|
|
400
400
|
>
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
{formatTimeHM(startedAt)}
|
|
408
|
-
</span>
|
|
409
|
-
{/if}
|
|
410
|
-
<!-- Run-id chip: click to copy the full ULID -->
|
|
411
|
-
<button
|
|
412
|
-
type="button"
|
|
413
|
-
onclick={() => copyRunId(run.id)}
|
|
414
|
-
title="Copy run ID"
|
|
415
|
-
class="inline-flex items-center gap-1.5 rounded-[3px] border border-outline-faint bg-surface-sunken px-1.5 py-0.5 font-mono text-2xs text-on-surface-faint hover:border-outline-hover hover:text-primary"
|
|
401
|
+
<!-- No hover-for-the-full-timestamp here: the date sits
|
|
402
|
+
right beside the clock time, so a tooltip could only
|
|
403
|
+
repeat it. The line wraps at narrow widths instead of
|
|
404
|
+
dropping the date and hiding it behind a hover. -->
|
|
405
|
+
<span data-testid="run-started" class="text-on-surface-muted"
|
|
406
|
+
>{run.startAt ? formatClockTime(run.startAt) : "—"}</span
|
|
416
407
|
>
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
408
|
+
<span class="text-outline-hover" aria-hidden="true">·</span>
|
|
409
|
+
<span>{formatCalendarDate(startedAt)}</span>
|
|
410
|
+
<span class="text-outline-hover" aria-hidden="true">·</span>
|
|
411
|
+
<span>via {formatTriggeredByLabel(run.triggeredBy).toLowerCase()}</span>
|
|
412
|
+
{#if startDelay}
|
|
413
|
+
<span class="text-outline-hover" aria-hidden="true">·</span>
|
|
414
|
+
<span
|
|
415
|
+
class="text-warning-soft-text"
|
|
416
|
+
title="Waited between its scheduled tick and actually starting"
|
|
417
|
+
>{startDelay} queued</span
|
|
418
|
+
>
|
|
419
|
+
{/if}
|
|
423
420
|
{#if retry}
|
|
424
|
-
<span class="
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
<span class="text-on-surface-faint"
|
|
430
|
-
>of run {formatShortId(run.retry_of_run_id)}</span
|
|
431
|
-
>{/if}
|
|
421
|
+
<span class="text-outline-hover" aria-hidden="true">·</span>
|
|
422
|
+
<span class="inline-flex items-center gap-1">
|
|
423
|
+
<RotateCw size={11} />
|
|
424
|
+
retry #{run.retryAttempt}{#if run.retryOfRunId} of
|
|
425
|
+
{formatShortId(run.retryOfRunId)}{/if}
|
|
432
426
|
</span>
|
|
433
427
|
{/if}
|
|
434
428
|
{#if paramEntries.length > 0}
|
|
435
|
-
<span class="
|
|
436
|
-
></span>
|
|
429
|
+
<span class="text-outline-hover" aria-hidden="true">·</span>
|
|
437
430
|
<Popover placement="bottom-start">
|
|
438
431
|
{#snippet trigger()}
|
|
439
432
|
<span
|
|
440
|
-
class="inline-flex cursor-pointer items-center gap-1
|
|
441
|
-
title="View run parameters"
|
|
433
|
+
class="inline-flex cursor-pointer items-center gap-1 border-b border-dotted border-outline-hover text-on-surface-muted hover:text-primary"
|
|
442
434
|
>
|
|
443
|
-
<SlidersHorizontal size={
|
|
435
|
+
<SlidersHorizontal size={11} />
|
|
444
436
|
{paramEntries.length}
|
|
445
437
|
{paramEntries.length === 1 ? "parameter" : "parameters"}
|
|
446
438
|
</span>
|
|
@@ -467,6 +459,21 @@
|
|
|
467
459
|
</div>
|
|
468
460
|
</Popover>
|
|
469
461
|
{/if}
|
|
462
|
+
<!-- Run-id chip: click to copy the full ULID. Last, because
|
|
463
|
+
it is the fact you reach for least and the only one you
|
|
464
|
+
interact with. -->
|
|
465
|
+
<button
|
|
466
|
+
type="button"
|
|
467
|
+
onclick={() => copyRunId(run.id)}
|
|
468
|
+
title="Copy run ID"
|
|
469
|
+
class="inline-flex items-center gap-1 rounded-[3px] border border-outline-faint bg-surface-sunken px-1.5 text-on-surface-faint hover:border-outline-hover hover:text-primary"
|
|
470
|
+
>
|
|
471
|
+
{#if copiedId}
|
|
472
|
+
<Check size={11} class="text-success-surface" />Copied
|
|
473
|
+
{:else}
|
|
474
|
+
<Hash size={11} />{run.id}
|
|
475
|
+
{/if}
|
|
476
|
+
</button>
|
|
470
477
|
</div>
|
|
471
478
|
</div>
|
|
472
479
|
|
|
@@ -595,9 +602,9 @@
|
|
|
595
602
|
{/if}
|
|
596
603
|
<a
|
|
597
604
|
href="/api/tasks/{encodeURIComponent(
|
|
598
|
-
run.
|
|
605
|
+
run.taskName,
|
|
599
606
|
)}/runs/{encodeURIComponent(run.id)}/log/raw"
|
|
600
|
-
download="{run.
|
|
607
|
+
download="{run.taskName}-{run.id}.log"
|
|
601
608
|
class="inline-flex items-center justify-center rounded-[3px] border border-outline-faint bg-surface-raised p-2 text-on-surface-muted hover:border-outline-hover hover:bg-surface-sunken hover:text-primary"
|
|
602
609
|
title="Download the full log (rotated and current parts as one file)"
|
|
603
610
|
aria-label="Download log"
|
|
@@ -647,107 +654,6 @@
|
|
|
647
654
|
{/if}
|
|
648
655
|
</div>
|
|
649
656
|
</div>
|
|
650
|
-
|
|
651
|
-
<!-- Instrument cluster: the run's vital readout — value over a one-word
|
|
652
|
-
context line, hairline-divided. -->
|
|
653
|
-
<div
|
|
654
|
-
class="mt-4 flex flex-wrap overflow-hidden rounded-[4px] border border-outline-faint bg-surface-raised"
|
|
655
|
-
>
|
|
656
|
-
<div
|
|
657
|
-
class="flex min-w-30 flex-1 flex-col gap-0.5 border-l border-outline-faint px-4 py-2.5 first:border-l-0"
|
|
658
|
-
>
|
|
659
|
-
<span
|
|
660
|
-
class="font-mono text-2xs font-bold tracking-[0.12em] text-on-surface-faint uppercase"
|
|
661
|
-
>Queued</span
|
|
662
|
-
>
|
|
663
|
-
<span
|
|
664
|
-
class="font-mono text-base font-medium tracking-tight whitespace-nowrap text-on-surface tabular-nums"
|
|
665
|
-
title={formatFullDateTime(run.created_at)}
|
|
666
|
-
>
|
|
667
|
-
{formatClockTime(run.created_at)}
|
|
668
|
-
</span>
|
|
669
|
-
<span class="font-mono text-2xs text-on-surface-muted"
|
|
670
|
-
>+{startDelay ?? "0s"} queued</span
|
|
671
|
-
>
|
|
672
|
-
</div>
|
|
673
|
-
|
|
674
|
-
<div
|
|
675
|
-
class="flex min-w-30 flex-1 flex-col gap-0.5 border-l border-outline-faint px-4 py-2.5 first:border-l-0"
|
|
676
|
-
>
|
|
677
|
-
<span
|
|
678
|
-
class="font-mono text-2xs font-bold tracking-[0.12em] text-on-surface-faint uppercase"
|
|
679
|
-
>Started</span
|
|
680
|
-
>
|
|
681
|
-
<span
|
|
682
|
-
class="font-mono text-base font-medium tracking-tight whitespace-nowrap text-on-surface tabular-nums"
|
|
683
|
-
>
|
|
684
|
-
{run.start_at ? formatClockTime(run.start_at) : "—"}
|
|
685
|
-
</span>
|
|
686
|
-
<span class="font-mono text-2xs text-on-surface-muted">
|
|
687
|
-
{run.start_at ? formatCalendarDate(run.start_at) : "not started"}
|
|
688
|
-
</span>
|
|
689
|
-
</div>
|
|
690
|
-
|
|
691
|
-
<div
|
|
692
|
-
class="flex min-w-30 flex-1 flex-col gap-0.5 border-l border-outline-faint px-4 py-2.5 first:border-l-0"
|
|
693
|
-
>
|
|
694
|
-
<span
|
|
695
|
-
class="font-mono text-2xs font-bold tracking-[0.12em] text-on-surface-faint uppercase"
|
|
696
|
-
>Ran for</span
|
|
697
|
-
>
|
|
698
|
-
<span
|
|
699
|
-
class="font-mono text-base font-medium tracking-tight whitespace-nowrap text-on-surface tabular-nums"
|
|
700
|
-
>
|
|
701
|
-
{duration ?? "—"}
|
|
702
|
-
</span>
|
|
703
|
-
<span class="font-mono text-2xs text-on-surface-muted">
|
|
704
|
-
{isRunning ? "and counting" : run.end_at ? "wall clock" : "—"}
|
|
705
|
-
</span>
|
|
706
|
-
</div>
|
|
707
|
-
|
|
708
|
-
<div
|
|
709
|
-
class="flex min-w-30 flex-1 flex-col gap-0.5 border-l border-outline-faint px-4 py-2.5 first:border-l-0"
|
|
710
|
-
>
|
|
711
|
-
<span
|
|
712
|
-
class="font-mono text-2xs font-bold tracking-[0.12em] text-on-surface-faint uppercase"
|
|
713
|
-
>Exit</span
|
|
714
|
-
>
|
|
715
|
-
<span
|
|
716
|
-
class="flex items-baseline gap-1.5 font-mono text-base font-medium tracking-tight tabular-nums {exitClean
|
|
717
|
-
? 'text-success-surface'
|
|
718
|
-
: exitFail
|
|
719
|
-
? 'text-danger-surface'
|
|
720
|
-
: 'text-on-surface'}"
|
|
721
|
-
>
|
|
722
|
-
<span>{showCode ? run.exit_code : "—"}</span>
|
|
723
|
-
{#if exitFail}
|
|
724
|
-
<span
|
|
725
|
-
class="rounded-[3px] bg-danger-soft px-1 py-px font-mono text-[9px] font-bold tracking-wide text-danger-surface uppercase"
|
|
726
|
-
>fail</span
|
|
727
|
-
>
|
|
728
|
-
{/if}
|
|
729
|
-
</span>
|
|
730
|
-
<span class="font-mono text-2xs text-on-surface-muted"
|
|
731
|
-
>{exitSubLabel(status)}</span
|
|
732
|
-
>
|
|
733
|
-
</div>
|
|
734
|
-
|
|
735
|
-
<div
|
|
736
|
-
class="flex min-w-30 flex-1 flex-col gap-0.5 border-l border-outline-faint px-4 py-2.5 first:border-l-0"
|
|
737
|
-
>
|
|
738
|
-
<span
|
|
739
|
-
class="font-mono text-2xs font-bold tracking-[0.12em] text-on-surface-faint uppercase"
|
|
740
|
-
>Trigger</span
|
|
741
|
-
>
|
|
742
|
-
<span
|
|
743
|
-
class="font-mono text-base font-medium tracking-tight whitespace-nowrap text-on-surface tabular-nums"
|
|
744
|
-
>{formatTriggeredByLabel(run.triggered_by)}</span
|
|
745
|
-
>
|
|
746
|
-
<span class="font-mono text-2xs text-on-surface-muted"
|
|
747
|
-
>{triggerSub(run.triggered_by)}</span
|
|
748
|
-
>
|
|
749
|
-
</div>
|
|
750
|
-
</div>
|
|
751
657
|
</div>
|
|
752
658
|
</div>
|
|
753
659
|
|
|
@@ -775,7 +681,7 @@
|
|
|
775
681
|
<span class="flex min-w-0 items-center gap-2">
|
|
776
682
|
<span class="h-2 w-2 shrink-0 rounded-full {spine}"></span>
|
|
777
683
|
<span class="truncate font-medium text-[var(--rw-con-text)]">
|
|
778
|
-
{run.
|
|
684
|
+
{run.taskName}{suffix}
|
|
779
685
|
</span>
|
|
780
686
|
<span class="text-[var(--rw-con-gutter)]">·</span>
|
|
781
687
|
<span class="font-semibold capitalize {config.color}">{status}</span>
|
|
@@ -869,11 +775,12 @@
|
|
|
869
775
|
{/if}
|
|
870
776
|
|
|
871
777
|
<style>
|
|
872
|
-
/*
|
|
873
|
-
|
|
874
|
-
mix collapses to a plain surface
|
|
778
|
+
/* Only a run worth triaging is washed in its outcome colour (--rw-oc, set
|
|
779
|
+
inline). Everything else — success included — passes the surface itself so
|
|
780
|
+
the mix collapses to a plain surface, which is what lets a genuine failure
|
|
781
|
+
be the one lit thing on the page. */
|
|
875
782
|
.head-region {
|
|
876
|
-
background: color-mix(in srgb, var(--rw-oc)
|
|
783
|
+
background: color-mix(in srgb, var(--rw-oc) 7%, var(--color-surface-raised));
|
|
877
784
|
}
|
|
878
785
|
|
|
879
786
|
/* Gentle fade for the maximize backdrop; disabled under reduced motion. */
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
|
|
66
66
|
let advancedOpen = $state(false);
|
|
67
67
|
|
|
68
|
-
const count = $derived(activeFilterCount(filters) + (showTask && filters.
|
|
68
|
+
const count = $derived(activeFilterCount(filters) + (showTask && filters.taskName ? 1 : 0));
|
|
69
69
|
|
|
70
70
|
const headerClass =
|
|
71
71
|
"font-mono text-xs font-semibold tracking-[0.14em] text-on-surface-muted uppercase";
|
|
@@ -103,37 +103,37 @@
|
|
|
103
103
|
// both captures the whole day.
|
|
104
104
|
|
|
105
105
|
function setFrom(value: string) {
|
|
106
|
-
filters = { ...filters,
|
|
106
|
+
filters = { ...filters, createdAfter: value ? dayStartIso(value) : undefined };
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
function setTo(value: string) {
|
|
110
|
-
filters = { ...filters,
|
|
110
|
+
filters = { ...filters, createdBefore: value ? dayEndIso(value) : undefined };
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
// --- Other dimensions -------------------------------------------------
|
|
114
114
|
|
|
115
115
|
function setTask(value: string) {
|
|
116
|
-
filters = { ...filters,
|
|
116
|
+
filters = { ...filters, taskName: value || undefined };
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
function setTrigger(value: string) {
|
|
120
|
-
filters = { ...filters,
|
|
120
|
+
filters = { ...filters, triggeredBy: value || undefined };
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
// Exit code: a free-form expression (`137`, `>100`, `>100 <150`) normalized
|
|
124
124
|
// to an inclusive range at the wire. Edited in a local buffer for smooth
|
|
125
125
|
// typing and committed on change; the popover content remounts on each open,
|
|
126
126
|
// so the buffer re-seeds from `filters` every time it opens.
|
|
127
|
-
let exitCodeInput = $state(filters.
|
|
127
|
+
let exitCodeInput = $state(filters.exitCode ?? "");
|
|
128
128
|
const exitCodeValid = $derived(isExitCodeExprValid(exitCodeInput));
|
|
129
129
|
|
|
130
130
|
function commitExitCode() {
|
|
131
131
|
const trimmed = exitCodeInput.trim();
|
|
132
|
-
filters = { ...filters,
|
|
132
|
+
filters = { ...filters, exitCode: trimmed || undefined };
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
function setRetriesOnly(checked: boolean) {
|
|
136
|
-
filters = { ...filters,
|
|
136
|
+
filters = { ...filters, retriesOnly: checked ? true : undefined };
|
|
137
137
|
}
|
|
138
138
|
</script>
|
|
139
139
|
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
</details>
|
|
213
213
|
</section>
|
|
214
214
|
|
|
215
|
-
<!-- Date range (filters on
|
|
215
|
+
<!-- Date range (filters on createdAt). Independent From/To bounds: a
|
|
216
216
|
bare date is that day's 00:00 (From) or its end (To), so either edge
|
|
217
217
|
applies on its own and the same date in both captures the day. -->
|
|
218
218
|
<section class="flex flex-col gap-2">
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
<span class={labelClass}>From</span>
|
|
223
223
|
<input
|
|
224
224
|
type="date"
|
|
225
|
-
value={filters.
|
|
225
|
+
value={filters.createdAfter ? isoToDayInput(filters.createdAfter) : ""}
|
|
226
226
|
onchange={(e) => setFrom(e.currentTarget.value)}
|
|
227
227
|
class={selectClass}
|
|
228
228
|
/>
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
<span class={labelClass}>To</span>
|
|
232
232
|
<input
|
|
233
233
|
type="date"
|
|
234
|
-
value={filters.
|
|
234
|
+
value={filters.createdBefore ? isoToDayInput(filters.createdBefore) : ""}
|
|
235
235
|
onchange={(e) => setTo(e.currentTarget.value)}
|
|
236
236
|
class={selectClass}
|
|
237
237
|
/>
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
<span class={headerClass}>Task</span>
|
|
246
246
|
<select
|
|
247
247
|
class={selectClass}
|
|
248
|
-
value={filters.
|
|
248
|
+
value={filters.taskName ?? ""}
|
|
249
249
|
onchange={(e) => setTask(e.currentTarget.value)}
|
|
250
250
|
>
|
|
251
251
|
<option value="">Any task</option>
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
<span class={headerClass}>Triggered by</span>
|
|
262
262
|
<select
|
|
263
263
|
class={selectClass}
|
|
264
|
-
value={filters.
|
|
264
|
+
value={filters.triggeredBy ?? ""}
|
|
265
265
|
onchange={(e) => setTrigger(e.currentTarget.value)}
|
|
266
266
|
>
|
|
267
267
|
<option value="">Any trigger</option>
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
<span class={headerClass}>Retries</span>
|
|
297
297
|
<Toggle
|
|
298
298
|
size="sm"
|
|
299
|
-
checked={Boolean(filters.
|
|
299
|
+
checked={Boolean(filters.retriesOnly)}
|
|
300
300
|
label="Only retried runs"
|
|
301
301
|
onchange={setRetriesOnly}
|
|
302
302
|
/>
|