Public: anyone can read this; the crew can change it.
Raise the app.looks cap above 24 so the forge can picture the signed-out home beside the space page #13231
Check · Review · Land · Live done — Landed and live in production.
mason/forge:mason/13228-raise-the-app-looks-cap-above-24-so-the → main 2 commits fork
5 files
changed +25
−19
docs/APPS.md +1 −1
| @@ -1446,7 +1446,7 @@ When a deploy comes up green the forge takes a picture of it — every page | ||
| 1446 | 1446 | (390×844), a laptop's (1280×800), and a thumb's (200×125, desktop's own |
| 1447 | 1447 | aspect, small), and keeps the pictures beside the commit they are of, so a |
| 1448 | 1448 | person judges a change from what it is rather than from what it says. |
| 1449 | `app.looks` may name at most 24 pages: a browser start per picture per | |
| 1449 | `app.looks` may name at most 32 pages: a browser start per picture per | |
| 1450 | 1450 | width is the heaviest thing the forge does, and more is a manifest error |
| 1451 | 1451 | rather than a silent, slower deploy. The pull page shows the phone and |
| 1452 | 1452 | desktop pair under the checks, with the commit and a word when the head has |
docs/features/vitals-screens.md +1 −1
| @@ -9,4 +9,4 @@ Report-only: neither can turn a check red. Skipped looks show no screens. | ||
| 9 | 9 | |
| 10 | 10 | API: `GET /api/v1/repos/:owner/:name/commits/:oid/check` and `GET /api/v1/repos/:owner/:name/pulls/:number/checks` carry `looks: [{look, screens, sideways}]`, from the same file as the run page (a run with no file of its own falls back to the commit's filed looks). `screens` is the one-decimal string (`""` without a size), `sideways` is a boolean; `[]` when there are none or the reader may not read runs. |
| 11 | 11 | |
| 12 | The held page (`/preview-admin/sample/held`) is measured as an owner look (`PREVIEW_OWNER_LOOKS`), not a visitor look, because the visitor cap (`LOOKS_MAX`, 24) is spent; the check lists it at desktop and phone with its screens (#9508). | |
| 12 | The held page (`/preview-admin/sample/held`) is measured as an owner look (`PREVIEW_OWNER_LOOKS`), not a visitor look: it was moved there when the visitor cap (`LOOKS_MAX`) was full, and it stays until a pull moves it back; the check lists it at desktop and phone with its screens (#9508). |
src/apps/manifest.ts +5 −2
| @@ -92,7 +92,10 @@ export interface AppManifest { | ||
| 92 | 92 | readonly adapter?: AdapterSpec | undefined; |
| 93 | 93 | /** `toolchain` (top level of `forge.json`): pinned toolchain versions. Unset is none. */ |
| 94 | 94 | readonly toolchain?: ToolchainPin | undefined; |
| 95 | /** `schedules` (top level of `forge.json`): calls the forge makes on a clock (`apps/schedule_spec.ts`). Unset is none. */ | |
| 95 | /** | |
| 96 | * `schedules` (top level of `forge.json`): calls the forge makes on a clock | |
| 97 | * (`apps/schedule_spec.ts`). Unset is none. | |
| 98 | */ | |
| 96 | 99 | readonly schedules?: readonly ScheduleSpec[] | undefined; |
| 97 | 100 | } |
| 98 | 101 | |
| @@ -108,7 +111,7 @@ const COMMAND_MAX = 1_000; | ||
| 108 | 111 | /** More than this many pages is a manifest error: a browser start per |
| 109 | 112 | * picture per width is the heaviest thing the forge does. Room for every |
| 110 | 113 | * top-level page of the forge itself. */ |
| 111 | const LOOKS_MAX = 24; | |
| 114 | const LOOKS_MAX = 32; | |
| 112 | 115 | const LOOK_PATH_MAX = 200; |
| 113 | 116 | |
| 114 | 117 | /** |
test/apps-adversarial.test.ts +4 −4
| @@ -367,16 +367,16 @@ describe("manifest: parseManifest edge cases", () => { | ||
| 367 | 367 | if (result.ok) expect(result.value.looks).toEqual(["/"]); |
| 368 | 368 | }); |
| 369 | 369 | |
| 370 | test("app.looks names up to 24 pages, enough for every top-level page of the forge", () => { | |
| 371 | const looks = Array.from({ length: 24 }, (_, i) => `/p${i}`); | |
| 370 | test("app.looks names up to 32 pages, enough for every top-level page of the forge", () => { | |
| 371 | const looks = Array.from({ length: 32 }, (_, i) => `/p${i}`); | |
| 372 | 372 | const result = parseManifest(JSON.stringify({ app: { run: "x", looks } }), undefined); |
| 373 | 373 | expect(result.ok).toBe(true); |
| 374 | 374 | if (result.ok) expect(result.value.looks).toEqual(looks); |
| 375 | 375 | }); |
| 376 | test("app.looks with more than 24 paths is refused", () => { | |
| 376 | test("app.looks with more than 32 paths is refused", () => { | |
| 377 | 377 | const result = parseManifest( |
| 378 | 378 | JSON.stringify({ |
| 379 | app: { run: "x", looks: Array.from({ length: 25 }, (_, i) => `/p${i}`) }, | |
| 379 | app: { run: "x", looks: Array.from({ length: 33 }, (_, i) => `/p${i}`) }, | |
| 380 | 380 | }), |
| 381 | 381 | undefined, |
| 382 | 382 | ); |
test/forge-looks.test.ts +14 −11
| @@ -25,20 +25,20 @@ const NOT_A_PAGE: Record<string, string> = { | ||
| 25 | 25 | "/desk": "a POST that leaves a note on the desk; the desk is read on the home (/), which is pictured; covered by test/desk.test.ts", |
| 26 | 26 | "/feed": "no picture: its slot went to /docs; the page is covered by its own tests", |
| 27 | 27 | "/front": "no picture: its slot went to /settings/security/controls, the security controls (#13001); covered by its own tests", |
| 28 | "/pricing": "no picture: the cap of 24 looks is spent; the page is covered by test/pricing-order.test.ts", | |
| 28 | "/pricing": "no picture: not in app.looks; the page is covered by test/pricing-order.test.ts", | |
| 29 | 29 | "/audit": "no picture: its slot went to /pinned; /audit.csv is its download, covered by test/audit.test.ts", |
| 30 | 30 | "/deploy-to": "a form for a forge admin that fills from its link; covered by test/pinned-page.test.ts", |
| 31 | 31 | "/settings": "a form of fields; its slot went to the open help of /boards and /settings/crew (#11170); covered by test/account-help.test.ts", |
| 32 | 32 | "/new": "a form that fills from its link; its slot went to the open help of /boards and /settings/crew (#11170)", |
| 33 | 33 | "/pinned": "no picture: its slot went to /settings/crew, the crew page; covered by test/pinned-page.test.ts", |
| 34 | "/data": "no picture: the cap of 24 looks is spent; a guest sees the not-found page and the page is covered by its own tests", | |
| 35 | "/asked": "no picture: the cap of 24 looks went to /notes, the page that now leads with a person's thoughts; /asked is covered by test/asked.test.ts", | |
| 36 | "/forges": "no picture: the cap of 24 looks went to the preview's /waves and /milestones; the page is covered by its own tests", | |
| 37 | "/family": "no picture: the cap of 24 looks went to the preview's /waves and /milestones; the page is covered by its own tests", | |
| 34 | "/data": "no picture: not in app.looks; a guest sees the not-found page and the page is covered by its own tests", | |
| 35 | "/asked": "no picture: its slot went to /notes, the page that now leads with a person's thoughts; /asked is covered by test/asked.test.ts", | |
| 36 | "/forges": "no picture: its slot went to the preview's /waves and /milestones; the page is covered by its own tests", | |
| 37 | "/family": "no picture: its slot went to the preview's /waves and /milestones; the page is covered by its own tests", | |
| 38 | 38 | "/llms.txt": "plain markdown for machines, not a page to picture", |
| 39 | "/agents": "/llms.txt drawn as a page for an assistant; no picture: the cap of 24 looks is spent, and test/agents-page.test.ts covers it", | |
| 40 | "/packs": "no picture: the cap of 24 looks is spent; the page is covered by test/packs.test.ts", | |
| 41 | "/fleet": "no picture: the cap of 24 looks is spent; the page is covered by test/fleet-table.test.ts", | |
| 39 | "/agents": "/llms.txt drawn as a page for an assistant; no picture: not in app.looks, and test/agents-page.test.ts covers it", | |
| 40 | "/packs": "no picture: not in app.looks; the page is covered by test/packs.test.ts", | |
| 41 | "/fleet": "no picture: not in app.looks; the page is covered by test/fleet-table.test.ts", | |
| 42 | 42 | "/robots.txt": "plain text for crawlers", |
| 43 | 43 | "/openapi.json": "a redirect to the contract document", |
| 44 | 44 | "/favicon.ico": "the tab icon, an image", |
| @@ -122,7 +122,10 @@ const manifest = (): { looks: string[]; looksAsOwner: string[] } => | ||
| 122 | 122 | const isTopLevel = (p: string) => p === "/" || /^\/[^/?]+$/.test(p); |
| 123 | 123 | /** A page's `?help` look: the page with its help open and focused (#11170). */ |
| 124 | 124 | const isHelpLook = (p: string) => p.endsWith("?help") && (isTopLevel(p.slice(0, -5)) || p === "/settings/crew?help"); |
| 125 | /** The top-level pages; a deeper one is the preview seed's, taken as the owner (test/looks-owner.test.ts). */ | |
| 125 | /** | |
| 126 | * The top-level pages; a deeper one is the preview seed's, taken as the owner | |
| 127 | * (test/looks-owner.test.ts). | |
| 128 | */ | |
| 126 | 129 | const declared = (): string[] => manifest().looks.filter(isTopLevel); |
| 127 | 130 | |
| 128 | 131 | const get = (path: string) => |
| @@ -148,9 +151,9 @@ test("every listed path answers 200 to an admin", async () => { | ||
| 148 | 151 | for (const p of declared()) expect([p, (await get(p)).status]).toEqual([p, 200]); |
| 149 | 152 | }); |
| 150 | 153 | |
| 151 | test("app.looks stays within 24 paths, each once", () => { | |
| 154 | test("app.looks stays within 32 paths, each once", () => { | |
| 152 | 155 | const { looks } = manifest(); |
| 153 | expect(looks.length).toBeLessThanOrEqual(24); | |
| 156 | expect(looks.length).toBeLessThanOrEqual(32); | |
| 154 | 157 | expect(new Set(looks).size).toBe(looks.length); |
| 155 | 158 | }); |
| 156 | 159 |
new above
offline