Canvas Themes
A Canvas theme can fully rewrite the layout, interaction and charts of the public status page. The entry HTML runs in an iframe with sandbox="allow-scripts" and no allow-same-origin, under its own CSP.
Differences from CSS Themes
| Capability | CSS theme | Canvas theme |
|---|---|---|
| Layout | Host DOM | Fully self-drawn |
| Data | Existing host DOM | nie-sla:status snapshot + restricted history requests |
| Resources | Loaded by the host page | Packaged in the ZIP (fonts, images, scripts, styles) |
| Height | Page itself | 400-12000, updatable at runtime |
Manifest
{
"schema": "nie-sla-theme-v1",
"id": "example-canvas",
"name": "Example Canvas",
"version": "1.0.0",
"type": "theme",
"mode": "canvas",
"entry": "index.html",
"permissions": ["status:read"],
"height": 1000,
"author": "Developer",
"description": "A full-layout NIE-SLA theme.",
"license": "MIT",
"files": ["manifest.json", "index.html", "theme.js", "assets/logo.webp"]
}permissions must be exactly ["status:read"]. height is the initial height and can be updated at runtime through the message protocol.
Permission Boundary
A Canvas theme cannot fetch external networks directly, read the host DOM, cookies or Web Storage, submit forms, open top-level navigation, spawn Workers or nest frames. Fonts, images, code and styles all ship inside the ZIP. It also cannot read the Admin API, Agent tokens, notification configuration or Cloudflare bindings. status:read means reading public status, checks, metrics, pings and latency through the host proxy, not arbitrary URL access.
Acceptance Scenarios
- No targets, a single target, many targets and very long names.
- Cloudflare probes failing while the Agent is online, and the reverse.
- Non-empty
warnings[], empty history, missing temperature fields. - No in-iframe horizontal overflow at 320/375/768/1440 pixel widths.
prefers-reduced-motion, keyboard focus, contrast and screen-reader states.- Request timeouts, HTTP 429, theme reload and duplicate status snapshots.
- All content stays reachable when dynamic height is clamped to
400-12000.
The complete message format is in the message protocol.