Public: anyone can read this; the crew can change it.

forge.json's app.looks lists every top-level page of the forge #2745

Closed opened this
Closed without merging

forge.json's app.looks now names 19 top-level pages, and the cap on app.looks is raised from 3 to 24. The new test and the manifest tests pass. I couldn't run the type check here, because bun x tsc can't write to the temp directory in the sandbox.

Notes

stopped closed without shipping deploy e115aa2

opened this

forge.json's app.looks now names 19 top-level pages, and the cap on app.looks is raised from 3 to 24. The new test and the manifest tests pass. I couldn't run the type check here, because bun x tsc can't write to the temp directory in the sandbox.

One test in test/looks.test.ts fails, the real Chromium capture. It fails the same way without my change, because Chromium can't open a socket in this sandbox.

What changed

  • Pages named: /, /board, /boards, /map, /flow, /system, /apps, /explore, /family, /front, /releases, /resilience, /audit, /contribute, /search, /settings, /migrate, /new, /asked. All 19 answer 200 for a signed-in admin, the viewer a look is taken as.
  • Cap: LOOKS_MAX in src/apps/manifest.ts goes from 3 to 24, and docs/APPS.md says so. The two cap tests in test/apps-adversarial.test.ts now check 24 and 25.
  • New test: test/forge-looks.test.ts fails if a top-level page route is missing from app.looks. It also fails if app.looks names something that isn't a route or doesn't answer 200 for an admin. Top-level routes that aren't pages are listed in the test, each with a reason. Examples are machine files, signed-out pages, POST-only routes, the event stream and the redirects /asks and /big. A new page route has to be added to app.looks or to that list.

Left out

  • /usage: it isn't a top-level route in the router, so it isn't listed. If it lives under another path, say so and I'll add it.
  • /forges: it answers 404 on a forge that isn't a family's, so I left it out.
  • Capture cost: each page is pictured at three widths on every green deploy, so a deploy now takes 19 times the browser starts of the old default. I didn't measure the cost.
  • Pages: unchanged.

Try it Run bun test test/forge-looks.test.ts test/apps-adversarial.test.ts. The next preview deploy pictures every listed page.

Closes #2735

commented

forge.json's app.looks now names 19 top-level pages, and the cap on app.looks is raised from 3 to 24. The new test and the manifest tests pass. I couldn't run the type check here, because bun x tsc can't write to the temp directory in the sandbox.

One test in test/looks.test.ts fails, the real Chromium capture. It fails the same way without my change, because Chromium can't open a socket in this sandbox.

What changed

  • Pages named: /, /board, /boards, /map, /flow, /system, /apps, /explore, /family, /front, /releases, /resilience, /audit, /contribute, /search, /settings, /migrate, /new, /asked. All 19 answer 200 for a signed-in admin, the viewer a look is taken as.
  • Cap: LOOKS_MAX in src/apps/manifest.ts goes from 3 to 24, and docs/APPS.md says so. The two cap tests in test/apps-adversarial.test.ts now check 24 and 25.
  • New test: test/forge-looks.test.ts fails if a top-level page route is missing from app.looks. It also fails if app.looks names something that isn't a route or doesn't answer 200 for an admin. Top-level routes that aren't pages are listed in the test, each with a reason. Examples are machine files, signed-out pages, POST-only routes, the event stream and the redirects /asks and /big. A new page route has to be added to app.looks or to that list.

Left out

  • /usage: it isn't a top-level route in the router, so it isn't listed. If it lives under another path, say so and I'll add it.
  • /forges: it answers 404 on a forge that isn't a family's, so I left it out.
  • Capture cost: each page is pictured at three widths on every green deploy, so a deploy now takes 19 times the browser starts of the old default. I didn't measure the cost.
  • Pages: unchanged.

Try it Run bun test test/forge-looks.test.ts test/apps-adversarial.test.ts. The next preview deploy pictures every listed page.

commented

Declined: I could not find a failure caused by this change, so I am not pushing anything new. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m5adn4wjn3ebn0admwz9nq42

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs