Screens per case
Every use case that happens in your app gets its screens, with every ending and every failure, before it is built.
Which cases get screens
Every use case that happens inside your app has a where in Sypnia Cases: its place in the app’s navigation tree, such as shop.order-for-today, whose path people see as «Orders → Order for today». Each of those cases gets a screen file. Cases that start outside the app (another system calls, a scheduled job, an event) have no screen of their own; where they change what people see, that change is designed on the screens that show it.
The screen file
format: 1
case: place-order
where: shop.order-for-today
pattern: do-something
guide: 3
status: approved
approved_by: ana@laespiga.co
first_screen: true
regions:
header: [{ piece: title, text: "Order for today" }, { piece: pickup-hours }]
content: [{ piece: product-card, repeat: today's products }]
action: [{ piece: button, variant: primary, text: "Reserve my bread" }]
states:
loading: product cards as skeletons
empty: { piece: notice, text: "Today's bread is sold out. Come back tomorrow from 6 am." }
outcome.reserved: [{ piece: pickup-code }, { piece: notice, text: "We keep it until closing time." }]
failure.OutOfStock: { piece: notice, tone: warning, near: the product, text: from case }
failure.Closed: { piece: notice, tone: danger, replaces: content, text: from case }
offline: products stay visible; «Reserve» waits for the connection and says so
phone: one product per row; the action stays at the bottom
desktop: products in a grid; the summary and the action on the right| Field | What it is |
|---|---|
case, where | the use case and its place in the navigation tree |
pattern | the screen pattern it follows |
guide | the guide version it was designed with |
status | draft, approved or built |
regions | what each part of the screen holds, using only gallery pieces |
states | loading, empty, each outcome, each failure (text: from case takes the case’s message), offline |
phone, desktop | how the layout changes |
first_screen | for screens people land on: the main content fits without scrolling |
Pictures of every state
In Sypnia Cloud, every state is rendered as a picture: on a phone (390 × 844), a laptop (1366 × 700) and a large screen (1876 × 951), in light and dark. You approve the screens by looking at them, not by reading YAML.
Approved before built
The agent builds a screen only after its file is approved. When the case changes (say a new failure, PaymentRefused), the screen file is out of date and design check reports the missing state until it is designed and approved.