Files
scarf/tools/widget-schema.json
Alan Wizemann adcc984091 feat(kanban): full read/write board with per-project tenants
Lifts Scarf's Kanban surface from the v2.6 read-only list to a
drag-and-drop board with the complete Hermes v0.12 mutation surface
wired up, plus per-project boards bound to a Scarf-minted tenant slug
and a read-only board on iOS.

Why now: the v2.6 list was a placeholder shipped while upstream Kanban
collab was still mid-rework. v0.12 stabilized the 27-verb CLI; this
release makes Scarf a real GUI client for it. Driving real tasks
end-to-end exposed and closed a connected bug pattern (claim vs
dispatch, silent skipped_unassigned, integer-vs-ISO timestamps,
parser-leaked "(no" sentinel) that would have shipped as latent UX
papercuts otherwise.

ScarfCore: KanbanService actor (Sendable, pure I/O) wrapping every
verb; KanbanTenantReader cross-platform manifest projection; eight
new model types (TaskDetail, Comment, Event, Run, Stats, Assignee,
CreateRequest, Filters); KanbanError; pure transition planner that
maps drag-drop column changes to verb sequences, tested against
canonical Hermes JSON fixtures.

Mac: KanbanBoardView orchestrator with five-column drag-drop layout,
optimistic-merge state, KanbanInspectorPane side-pane (Comments /
Events / Runs / Log tabs, Log streams worker stdout every 2s while
running), inline assignee picker, health banner for unassigned and
last-failed-run states. New Task sheet defaults to active profile
and auto-fires kanban dispatch on submit. Sidebar moved Kanban from
Manage to Monitor. Read-only KanbanListView preserved as Board|List
toggle for narrow windows / accessibility.

Per-project: DashboardTab.kanban tab on every project gated on
hasKanban; KanbanTenantResolver mints scarf:<slug> tenants on first
interaction and persists to .scarf/manifest.json (immutable across
rename); ProjectAgentContextService surfaces the tenant in the
AGENTS.md scarf-managed block so agents pass --tenant <slug> on
kanban create. New kanban_summary dashboard widget; vocabulary
mirrored in tools/widget-schema.json and site/widgets.js.

iOS: read-only board on the project tab via paged single-column
Picker, modal detail sheet with Comments / Events / Runs. Mutations
+ drag-drop deferred to v2.8.

Tests: 19 new pure-logic tests covering decoding, planner verb
mapping, argv assembly, glance string formatting, and parser
rejection of the kanban assignees empty-state sentinel. All 348
ScarfCore tests pass.

Constraints documented in CLAUDE.md: no within-column reorder
(Hermes has no update --priority verb); no live watch streaming
yet (5s polling for board, 2s for log); no bulk re-tag for legacy
NULL-tenant tasks. Pre-v0.12 Hermes hosts gracefully hide the
surface end-to-end.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 13:59:21 +02:00

85 lines
3.9 KiB
JSON

{
"schemaVersion": 1,
"comment": "Canonical project-dashboard widget vocabulary. Single source of truth for the catalog validator (tools/build-catalog.py) and the agent-authoring skill (templates/awizemann/template-author/staging/skills/scarf-template-author/SKILL.md). The Swift renderer (scarf/scarf/Features/Projects/Views/ProjectsView.swift WidgetView) and the JS renderer (site/widgets.js) are hand-written but MUST stay aligned with the type list here. Adding a new widget type: add it here first, then implement the Swift view + JS renderer, then update the SKILL.md Widget Catalog section. Removing or renaming a type breaks every dashboard.json that uses it — don't.",
"widgets": {
"stat": {
"description": "Single big-number metric with optional icon, subtitle, color, and inline sparkline trend.",
"since": "v2.2",
"required": ["title"],
"optional": ["value", "icon", "color", "subtitle", "sparkline"]
},
"progress": {
"description": "0.0..1.0 horizontal progress bar with optional label.",
"since": "v2.2",
"required": ["title", "value"],
"optional": ["label", "color"]
},
"text": {
"description": "Inline text or markdown block. Use 'markdown_file' if the content lives in an external file.",
"since": "v2.2",
"required": ["title", "content"],
"optional": ["format"]
},
"table": {
"description": "Columns x rows of strings.",
"since": "v2.2",
"required": ["title", "columns", "rows"],
"optional": []
},
"chart": {
"description": "Line / bar / area / pie chart over named series.",
"since": "v2.2",
"required": ["title", "series"],
"optional": ["chartType", "xLabel", "yLabel"]
},
"list": {
"description": "Bulleted list with optional typed status badges per item (success / warning / danger / info / pending / done / neutral; unknown values render as plain text).",
"since": "v2.2",
"required": ["title", "items"],
"optional": []
},
"webview": {
"description": "Embedded URL in an iframe / WKWebView. Including a webview also exposes a Site tab in the project view.",
"since": "v2.2",
"required": ["title", "url"],
"optional": ["height"]
},
"markdown_file": {
"description": "Renders a markdown file from disk, relative to the project root. Refreshes when any file under the project's .scarf/ directory changes.",
"since": "v2.7",
"required": ["title", "path"],
"optional": []
},
"log_tail": {
"description": "Tails the last N lines of a file from disk, monospaced. Useful for surfacing the most recent cron-job output. Strips ANSI color codes.",
"since": "v2.7",
"required": ["title", "path"],
"optional": ["lines"]
},
"cron_status": {
"description": "Last run / next run / current state for one Hermes cron job by id, with a tiny inline log tail.",
"since": "v2.7",
"required": ["title", "jobId"],
"optional": ["lines"]
},
"image": {
"description": "Local image file (path relative to project root) or remote URL.",
"since": "v2.7",
"required": ["title"],
"optional": ["path", "url", "height"]
},
"status_grid": {
"description": "Compact grid of colored cells, one per service / item, with hover labels. Reuses the typed status enum.",
"since": "v2.7",
"required": ["title", "cells"],
"optional": ["columns"]
},
"kanban_summary": {
"description": "Compact mini-list of the top in-progress / blocked / todo Kanban tasks for this project's tenant, plus a glance string footer (\"12 todo · 3 running · 5 blocked\"). Pulls from `hermes kanban list` filtered by the project's `kanbanTenant` from manifest.json. Use `value` to set max_rows (default 3).",
"since": "v2.7.5",
"required": ["title"],
"optional": ["value"]
}
}
}