Public: anyone can read this; the crew can change it.
The dead `.headroom` rules leave src/web/style/content.ts and docs/DESIGN.md §5d, and no markup changes #5711
Check · Review · Land · Live done — Landed and live in production.
mason/forge:mason/4767-the-dead-headroom-rules-leave-src-web-st → main 4 commits fork
3 files
changed +4
−9
docs/DESIGN.md −1
| @@ -494,7 +494,6 @@ the same line (#4888). | ||
| 494 | 494 | - `.front-live` |
| 495 | 495 | - `.front-more` |
| 496 | 496 | - `.front-pick` |
| 497 | - `.headroom` | |
| 498 | 497 | - `.owner` |
| 499 | 498 | - `.page-head` |
| 500 | 499 | - `.policy-line` |
src/web/style/content.ts −8
| @@ -186,14 +186,6 @@ a.origin-chip:hover { border-color: var(--border-strong); color: var(--fg); } | ||
| 186 | 186 | color: var(--muted-fg); margin: 8px 0 4px; |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | /* A subscription's headroom for people: a small number beside its windows. */ | |
| 190 | .headroom { display: flex; align-items: center; gap: 6px; } | |
| 191 | .headroom .input { width: 5em; } | |
| 192 | /* On a phone an account's controls go under its name, not over it. */ | |
| 193 | @media (max-width: 640px) { | |
| 194 | .row:has(.headroom) { flex-wrap: wrap; } | |
| 195 | .row:has(.headroom) .row-trail { flex-basis: 100%; flex-wrap: wrap; } | |
| 196 | } | |
| 197 | 189 | .chart-box { color: var(--accent); aspect-ratio: 720 / 260; max-width: 720px; } |
| 198 | 190 | .chart-box .chart { display: block; width: 100%; height: auto; } |
| 199 | 191 | .chart-box text { fill: var(--muted-fg); font-family: var(--mono); } |
test/subscriptions.test.ts +4
| @@ -31,6 +31,7 @@ import { createUser, type User } from "../src/core/users.ts"; | ||
| 31 | 31 | import { startCrew, type CrewHandle } from "../src/crew/dispatch.ts"; |
| 32 | 32 | import { isRateLimited, resumeAt } from "../src/crew/limits.ts"; |
| 33 | 33 | import { serve, type Servers } from "../src/http/server.ts"; |
| 34 | import { stylesheetAsset } from "../src/web/asset.ts"; | |
| 34 | 35 | import { adminCookie } from "./helpers/admin.ts"; |
| 35 | 36 | |
| 36 | 37 | const OAT = "sk-ant-oat01-personal-token-for-the-test"; |
| @@ -637,6 +638,9 @@ describe("the pages", () => { | ||
| 637 | 638 | expect(html).toContain(`action="/settings/subscriptions/${work.id}/headroom"`); |
| 638 | 639 | expect(html).toMatch(/<form\s+class="row-fields"[^>]*headroom"/); |
| 639 | 640 | expect(html).toMatch(/<input[^>]*name="headroom"/); |
| 641 | const css = await (await fetch(`${base}${stylesheetAsset().path}`)).text(); | |
| 642 | expect(css).toContain(".row-fields"); | |
| 643 | expect(css).not.toContain(".headroom"); | |
| 640 | 644 | }); |
| 641 | 645 | |
| 642 | 646 | test("nobody but an admin reaches the pool", async () => { |
new above
offline