Skip to content

Summary and blocks

The app draws the card’s frame (icon, title, status tint, “updated …”, and the error, stale and paused states). summary() provides its content:

{
title?: string; // defaults to the item name (≤ 80)
subtitle?: string; // ≤ 120
icon?: { symbol?: string; emoji?: string };
status?: "neutral" | "ok" | "info" | "warning" | "critical";
primary?: { value: DisplayText; unit?: string; label?: string;
trend?: { direction: "up" | "down" | "flat"; text?: string; sentiment?: "positive" | "negative" | "neutral" } };
blocks?: Block[]; // ≤ 8; null/false entries are skipped
footnote?: DisplayText;
url?: string; // http(s); opened when the card is tapped
}

A DisplayText is one of:

  • a string;
  • a number;
  • a date the app renders itself, written { date: ISO string | epoch ms, style?: "relative" | "date" | "time" | "dateTime" }.

A Date object becomes a relative date. Relative dates stay current on a cached card, so never pre-format “5 minutes ago”.

Block Shape Limits
text { text: DisplayText, style?: "body" | "caption" | "mono" } 500 characters
keyValue { rows: { key, value: DisplayText }[] } 8 rows
list { items: { title, subtitle?, trailing?, url?, symbol? }[] } 10 items
progress { value: 0…1, label? } values are clamped
sparkline { values: number[], status? } needs at least 2 points; the last 200 are kept
badges { items: (string | { text, status? })[] } 8 badges of 30 characters
divider {} —

Every block also has type, set to its name. Designing the card shows each one drawn.

Normalization is forgiving. Unknown fields and block types, wrong types and oversized values are dropped or truncated and logged as warnings, and the rest of the card still renders. Only a result that is not an object fails the run (invalidOutput).