App: dark-aware HTML views, run cards, changed/missing file notes, one card width, dense diff rows

show_html documents that declare dark support follow the app theme; others
stay light. Tool description and skill docs say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 19:54:58 +00:00
parent d204ce3187
commit f02ff56dfe
27 changed files with 1086 additions and 61 deletions
+13 -4
View File
@@ -140,10 +140,19 @@ that row stays visible because it can contain other code.
operator's scheduled prompt, a follow-up that is not due yet does not hold
the FIFO queue: `chatQueueHead` skips it, so the operator's prompts go
through.
- **HTML theme.** The client passes the app's brightness into the sandbox
(`color-scheme` on the frame plus a `color-scheme` meta in the document), so
`prefers-color-scheme` follows the operator's theme; the tool description
tells the model to style for both.
- **HTML theme.** A document that declares dark support
(`prefers-color-scheme`, `color-scheme` or `light-dark()`) is shown in the
app's theme (not the system's): `artifact_html_theme.dart` inserts a
`color-scheme` meta naming that scheme and rewrites each
`prefers-color-scheme` query to always/never match, and the web frame gets the
same `color-scheme` (canvas `Canvas` when dark). Any other document stays
light on white, since its colours were chosen for that. The tool description
tells the model so.
- **Cards.** Every shown card is held to one width (`chatShownCardMaxWidth`,
720). Diff file rows are one dense line (path, counts). A run card shows
pipeline, title, status chip, `#id · stage · duration` (ticking while it
runs) and opens the run. File cards show "Changed since shown" / "No longer
exists" (a missing file loads and opens nothing).
## Per-harness registration