Files
rarelens/web/src/app.css
T
Kemal Yaylali 33e788122b feat(web): show what the pipeline is doing while a job runs
"running" for two and a half minutes tells the user nothing. The job page now shows a
spinner, the elapsed time, and the pipeline step Nextflow is actually on.

- the API streams the Nextflow output into jobs.log as it arrives, instead of keeping it
  only when the run dies. Writes are throttled to one every 3s, or immediately when a new
  process starts, and are skipped for a job that has already finished, so a late line
  cannot overwrite the loader's result.
- web/src/lib/progress.ts formats the elapsed time and picks the latest [PROCESS] line.
  No percentage: the pipeline cannot honestly estimate one.
- the spinner animates only under prefers-reduced-motion: no-preference.

Verified on a live run: the page showed "VEP (tiny)" for the duration, then the variant
table replaced it on success.

Tests: api 53, web 20; ruff, mypy, svelte-check clean.
2026-09-12 07:46:44 +01:00

43 lines
2.6 KiB
CSS

/* Palette: pale slate paper, ink navy, and one plum accent reserved for pathogenicity. */
:root {
--paper: #f3f5f7;
--ink: #16243a;
--ink-soft: #52627a;
--line: #cfd6df;
--plum: #7a1f5c;
--plum-soft: #f0dbe8;
--amber: #b86a00;
--mono: 'JetBrains Mono', ui-monospace, monospace;
--sans: 'Source Sans 3', system-ui, sans-serif;
}
html { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; }
body { margin: 0; }
main { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem; }
h1 { font-weight: 600; font-size: 2rem; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
h2 { font-weight: 600; font-size: 1.25rem; margin: 2rem 0 0.75rem; }
p.lede { color: var(--ink-soft); max-width: 60ch; margin: 0 0 2rem; }
a { color: var(--plum); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }
button { font: inherit; padding: 0.5rem 1rem; border: 1.5px solid var(--ink); background: var(--ink); color: white; border-radius: 4px; cursor: pointer; }
button.quiet { background: transparent; color: var(--ink); }
input, select { font: inherit; padding: 0.45rem 0.6rem; border: 1.5px solid var(--line); border-radius: 4px; background: white; }
table { width: 100%; border-collapse: collapse; background: white; border: 1px solid var(--line); }
th, td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--ink-soft); }
td.coord, td.hgvs { font-family: var(--mono); font-size: 0.85rem; } /* aligned digits matter here */
.score { display: inline-block; min-width: 3.2rem; text-align: right; padding: 0.1rem 0.4rem; border-radius: 3px; font-variant-numeric: tabular-nums; }
.score.high { background: var(--plum); color: white; }
.score.mid { background: var(--plum-soft); color: var(--plum); }
.empty { padding: 2rem; border: 1.5px dashed var(--line); color: var(--ink-soft); }
.status { font-weight: 600; }
.status.failed { color: #9a1b1b; }
.status.running, .status.queued { color: var(--amber); }
.progress { display: flex; align-items: center; gap: 0.6rem; color: var(--ink-soft); margin: 0.25rem 0 1rem; }
.progress .hgvs { font-size: 0.85rem; }
.spinner { width: 0.9rem; height: 0.9rem; flex: none; border: 2px solid var(--line); border-top-color: var(--plum); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
button { transition: background 120ms; }
.spinner { animation: spin 0.9s linear infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }