Home

boring / v2

publicBoring-Software-Inc/v2
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

TRP-83 feat(economics): dither-kit spend chart, as a full embed image

3 months ago

5e03d50
Authored
grim7/26/2026, 5:13:03 AM
Swaps the plain line sparkline for an ordered-dither AREA chart matching the
dither-kit house style, and moves it from the embed thumbnail to a full-width
image below the fields.

- renderDitherChart (@tripwire/utils): ports the dither-kit's exact Bayer 4x4
  ordered-dither into the server PNG renderer. Each column fills from its value
  line to the floor with the Bayer scatter (dense at the floor, dissolving up to
  a soft value-line border), varying only alpha. Painted into a low-res backing
  buffer then nearest-neighbor upscaled, so the cells stay chunky and pixelated —
  same pipeline as the web charts. Actual paints behind, billed rides on top
  thinned so the layer behind reads through.
- embed.image (was embed.thumbnail): the chart renders large under the grid.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Parent6ba3a58

4 files changed
  • apps/worker/src/jobs/economics-digest.ts+8−6
  • packages/utils/src/index.ts+2−0
  • packages/utils/src/sparkline-png.test.ts+31−1
  • packages/utils/src/sparkline-png.ts+123−0