CodexBar · Implementation Handoff

Combined 5h + 7d Burn-Down Widget

A second medium widget (~360×170pt) that stacks BOTH usage windows in one tile — a row for the 5-hour limit and a row for the 7-day limit, each a complete mini burn-down. It is a separate choice in the widget gallery alongside the single-window widget. Same engine, contrast rules, and rendering modes as the single widget; this doc covers what's specific to the combined layout.

1 · Layout

Header spans the top; the body is two equal rows split by a hairline. Each row is a 100px label column + a flexible mini-chart column.

HDR
Header
Brand dot (LLM hue) + LLM name on the left; "5h & 7d limits" caption on the right.
5H
Row 1 — 5-hour window
Label column: 5H tag + pace word, hero number, reset line. Chart column: mini burn-down with usage bars (5 hourly slots).
7D
Row 2 — 7-day window
Same structure; chart has 7 daily slots. Reset countdown is in days; absolute label is a weekday.

2 · Per-window framing (the key decision)

The two rows deliberately show different hero metrics, matched to how each window is used:

5H → % remaining

How much of the 5-hour window is still left (e.g. 35% left). Short window, so the raw headroom is what matters in the moment. Colored by pace.

7D → % off a steady pace

How far above/below a consistent burn across the week (e.g. 7% over pace). Long horizon, so staying on track matters more than the exact number left.

Both are widget settings and can be overridden per window (metric5 / metric7remaining / used / pace). The defaults above ship out of the box.

3 · Build exactly these — color & monochrome

macOS renders the widget in full color on the desktop and desaturates it to a monochrome vibrant material when an app is foregrounded. Both must be legible. The canonical render set:

Monochrome is the make-or-break case. With hue gone, every layer — the two burn-down lines, the dashed ideal, the dotted projection, AND the usage bars — must separate by weight / dash / luminance alone. Validate ≥3:1 contrast against the material in all four combinations (color-dark, color-light, mono-dark, mono-light). The dark + monochrome combination is the one that broke before.

4 · Contrast playbook

  1. Separate by three axes, never hue alone. Weight + dash + luminance carry every layer so the design survives total desaturation.
  2. Ideal = hairline dashed ~50% L (1.4px, 2.5/3). A reference, recedes.
  3. Actual = 2.4px solid. The dominant object in each row. In the combined widget the area fill is replaced by the usage bars.
  4. Projection = fine dotted (0.5/3.5); turns red on over-pace — the one allowed color cue in monochrome.
  5. Now node ringed in the material color so it punches off whatever it overlaps.
  6. Usage bars stay subtle. Low-opacity fills (see §6) that read as background texture, never competing with the line. Re-validate opacity per appearance mode.

5 · Color semantics & brand identity

Each row's accent (its line, hero number, pace word, now dot, and usage bars) is driven by that row's pace:

Conserving / under pace (margin > +4%) On pace (±4%) Over pace (margin < −4%)

The brand dot beside the LLM name is the only brand-colored element (Claude clay / Codex teal / Gemini indigo — placeholders, swap for official tokens). Everything else is pace-driven. In monochrome mode the dot desaturates with the rest.

6 · Usage bars spec

A subtle per-period consumption histogram sits behind each chart — always on. It shows where the budget actually went, period by period, without adding a number to read.

AspectSpec
Slots5 for the 5-hour row (one per hour), 7 for the 7-day row (one per day). Slots span the full window width edge to edge.
Height — scalingRelative to ideal. The ideal per-period burn (100/n %) maps to a fixed reference height (≈46% of the plot). A period that burned the steady-pace amount reaches that line; less is shorter, more is taller.
Overage shadingThe portion of a bar above the ideal reference is drawn as a separate, brighter segment (≈2× the base opacity) — an at-a-glance signal of which periods ran hot.
Completed periodFull-slot-width bar, base opacity ~0.17 (overage ~0.34).
Current periodNarrower bar ending at "now" (in-progress cue), slightly lower opacity (~0.13 / 0.26).
Future periodsFaint full-height placeholder slot (opacity ~0.045) — shows the remaining structure, no value.
ColorNeutral ink — white in dark mode, black in light mode — at the opacities above. Never the pace hue (keeps it background).

Alt scaling considered & rejected: normalizing bars to the largest period shows relative shape but loses the pace meaning. Ship the relative-to-ideal + overage version.

7 · Reset line & compact time

To fit two reset lines without collision, the word "resets" is replaced by a refresh glyph, followed by the relative countdown and a compact absolute time:

FullCompactRule
4:30 PM4:30pAM/PM → a/p
5:00 PM5pdrop :00 on the hour
Sun 9:00 AMSun 9akeep weekday prefix for 7-day

Rendered as: ↻ 2h 06m · 4:30p (countdown bold, absolute time dimmed). The freed space widens both charts.

8 · Pace & projection logic

QuantityDefinition
idealNow100 × (1 − tNow) — budget you should have left at the current position through the window.
marginactual − idealNow. Drives pace color + the 7-day hero number.
slope / projectionRecent burn rate extended to 0%. Dotted; if it reaches 0 before reset the row is running dry early.
per-period consumedremaining(t0) − remaining(min(t1, now)) via linear interpolation of the series — feeds the usage bars.

9 · Type scale & tokens

ElementSize / weightNotes
Hero number (per row)27px / 660tabular-nums, pace color; pace mode prefixes a small arrow
Row tag (5H / 7D)9.5px / 800, 1px trackingsub color
Pace word10px / 640pace color
Reset line9.5pxrefresh glyph + bold countdown + dimmed compact time
LLM name14px / 680with brand dot
Mini chart216 × 50 per rowideal + actual + projection + now + usage bars
Container360 × 170, radius 2412/15/11 padding

Colors authored in OKLCH so luminance is tunable independent of hue — required to hit contrast targets across the four mode combinations. Shares the burn-down engine with the single-window widget.