App-wide theme-token & modal polish pass¶
Motivation¶
Following the sequence-builder modal overhaul, an app-wide audit (all screens +
modals, both the dark Grafana palette and the light VS Code palette) surfaced a
class of systemic issues: several CSS custom properties were referenced but
never defined, so they silently fell back to inherit or to dark-only hex
fallbacks that washed out in light mode; many inline styles used hardcoded
rgba(255,255,255,…) surfaces that are invisible on a white panel; a few used
bare monospace font literals that bypass the unified --font-mono token;
one badge was white-on-white in light mode; and the FASTA-templates modal had
no Escape-to-close.
User-facing change (30+ discrete fixes)¶
New / fixed design tokens (glass.css) — these alone correct ~80 render sites:
--text-secondary— was undefined (≈25 call sites fell back toinherit, flattening the text hierarchy and breaking active/inactive tab contrast). Now a real 3rd level:#c2c8d2dark /#3b3b3blight.--text— was undefined (~20 call sites relied oninheritby accident). Now aliased to--text-primary.--text-code— was undefined; the#c9d1d9fallback was illegible on the light code inset. Now#c9d1d9dark /#24292flight.--text-warning→ alias of--warning(the old#d29922fallback failed AA on white).--surface-2→ alias of--bg-tertiary(the oldrgba(255,255,255,0.06)fallback was invisible in light mode).--json-key/str/num/bool/nil/brace— new theme-aware JSON syntax-highlight tokens (dark inks + AA-legible light overrides); the API-reference JSON viewer was previously dark-only pastels, illegible on the light inset.- New
.glass-badge--accentmodifier (accent tint + border + text) for badges that must read on a white panel.
Per-component fixes (all hardcoded → theme tokens):
JobLine(×2) andConfirmDialog— baremonospaceliterals →--font-mono;ConfirmDialogconfirm input surfacergba/--surface-2fallback →--bg-tertiary.QuerySection— FASTA-templates badge →glass-badge--accent(was invisible in light); added Escape-to-close to the FASTA-templates dialog.JsonHighlight— 6 hardcoded hex colors → the new--json-*tokens.ResponseViewer(×2),BlastResultswarning banner,EndpointResponsesDoc(×2),ComputeSectionskeletons (×2),K8sJobsPanelzebra stripe,ClusterHeaderBand,AutoStopPanel(×2),StepRowskipped chip,WarmupSection(×5: row, skeleton, notice, progress track, chip),SequenceBlockswarning underline (#f0a868→--warning) — allrgba(255,255,255,…)/ dark-only hex → theme-aware tokens /color-mix.
SequenceBlocks' base-grid monospace was intentionally left (it needs a true
fixed-width font for column alignment, which the Inter-unified --font-mono
would break). The pod-logs / terminal consoles were left dark-on-purpose.
API / IaC diff summary¶
Frontend only: web/src/theme/glass.css (token + class additions) plus 14
component/page files swapping hardcoded values for tokens. No backend, API, or
IaC changes; no business logic touched.
Validation evidence¶
npm run build— succeeds;npx eslinton all 15 touched files — clean.npx vitest run src/pages/blastSubmit— 217 passed (incl. SequenceBuilderDialog).- Live host-mode check at
http://localhost:8090: confirmed the FASTA-templates badge is now visible in both dark and light themes, the modal renders correctly in light, and the newly-added Escape-to-close works. Theme restored to System afterwards.