Skip to content

Tell agents to ship screenshots with a new app - #512

Draft
jonathanlaib wants to merge 2 commits into
mainfrom
docs/app-screenshots-for-agents
Draft

jonathanlaib wants to merge 2 commits into
mainfrom
docs/app-screenshots-for-agents

Conversation

@jonathanlaib

@jonathanlaib jonathanlaib commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #480. Documents the limit of ten screenshots from #514; publish only after #514 is released.

Problem

An app's page shows up to three screenshots from the app's static assets (#350). Agents are not told where the files go, so new apps ship without them.

Changes

  • Applications guide: screenshot paths for a SvelteKit (static/screenshots/) and a TanStack Start app (public/screenshots/), accepted types (.png, .jpg, .webp) and size (2 MiB), and how catalog show reports them in screenshots.
  • Skill and starter AGENTS.md: before the first deploy, the agent saves a screenshot of the app running with pnpm dev and demo data. The app is finished only when catalog show lists a description and at least one screenshot.

Screenshots come from the local app so they show demo data, not real records. No CLI or server change; the limit of ten screenshots depends on #514.

Verification

  • Slots 1–10 (from Page through up to ten app screenshots and enlarge them in place #514), types, size limit and the active-deployment rule checked against app-screenshots.ts and apps.ts; starter asset folders checked in starters/.
  • oxfmt --check passes on the changed files; blume validate finds no broken links.
  • Not yet checked: an agent run with the new skill against a real deployment.

jonathanlaib added a commit that referenced this pull request Nov 30, 2026
## Problem

Every app has a page with an icon, a description and a longer text
(#350). Agents that build and deploy an app leave it empty: the
`widefleet` skill, the starter `AGENTS.md` files and the docs never
mention `widefleet catalog describe` or `catalog about`. Colleagues then
see an app with no explanation of what it is for.

## Changes

- **Applications guide:** a section *Show what the app is for*: where
each part of the page comes from, `widefleet catalog describe` and
`catalog about`, and how to check the result with `widefleet catalog
show`.
- **Skill and starter `AGENTS.md`:** a new web app is finished only when
its page says what it is for. The agent sets the description with
`deployment.appId` from `deploy --json` and checks that `catalog show`
lists a `description`.

No CLI or server change: the commands are released.

Screenshots follow in #512, stacked on this PR.

## Verification

- Commands, limits (200 / 2,000 characters) and the `deploy --json` and
`catalog show` fields checked against `catalog.rs`, `deploy.rs` and
`packages/contracts`.
- `catalog show` answers for unpublished apps their managers can see
(`listing` in `apps.ts`).
- `oxfmt --check` passes on the changed files; `blume validate` finds no
broken links.
- Not yet checked: an agent run with the new skill against a real
deployment.
Base automatically changed from docs/app-page-for-agents to main November 30, 2026 11:44
An app's page shows up to three screenshots from its static assets, but
agents are not told where they go or how to take them.

- Applications guide: screenshot paths in each starter, accepted types and
  size, and how catalog show reports them.
- Skill and starter AGENTS.md: take a screenshot of the local app with demo
  data before the first deploy, and treat the app as finished only when
  catalog show lists at least one screenshot.
@jonathanlaib
jonathanlaib force-pushed the docs/app-screenshots-for-agents branch from 2a98fc1 to 5169147 Compare November 30, 2026 11:46
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs 35eb69c Nov 30 2026, 12:28 PM

@jonathanlaib
jonathanlaib marked this pull request as draft November 30, 2026 12:26
@jonathanlaib
jonathanlaib marked this pull request as ready for review November 30, 2026 12:27
@jonathanlaib
jonathanlaib marked this pull request as draft November 30, 2026 12:28
jonathanlaib added a commit that referenced this pull request Nov 30, 2026
## Problem

An app's page shows at most three screenshots, which is too few to show
an app on desktop, on a phone and in dark mode. The row of screenshots
scrolls with a visible horizontal scrollbar, and clicking a screenshot
opens the raw image in a new tab, so the reader leaves the app's page.

## Changes

- **Up to ten screenshots:** `/screenshots/1` to `/screenshots/10` among
an app's static assets. The contract, the page listing, the API route,
its OpenAPI description and the hint for app managers follow the new
limit.
- **Paging instead of a scrollbar:** the scrollbar is hidden; round
arrow buttons appear on the side where more screenshots lie and page by
most of the visible width. Touch and trackpad scrolling keep working.
- **Lightbox:** clicking a screenshot opens it large in a dialog on the
same page, with a counter. Arrow keys, the arrow buttons or a swipe move
between screenshots; Escape, the close button or a click beside the
picture closes it. The gallery lives in a new `ScreenshotGallery`
component; `AppAbout` passes it the image URLs.

Public documentation of the screenshot convention is in #512, which will
name the new limit.

## Screenshots

Desktop, light, before and after: the scrollbar gives way to an arrow on
the side with more screenshots.

<img
src="https://gist.githubusercontent.com/jonathanlaib/c1a5dcf5243670cb1b188e65fb42a4dd/raw/c568a1fa00001dfdbb6b0a17e1cc886789f93525/before-1280-light.png"
width="640"> <img
src="https://gist.githubusercontent.com/jonathanlaib/c1a5dcf5243670cb1b188e65fb42a4dd/raw/c568a1fa00001dfdbb6b0a17e1cc886789f93525/after-1280-light.png"
width="640">

Desktop, dark, before and after:

<img
src="https://gist.githubusercontent.com/jonathanlaib/c1a5dcf5243670cb1b188e65fb42a4dd/raw/c568a1fa00001dfdbb6b0a17e1cc886789f93525/before-1280-dark.png"
width="640"> <img
src="https://gist.githubusercontent.com/jonathanlaib/c1a5dcf5243670cb1b188e65fb42a4dd/raw/c568a1fa00001dfdbb6b0a17e1cc886789f93525/after-1280-dark.png"
width="640">

Phone, before and after:

<img
src="https://gist.githubusercontent.com/jonathanlaib/c1a5dcf5243670cb1b188e65fb42a4dd/raw/c568a1fa00001dfdbb6b0a17e1cc886789f93525/before-390-light.png"
width="260"> <img
src="https://gist.githubusercontent.com/jonathanlaib/c1a5dcf5243670cb1b188e65fb42a4dd/raw/c568a1fa00001dfdbb6b0a17e1cc886789f93525/after-390-light.png"
width="260">

The lightbox on a desktop in light and dark, and on a phone:

<img
src="https://gist.githubusercontent.com/jonathanlaib/c1a5dcf5243670cb1b188e65fb42a4dd/raw/c568a1fa00001dfdbb6b0a17e1cc886789f93525/lightbox-1280-light.png"
width="640"> <img
src="https://gist.githubusercontent.com/jonathanlaib/c1a5dcf5243670cb1b188e65fb42a4dd/raw/c568a1fa00001dfdbb6b0a17e1cc886789f93525/lightbox-1280-dark.png"
width="640">
<img
src="https://gist.githubusercontent.com/jonathanlaib/c1a5dcf5243670cb1b188e65fb42a4dd/raw/c568a1fa00001dfdbb6b0a17e1cc886789f93525/lightbox-390-light.png"
width="260">

## Verification

- `app-screenshots.test.ts` covers slot 10 and rejects slot 11; the
platform integration test now expects 400 for slot 11 instead of 4. The
integration suite was not run locally; CI runs it.
- `svelte-check` reports no errors in the changed files (the remaining
errors come from the unbuilt `@platform/app-runtime` package in a fresh
checkout). Oxlint and Oxfmt pass on the changed files.
- Rendered the gallery with the real styles and five synthetic
screenshots at 1280×760 in light and dark themes and on a 393 px phone
viewport. Checked: arrows show only where more screenshots lie, paging,
opening with a click and with Enter, focus moving into the dialog, arrow
keys, buttons, swipe, Escape and click-outside closing, no console
errors.
- Fixed during review: the button's pressed state (`translate-y-px`)
overrode a transform-based centering and made the arrow jump; arrows are
now centered without a transform and opaque in dark mode.
- Not checked: the full signed-in app page in a running installation,
and a screenshot that fails to load inside the lightbox (it is left out
of the row and the lightbox as before).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant