# Echoes v22: missing states (6 December 2026) Every state the launch still lacked, in the v22 style, light and dark, 390 and 1440. **Apply order:** after every earlier zip on #2600, including thinking #6 (`4e548df0…`) and the quicker thinking zip that replaces it. This zip only **adds** files. It does not replace or edit any existing file, so it does not conflict with the scroll fix, the Explore merge, the signed-in header or any thinking zip, and it can go in before or after them. Rules kept: Geist only, no gold, flat ink buttons, no gradients or glow, no arrows in text buttons, no card or pill walls. Motion is transform and opacity only, 120–320ms, `cubic-bezier(.2,.8,.2,1)`. Press feedback on pointerdown, hover only on fine pointers, reduced motion = fades. ## Files (all new) | File | What it is | | --- | --- | | `site/v22/states/states.css` | Styles for every in-app state. All classes start `st-`, all tokens `--st-`. Safe to load after any v22 stylesheet. | | `site/v22/states/states.js` | `window.EchoesStates`: builds each state's markup, opens and closes sheets (focus trap, Esc, focus return), press feedback. No dependencies. | | `site/v22/500.html` | Server error page. | | `site/v22/maintenance.html` | Planned maintenance page. | | `site/v22/pro/welcome/index.html` | "You're Pro" landing after checkout. | | `site/v22/checkout/cancelled/index.html` | Checkout cancelled. | | `site/v22/signin/link/index.html` | Magic link expired (default) or already used (`?reason=used`). | The page files follow `/v22/404/` exactly (same head, header, footer, `acct.css`, `v20.css`, `system.css`), plus `states.css`. They carry `noindex`. ## Wiring in-app states Add to the pages that need them (chat, app, chats, signin, account), after the page's own CSS and scripts: ```html ``` ### a. Daily limit reached (guest on `/v22/chat/`, Free on `/v22/app/`) ```js EchoesStates.limit({ plan: 'guest', resetTime: '{resetTime}', log: document.querySelector('#in'), form: document.querySelector('#form') }); EchoesStates.limit({ plan: 'free', resetTime: '{resetTime}', limit: N /* optional daily count */, log: ..., form: ... }); ``` - Adds a quiet note at the end of the chat (`.st-cap`, `role="status"`): "You've reached today's limit / Your chat is saved. Messages reset at {resetTime}." The link under it reopens the sheet. - Locks the composer (`.st-locked`, textarea disabled, placeholder "Messages reset at {resetTime}"). `EchoesStates.unlock(form)` undoes it. - Opens the upgrade sheet (`role="dialog"`). Guest: **Create free account** / Sign in. Free: **Go Pro** / Not now. Kicker: "Every Echo stays free". No price, no reply-length promise; Pro is described only as "far more messages each day", matching Pricing. - `limit` is optional. Leave it out and the copy doesn't name a number. `open:false` adds the note and lock without the sheet. - Options: `startUrl`, `signinUrl`, `proUrl` (defaults `/v22/start/`, `/v22/signin/`, `/v22/pricing/`). ### b. Sign-in errors (code step of `/v22/signin/` and `/v22/start/`) ```js EchoesStates.authError('wrong', { left: 2 /* optional */ }); EchoesStates.authError('expired', { resend: fn /* optional, defaults to clicking #resend */ }); EchoesStates.authError('locked', { until: msEpoch /* or minutes: N */, onUnlock: fn }); EchoesStates.clearAuth(); ``` - Renders `
` under the code cells and hides `.cstat` while it shows. Wrong and expired add the existing `.code.bad` (danger cell borders). - Wrong: "That code didn't work. Check it and try again. {n} tries left." - Expired: "That code has expired." + **Send a new code**. - Too many tries: "Too many tries. Try again in {minutes}, or use a different email." The cells are dimmed and disabled (`.code.st-off`), Resend is disabled, the minutes count down every 15s and the step clears itself at zero. "Use a different email" stays live. - Magic link expired or used: send the link callback to `/v22/signin/link/` (expired) or `/v22/signin/link/?reason=used`. Replace `{minutes}` in that page with the link lifetime. ### c. Chat error: reply failed mid-stream ```js EchoesStates.chatError(replyArticle, { retry: function (article, done) { /* resend; done() on success, done(false) to show Try again again */ } }); ``` - Keeps the partial reply, set in the muted ink (`.st-cut`) so it reads as unfinished, and adds `