A user installed the Day card and found it looked nothing like the
receipt in https://x.com/jasonaxb/status/2119432517170430196, and asked
for the same look. The card is now that receipt, with magpie's words in
place of the original's own:
- cream paper over a teal-to-mint ground, a zigzag torn bottom edge
and a soft shadow; heavy monospace, letter-spaced labels and dashed
rules;
- DATE and ISSUED, then the TOTAL API COST (API-equivalent, not an
invoice), then STREAK, REQUESTS, ERRORS (only when there were any)
and VS AVERAGE DAY (cost against the mean of the active days before
this one; tokens when nothing was priced);
- AGENT / MODEL with logos printed in ink, by cost; then TOTAL TOKENS,
INPUT, OUTPUT and CACHE HIT RATE;
- the original's tagline and App Store footer are magpie's own lines,
and its RANK is left out: magpie has no ranking to read.
The frame can't fetch a font file (sandboxed, opaque origin), so the
face is a subset of JetBrains Mono 2.304 (OFL, license beside it) as
woff2 data in page/fonts.js, loaded with FontFace. About 13.5KB per
weight, 400/700/800.
The average now leaves out the day itself, and money(0) reads $0.00.
Run, on mote at this tree:
- bun test packages/day-card: 12 pass (tests rewritten for the receipt:
fields, cost order, versus, dates with a held clock, fonts.js is
woff2 and loads before app.js, only usage:day is read).
- bun test scripts: 22 pass; bun scripts/check.mjs: exit 0.
- The page in a sandboxed frame under the page CSP, with the
reference's numbers and real magpie icons, in Chromium and WebKit
(Playwright 1.62.0), en, zh, de and ja: all three weights load, no
page errors, the long German title shrinks to fit; the English card
checked side by side with the tweet's image.
Not tried: the real magpie app's WKWebView, and Copy/Save from it.