Skip to content
Design preview

Simple outside. Rigorous inside.

The visual system for Receipts and static mockups of its two screens. Contrast below is computed from the token values when the page renders, not typed in by hand.

Principles

Borrowed from how Apple makes complex things feel obvious.

Screen 1: what you asked for

What you said on one side, the receipt on the other. A vague phrase becomes a question for you, not a requirement.

Rate-limit the login endpointStatic mockup with sample data
What you said

Add rate limiting to the login route, five attempts per minute per IP, and return a 429 with Retry-After. It should survive a restart. Do not touch the signup flow. Add tests. And maybe log the blocked attempts?

Turn into a receipt

What you asked for

  1. R1
    Limit POST /api/login to 5 attempts per minute per IP address.Done when A 6th attempt inside 60 seconds returns 429.
  2. R2
    Blocked responses include a Retry-After header.Done when The header value is the seconds left in the window.
  3. R3
    Tests cover the limit and the window reset.
  4. R4
    Limiter state survives a server restart.

Leave alone

N1Do not change the signup flow.

Needs your answer

Q1Should blocked attempts be logged?

You said "maybe", so it was not turned into a requirement.

Screen 2: the check

One answer per item, with the lines that support it, then what your agent claimed. Tap any status to open its sheet.

  • Pasted changes
  • Your agent's summary
Rate-limit the login endpoint1 of 4 found. Tap a status to see what it means.
Static mockup with sample data
  1. R1Limit POST /api/login to 5 attempts per minute per IP.

    A limiter keyed by client IP guards the login handler.

    src/app/api/login/route.tsL14-L18
    if (!limiter.allow(ip)) return tooManyRequests(limiter.retryAfter(ip))
  2. R2Blocked responses include a Retry-After header.

    The header is set, but no test checks it.

    src/server/http/responses.tsL31
    headers: { 'Retry-After': String(seconds) }
  3. R3Tests cover the limit and the window reset.

    None of the changed files are tests.

  4. R4Limiter state survives a server restart.

    Where the limiter stores state is set by config that is not in the changes.

What your agent said

  • “Added tests for the limiter.”0 of 3 changed files are tests.
    Not true. The evidence says otherwise.
  • “All tests pass.”No test output was provided.
    Can't tell. Nothing you provided proves it either way.
  • “Signup is untouched.”No signup files changed.
    Backed up. The evidence agrees with what the agent said.

Controls and sheets

Pill buttons with an orange focus ring (press Tab). Status badges open a frosted sheet that rises over a soft blur. Escape or a tap outside closes it.

Material

Frosted glass with a bright top edge, over soft ambient light. It turns solid when blur is unsupported or reduced transparency is on. Code always sits on a solid surface.

Frosted panel

Whatever sits behind is softened, so text on top stays easy to read.

Type

Geist for words, Geist Mono for code and commit hashes. Large, tight headlines. Calm 15 to 17 pixel body text.

Proof, not promises.

Rate-limit the login endpoint

Body text is generous so a long receipt still reads easily.

src/app/api/login/route.ts L14-L18

Colour and contrast

White, black and one orange. Orange is a fill, an accent and the focus ring. Orange text uses a deeper shade so it stays readable. Every pair passes WCAG AA, and a test keeps it that way.

light palette
SampleTokensUseContrast
Body text--ink on --canvasAll primary text17.39:1 AAA
Secondary text--muted on --canvasDescriptions, metadata5.31:1 AA
Primary button--canvas on --inkMain call to action17.39:1 AAA
Accent button--accent-on on --accentOrange fill, black text5.91:1 AA
Orange text--accent-text on --surfaceRequirement codes, emphasis5.18:1 AA
Evidence found--ok on --ok-washVerdict badge4.76:1 AA
Partial--warn on --warn-washVerdict badge4.84:1 AA
Not found--bad on --bad-washVerdict badge5.91:1 AA
Violates non-goal--breach on --breach-washVerdict badge6.88:1 AA
Unverifiable--unknown on --unknown-washVerdict badge7.03:1 AAA
dark palette
SampleTokensUseContrast
Body text--ink on --canvasAll primary text18.15:1 AAA
Secondary text--muted on --surfaceDescriptions, metadata7.13:1 AAA
Accent button--accent-on on --accentOrange fill, black text6.94:1 AA
Orange text--accent-text on --surfaceRequirement codes, emphasis7.93:1 AAA
Evidence found--ok on --ok-washVerdict badge9.83:1 AAA
Partial--warn on --warn-washVerdict badge10.39:1 AAA
Not found--bad on --bad-washVerdict badge6.64:1 AA
Violates non-goal--breach on --breach-washVerdict badge7.92:1 AAA
Unverifiable--unknown on --unknown-washVerdict badge6.63:1 AA