Skip to content

feat: data-viz signal redesign for Today's Pulse (deviation bars + recessed surface) - #49

Merged
pitimon merged 1 commit into
mainfrom
feat/pulse-dataviz-signals
Jul 6, 2026
Merged

feat: data-viz signal redesign for Today's Pulse (deviation bars + recessed surface)#49
pitimon merged 1 commit into
mainfrom
feat/pulse-dataviz-signals

Conversation

@pitimon

@pitimon pitimon commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

Reworks the Pulse card's signal system on professional data-viz principles (mockups). Two design smells fixed: the "attention" colour was the same amber as the accent (so a spike blended in), and a drop was greyed to nothing.

  • Deviation bars replace ±%-text: each delta diverges from a centre "normal" line — side = direction, length = magnitude, so +142% visibly outweighs +19%. A drop is now a visible left bar.
  • Colour by job (palette run through the dataviz validator — CVD-safe, contrast checked on the actual recessed surfaces, per theme):
    • Tokens / Cost = value-neutral → cool-blue slate (amber's complement — pops off the card), darker tone for a big swing. No good/bad.
    • $/MTok = a verdict → reserved green/red + arrow (never colour-alone). New --pulse-good/bad tuned per theme (light green #10b981 was 2.24:1 on the light surface → dropped to #059669 at ≥3:1).
  • Recessed "readout well" surface (darker + inset shadow + 2px amber top-rail) replaces the amber wash — distinguished by surface hierarchy, not a tint, so the marks stay loudest and amber is freed to be structure only.
  • Signal logic extracted to a pure, unit-tested lib/pulse-mark.ts (magnitude cap ±200%, direction, tone, flat/missing guards). Day-progress gauge kept.

Test plan

  • pulse-mark unit tests (8): tone by kind, magnitude half-scale + cap, drop-visible, price arrows, null/flat guards, toneVar mapping
  • Full dashboard vitest: 294 pass (+8)
  • ci:local green — root 775, copy, ui-hardcode unchanged (all colour now in CSS vars, none hardcoded in JSX), guardrails 4/4
  • Palette validated (validate_palette.js) on the real surfaces both themes: dark CVD ΔE 18.5 / light 24.1, contrast ≥3:1
  • Live both themes (local serve): recessed surface (#0b1017 dark / #eef1f7 light), blue usage bars + neutral-strong for big swings, red $/MTok, amber top-rail + gauge
  • Post-merge: fold into 0.39.34 release

Reworks the Pulse card's signal system on data-viz principles: colour
follows each metric's JOB, magnitude becomes a mark, and the accent stops
carrying signal.

- Deviation bars replace ±%-text: each delta is a bar diverging from a
  centre "normal" line — side = direction, length = magnitude, so +142%
  visibly outweighs +19% (the old text weighted them the same). A drop is
  now visible instead of greyed out.
- Colour by job (palette validated with the dataviz validator — CVD-safe,
  contrast checked on the actual surfaces, per theme):
  · Tokens/Cost are value-neutral → cool-blue slate (amber's complement,
    so it pops off the card), darker for a large swing. No good/bad.
  · $/MTok carries a verdict → reserved green/red + an arrow (never
    colour-alone). New --pulse-good/bad tuned per theme for the surface.
- Recessed "readout well" card surface (darker + inset + a 2px amber
  top-rail) replaces the amber wash — the card is distinguished by surface
  hierarchy, not a full tint, so the marks stay the loudest thing and the
  amber accent is freed to be structure only.
- Signal logic extracted to a pure, unit-tested lib/pulse-mark.ts
  (magnitude cap, direction, tone, flat/missing guards). Day-progress
  gauge kept (amber = the day axis, distinct from the blue bars).
@pitimon
pitimon merged commit 2be7bc9 into main Jul 6, 2026
1 check passed
@pitimon
pitimon deleted the feat/pulse-dataviz-signals branch July 6, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant