---
name: legato-page-design
description: Design, build or review a page for Legato, the Mac menu bar dashboard, against Legato's page design guide. Use when writing or changing a Legato page (with set_page, legato set, or a JSON file in Legato's Pages folder), when planning the pages for a service, or when asked to review or tidy a Legato page.
---

# Legato page design

Legato is a menu bar dashboard for the Mac. Each page is a JSON file, written with the `set_page` tool or the `legato set` command. Legato's Page design guide holds the rules for laying one out. This skill is the order to work in: what to read, what to check, and how to confirm the page loaded. Every check links to the section of the guide that states it.

The command-line tool is inside the app, at `/Applications/Legato.app/Contents/Helpers/legato`.

## Read first

1. **The guide**, at https://legatobar.com/docs/design.md. Read all of it before designing a page from nothing or reviewing one. For a small change, read the sections the change touches. Its [worked examples](https://legatobar.com/docs/design.md#worked-examples) are layouts to start from.
2. **The format this Mac's Legato accepts**, with `get_page_schema` or `legato schema`. Ask for the part you need: `page`, `sources`, `period`, `params`, `notify` or a card type, and once each for `rules` and `actions`, which the others list in `elsewhere`. If the installed schema disagrees with the guide or with this skill, follow the schema.
3. **The page as it is**, when it already exists, with `get_page` or `legato get <id>`. Keep its version for the write.
4. **What the service really answers**, when the page has sources. Design from the answer, including the fields it leaves out.

## Check the design

Go through these before writing, and again when reviewing a page someone already has.

1. **Pages.** One overview for each service, and as few other pages as possible. A detail page earns its place as a separate job, such as a period of its own, a long list or history, or one item of a fleet, written once with params. A topic of its own can justify a page, after you've tried folding it into the overview. No page that only links to other pages. [Choose the right structure](https://legatobar.com/docs/design.md#choose-the-right-structure)
2. **Order.** Health in Details, then Controls, the main trend, readings, a recent list, Explore links if they're needed, and last a log of activity: alerts, events or past items. [The shape of an overview](https://legatobar.com/docs/design.md#the-shape-of-an-overview)
3. **Rows as the subject.** On a page whose rows are the subject, such as tasks, packages or monitors, the rows come first and there is no health card. A task app has its own layout. [When the rows are the subject](https://legatobar.com/docs/design.md#when-the-rows-are-the-subject), [A to-do list](https://legatobar.com/docs/design.md#a-to-do-list)
4. **Health.** One full-width `status` card watches the whole subject, with `"placement": "page_info"`. Legato draws it in the page's Details, and a problem shows in the line under the title, a notification and the Dock badge. A server whose health is many parts takes a `fleet` of them in the card's place. A reading someone checks at a glance, like a version or an uptime, goes in the facts card. Leave the health card out when the rows already say it, and keep a card that only informs, like whether a market is open, on the page with its readings. A closed Status section at the top still works on older pages. [Health lives in Details](https://legatobar.com/docs/design.md#health-lives-in-page-info), [In Details](https://legatobar.com/docs/card-lists.md#in-page-info)
5. **States.** `warning` is for something that needs attention soon, and `critical` for something that needs someone now. Report `unknown` when you couldn't check, and `off` for something stopped on purpose. When `off`'s power symbol doesn't fit the meaning, give the card an `icon` that does, such as a moon whenever a market is shut. Give a gauge bands only when someone should act on the reading. Keep the words neutral. [Use status honestly](https://legatobar.com/docs/design.md#use-status-honestly)
6. **Controls.** Add only the buttons worth pressing. A card with buttons needs a source, and a button that sends a request calls that source's service. One action sits in the corner of the card it feeds. On an overview, two or more go in one or two cards of icons: groups parted by `"|"`, both halves of an on and off pair each with a `when` so one shows at a time, and a menu for a setting with a few values. Buttons for one row go on that row, and a shelf takes none. Give a button that's hard to undo `confirm`. Leave out anything Spotlight shouldn't run, and any refresh button. [Controls are a row of icons](https://legatobar.com/docs/design.md#controls-are-a-row-of-icons)
7. **Links.** Put a link to a detail page on a card that's already there when one fits: the row whose reading it expands, or the card's corner. An Explore list after the page's own cards is the last resort. Two tiles near the top suit two pages that expand the overview. No "Open in…" cards. [Links to the detail pages](https://legatobar.com/docs/design.md#links-to-the-detail-pages)
8. **Readings.** Fold before you add a card: one `facts` card for the secondary readings, a pair of `stat` cards for two headline numbers, and one chart for one quantity. [Consolidate readings](https://legatobar.com/docs/design.md#consolidate-readings)
9. **Charts.** A sparkline for history. A chart never sits directly between two lists of items: put it beside the page's readings, or have it open a closed section of past items. Its filter is the page's period row or a link to a page made with params, never a button. A gauge suits a reading with a fixed size that someone acts on, and a reading that changes through the day is usually clearer as a chart. [Charts](https://legatobar.com/docs/design.md#charts)
10. **Titles and words.** Drop a card's `label` when the page's title and the card's value already make it obvious, or when it would repeat the label of the tab the card is in, and keep it on every other card. Aim for the label lengths in the table, and send numbers as numbers with a `unit`. Say only what the service confirms: "Label created" when a carrier has only made the label, not "Carrier received". When the service has its own window or filter for a figure, use it and name it as the service measures it ("24 hours", not "Today"). Add no explanatory cards, and no note that's on screen most of the time or only restates what a card does: when a list is routinely cut, say it on the card, in its detail or title ("14 furthest of 22"). Two notes are fine, each shown only while it applies: a short note on how to fix missing data the person can fix, and, when the service sends a list in pages or past a high limit, one that says the list is shortened and links to the rest. Don't hide what's useful at a glance, such as an operating system's name, in a closed section; it belongs with the readings. No "last checked" card either, because the page's footer shows when it last updated. [Titles and words](https://legatobar.com/docs/design.md#titles-and-words), [Say when it's from, if it matters](https://legatobar.com/docs/design.md#say-when-its-from-if-it-matters), [A to-do list](https://legatobar.com/docs/design.md#a-to-do-list)
11. **Lists and fleets.** Four rows of a recent list, seven of a working list, and the rest under Show N more. A big fleet takes `max_items`. [Lists](https://legatobar.com/docs/design.md#lists), [Big fleets](https://legatobar.com/docs/design.md#big-fleets)
12. **Fit.** Aim for a page that fits the panel without scrolling. Lay it out for a busy day, the most the service can report, since a quiet account says little about which cards belong. Put half-width cards in pairs, and fold what isn't urgent into a closed section, whose cards still set the page's light. [Fit the panel](https://legatobar.com/docs/design.md#fit-the-panel), [Principles](https://legatobar.com/docs/design.md#principles)
13. **Card style.** A `detail` line says only what the card doesn't already show. Colour an icon only when the colour means something. [Card style](https://legatobar.com/docs/design.md#card-style)
14. **Exceptions.** Use `source.when` to show a card only while its condition holds. Ordinary activity doesn't raise the page's light, and a reading you couldn't get stays visible. Don't call an empty alert area "All clear" unless the source establishes that. [Show exceptions without making everything a warning](https://legatobar.com/docs/design.md#show-exceptions-without-making-everything-a-warning)
15. **Periods.** A detail page reached from an overview with a period row has the same choices, and every card on it follows them. [Overview and detail pages with a period](https://legatobar.com/docs/design.md#overview-and-detail-pages-with-a-period)
16. **Icons.** Prefer a plain outline symbol for the page. A button pair can use the plain and `.slash` or `.fill` forms of one symbol. [Icons](https://legatobar.com/docs/design.md#icons)
17. **Stable and still.** Keep `id`s, card types and order the same from one write to the next. Nothing shifts or grows on hover, on a confirmation or for a missing title, and a menu whose current value matches no choice keeps its place. Only the panel shows whether that holds. [Principles](https://legatobar.com/docs/design.md#principles)

## Review a page

When the request is a review:

1. Read the page, from the file you were given or with `get_page` or `legato get`, and the guide. Read the schema and the service's answer too when a change depends on what they allow.
2. Go through the checks above, in order.
3. List what you'd change. Put first what could do harm or mislead, then the layout, then the wording. For each, give the card's `id` (or say it's about the whole page), what the guide says with its link, and the change you propose.
4. Say what the file couldn't tell you, such as whether the page scrolls in the panel.
5. Change the page only if you were asked to. Then change only what the review named, and leave the rest of the page as it was.

If the person wants something the guide advises against, say so in one line and do what they asked.

## Build, then verify

1. Give every card a stable `id`, unique across the whole page, including cards inside tabs. Create the pages a link opens before the page that links to them.
2. Write with `set_page` or `legato set`, and always send the whole page. When you are replacing a page, pass the version you read as `if_match` (`--if-match` on the command line), so someone else's edit isn't overwritten.
3. Read the answer. `loaded.ok` of `true` means Legato loaded the page. The errors you'll meet most:
   - `invalid_page`: nothing was written, and the old page stays as it was. Fix what the message names and write again.
   - `version_mismatch`: someone changed the page after you read it. Read it again, rebuild, and write with the new version.
   - `load_failed`: the page was saved, and the Legato that's running couldn't load it. Read the page as it is now, fix what the message names, or ask the person to quit and reopen Legato.
4. When `loaded` is `null`, Legato hasn't confirmed yet, and the answer's `note` says why. Read the page with `get_page` a few seconds later. Its `status` is the last load Legato recorded, which can be for an earlier save. To be sure it's about yours, compare the `version` in the page's [status file](https://legatobar.com/docs/page-loading.md#status-files) with the version your write answered. If you can't confirm the load, say so.
5. For a page with sources, check the map before you call it done. `preview_page` (or `legato preview`) fills the cards from a sample of the service's answer and lists what doesn't fit, without fetching anything. After the write, `get_page`'s `status.sources` says when each source last answered, and its latest error.
6. Think through a quiet day, a busy day, a missing value and a failed fetch. Check the `when` on each half of a button pair, and a menu whose current value matches none of its choices. Ordinary activity shouldn't raise the light.
7. Don't press a page's buttons unless the person asked you to. They change the real service.
8. Say what you couldn't check. If you can't see the panel, ask the person to open the page and tell you whether it scrolls, or whether anything moves under the pointer.

The steps are in the guide too, under [Agent workflow: build, then verify](https://legatobar.com/docs/design.md#agent-workflow-build-then-verify). [Errors](https://legatobar.com/docs/errors.md) lists every error code and what to do about it.
