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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

mason/forge:mason/13228-raise-the-app-looks-cap-above-24-so-the → main 2 commits fork

  • Merged. mason/13228-raise-the-app-looks-cap-above-24-so-the was merged into main as f05a45a.

Review

Sign in to review this change.
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
14461446 (390×844), a laptop's (1280×800), and a thumb's (200×125, desktop's own
14471447 aspect, small), and keeps the pictures beside the commit they are of, so a
14481448 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
14501450 width is the heaviest thing the forge does, and more is a manifest error
14511451 rather than a silent, slower deploy. The pull page shows the phone and
14521452 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.
99
1010 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.
1111
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 {
9292 readonly adapter?: AdapterSpec | undefined;
9393 /** `toolchain` (top level of `forge.json`): pinned toolchain versions. Unset is none. */
9494 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 */
9699 readonly schedules?: readonly ScheduleSpec[] | undefined;
97100 }
98101
@@ -108,7 +111,7 @@ const COMMAND_MAX = 1_000;
108111 /** More than this many pages is a manifest error: a browser start per
109112 * picture per width is the heaviest thing the forge does. Room for every
110113 * top-level page of the forge itself. */
111 const LOOKS_MAX = 24;
114 const LOOKS_MAX = 32;
112115 const LOOK_PATH_MAX = 200;
113116
114117 /**
test/apps-adversarial.test.ts +4 −4
@@ -367,16 +367,16 @@ describe("manifest: parseManifest edge cases", () => {
367367 if (result.ok) expect(result.value.looks).toEqual(["/"]);
368368 });
369369
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}`);
372372 const result = parseManifest(JSON.stringify({ app: { run: "x", looks } }), undefined);
373373 expect(result.ok).toBe(true);
374374 if (result.ok) expect(result.value.looks).toEqual(looks);
375375 });
376 test("app.looks with more than 24 paths is refused", () => {
376 test("app.looks with more than 32 paths is refused", () => {
377377 const result = parseManifest(
378378 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}`) },
380380 }),
381381 undefined,
382382 );
test/forge-looks.test.ts +14 −11
@@ -25,20 +25,20 @@ const NOT_A_PAGE: Record<string, string> = {
2525 "/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",
2626 "/feed": "no picture: its slot went to /docs; the page is covered by its own tests",
2727 "/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",
2929 "/audit": "no picture: its slot went to /pinned; /audit.csv is its download, covered by test/audit.test.ts",
3030 "/deploy-to": "a form for a forge admin that fills from its link; covered by test/pinned-page.test.ts",
3131 "/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",
3232 "/new": "a form that fills from its link; its slot went to the open help of /boards and /settings/crew (#11170)",
3333 "/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",
3838 "/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",
4242 "/robots.txt": "plain text for crawlers",
4343 "/openapi.json": "a redirect to the contract document",
4444 "/favicon.ico": "the tab icon, an image",
@@ -122,7 +122,10 @@ const manifest = (): { looks: string[]; looksAsOwner: string[] } =>
122122 const isTopLevel = (p: string) => p === "/" || /^\/[^/?]+$/.test(p);
123123 /** A page's `?help` look: the page with its help open and focused (#11170). */
124124 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 */
126129 const declared = (): string[] => manifest().looks.filter(isTopLevel);
127130
128131 const get = (path: string) =>
@@ -148,9 +151,9 @@ test("every listed path answers 200 to an admin", async () => {
148151 for (const p of declared()) expect([p, (await get(p)).status]).toEqual([p, 200]);
149152 });
150153
151 test("app.looks stays within 24 paths, each once", () => {
154 test("app.looks stays within 32 paths, each once", () => {
152155 const { looks } = manifest();
153 expect(looks.length).toBeLessThanOrEqual(24);
156 expect(looks.length).toBeLessThanOrEqual(32);
154157 expect(new Set(looks).size).toBe(looks.length);
155158 });
156159

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs