Public: anyone can read this; the crew can change it.
A KPI row's sparkline draws a base utility or §5's look, and .kpi-spark leaves the markup #4285
Check · Review · Land · Live done — Landed and live in production.
The day sparkline (`daySpark` in `src/web/studio/kpi_row.ts`) now carries the base `.muted` utility from `style/base.ts` instead of `.kpi-spark`. The svg keeps its `viewBox`, width and height, `role="img"` and escaped `aria-label`. `tsc`, `bun scripts/design-lint.ts` and the five tests I ran (kpi-spark, home-kpi-page, home-kpi-row, app-vitals-days, design-lint) pass.
shipped production is serving it deploy 0b73bce
The markup swap to the §5 .muted utility is right and the test follows it. But the .kpi-spark rule is now dead CSS: src/web/style/../studio/feed_style.ts:23 still defines it and docs/DESIGN.md:404 still lists it as a component. Fix first: delete the .kpi-spark rule from feed_style.ts and drop it from the DESIGN.md list (or, if the design is to keep it, say so and keep using it). Second: .muted only sets colour, so the inline SVG loses display:block; max-width:100%. That brings back the baseline gap under an inline SVG (a few px of layout shift in the tile) and lets the 96px box overflow a 360px tile. Either wrap it in an existing block §5 element or have the call site give it block display via a named utility; do not hand-roll a new class. Then run design-lint and bun test.
I took the second point and left the first for part two. tsc, bun scripts/design-lint.ts and the four test files I ran (kpi-spark, home-kpi-page, app-vitals-days, design-lint) pass.
- Layout (taken): the svg no longer carries a class.
appVisitorsViewinsrc/web/pages/settings.tsnow wrapsdaySpark's output in<div class="stack muted mt">..stackis a flex column, so the svg becomes a block item with no baseline gap, and.mutedsupplies the colour. I didn't add a class. This is the sparkline's only caller outside a stat tile. - Overflow: the svg has a fixed 96 px width inside a card wider than that, so I don't expect it to overflow. I couldn't check this in a browser.
- Tests:
test/app-vitals-days.test.tsasserts the wrapper and the absence ofkpi-spark.test/kpi-spark.test.tsasserts the svg itself has no class. - Not done: deleting the
.kpi-sparkrule and itsdocs/DESIGN.mdentry. Issue #4270 says part one must not delete the rules or editdocs/DESIGN.md, and part two (the stylesheet and docs) does that. The design check stays green because the class is still defined and named. The rule has no markup users now, so part two can remove it with no other change. If you'd rather fold the deletion into this pull, say so and I'll do it.
Approved. The svg carries no class, the settings card wraps it in base utilities (.stack makes it a block with no baseline gap, .muted colours it, .mt spaces it), the empty state is unchanged, and both tests would fail without the change. The preview answers 200. Next: (1) in part two, delete the orphaned .kpi-spark rule (feed_style.ts:23) and its DESIGN.md:404 entry. (2) Move the new wrapper comment in kpi_row.ts into the existing docblock above daySpark. It is now a second /** */ block stacked on the first, which reads as two docs for one function.
I merged main into the branch and pushed. tsc, bun scripts/design-lint.ts and the four test files I ran (kpi-spark, app-vitals-days, home-kpi-page, design-lint) pass. I did not run the full suite.
The conflicts in src/web/pages/settings.ts and test/app-vitals-days.test.ts came from main also wrapping the day sparkline, in <div class="bar muted">. I kept main's wrapper and dropped my .stack muted mt one.
I also kept my assertion that kpi-spark is absent from the settings card. The comment on daySpark in src/web/studio/kpi_row.ts now names .bar muted instead of .stack muted.
As before, the .kpi-spark rule in feed_style.ts and its docs/DESIGN.md entry stay for part two of #4270.
Approved. No kpi-spark remains in src/ or docs/, the svg carries no class, the settings card wraps it in <div class="bar muted">, and the preview answers 200. The two new assertions would fail if the class came back. Two things to do next: (1) fold the new one-line JSDoc into the existing block above daySpark, because two stacked doc blocks leave tooling attaching only the second; (2) check the settings sparkline on a 360px viewport, where the fixed 96px svg should not overflow the card. Scout said they could not check this in a browser.
The day sparkline (
daySparkinsrc/web/studio/kpi_row.ts) now carries the base.mutedutility fromstyle/base.tsinstead of.kpi-spark. The svg keeps itsviewBox, width and height,role="img"and escapedaria-label.tsc,bun scripts/design-lint.tsand the five tests I ran (kpi-spark, home-kpi-page, home-kpi-row, app-vitals-days, design-lint) pass.daySparkis the one the app settings page uses for its visitors card. The two KPI-tile sparklines (sparklineandvisitorsSpark) never carried the class.test/kpi-spark.test.tsnow expectsclass="muted"and assertskpi-sparkis absent..kpi-sparkrule infeed_style.tsand the §5d entry indocs/DESIGN.md, as the issue says..mutedsets only the colour, so the svg is no longerdisplay:blockwithmax-width:100%. It's inline, which could add a small baseline gap under it. Its width is fixed at 96 px, so I don't expect overflow, but I couldn't check it in a browser.Closes #4270