← Commit history

dock.json: declare health, pointed at the /api/status you already serve

John Lauer ·0f53122bb5 ·1mo ago ·parent 6a8baf0
Hydrogen's dock card LED used to mean only 'the dock launched this and its tab is open'. dock_manifest 1.2.0 makes it evidence-based, and your dashboard already returns exactly the shape it wants, per-LED label/state/detail plus a _hint, so this is a three-line declaration and no work on your side. The dock rolls your LEDs up into one card state: green healthy, yellow degraded, red not answering, blinking while a launch is in flight. If you would rather decide your own rollup, add a top-level "state" to /api/status and the dock will use that instead of taking the worst facet, which matters for something like the update LED going yellow without the bridge being unhealthy. Polling is a browser fetch, not a container exec, and it stops while the rail is collapsed. Revert this if you disagree with the shape; the spec is on adom/hydrogen-dock-sdk and is open for comment.
1 file changed +7−2
dock.json+7−2
@@ -1,9 +1,14 @@ {-  "dock_manifest": "1.1.0",+  "dock_manifest": "1.2.0",   "webview": {     "title": "KiCad Dashboard",     "favicon": "docs/img/dock-kicad.svg"   },+  "health": {+    "url": "/api/status",+    "poll_seconds": 15,+    "timeout_ms": 2000+  },   "launch": {     "mode": "container_command",     "console": "show",@@ -30,4 +35,4 @@       "typed": false     }   }-}\ No newline at end of file+}