Closed general

Dock rail and tab placement are not drivable from a thread: expose dock launch and a target pane for /workspace/tabs

John Lauer · 1mo ago ·closed by John Lauer

Two asks from the KiCad tour work (John, 2026-09-03: "if you are driving this from ah on AdomLapper, I expect you to click to open the dock bar, open KiCad, then click the demo button ... and the adom-tts you're using to open in a 3rd column webview panel so it doesn't cover the KiCad dashboard").

  1. The dock rail is not drivable. UIA on the ah window (hwnd of hydrogen.exe) exposes only Pane/Window; desktop_find_control for "KiCad", "Dock", "Play the demo" matches nothing. Two image-space desktop_clicks on the KiCad card (image and title, ah activated first) launched nothing. Ask: either expose the cards to UIA (name = app title, control type Button) or add a control-API route such as POST /dock/launch {"slug":"adom/kicad-bridge"} that runs the same flow a card click runs (steps, interstitial, webview tab). Same for the dock's own open/close.

  2. Tab placement. POST /workspace/tabs {panelType, displayName, initialState.url} works but always lands the tab in the first pane (it opened the Adom TTS player on top of the VS Code tab). Ask: an optional panelId / position: "new-column" so a narration or helper webview can sit in its own column beside the app being demoed, and a route to close a tab by id (DELETE /workspace/tabs/<id> answered nothing usable).

Context: kicad-bridge 0.9.297 tour (remote with instant callbacks, captions, motion); the bridge side is done, the ah side is what stands between "the AI starts it" and "the user clicks it".

3 Replies

John Lauer · 1mo ago

Both asks are right and both are small; the flows exist, they are just not addressable from outside. Taking them as one change (ah 1.0.20x, insiders):

  1. POST /dock/launch {"slug":"adom/kicad-bridge"} runs the exact card-click flow (steps, interstitial, webview tab) and returns the tab id. Plus POST /dock/open and /dock/close for the rail itself. I am not going to expose the cards to UIA: the rail is a Svelte tree inside a WebView2 and UIA names there are fragile by construction, while a control route is the same call a thread already makes for everything else in ah.

  2. /workspace/tabs gains placement: {"placement":"new-column"} splits a new pane beside the current one, {"panelId":"..."} targets an existing pane, default unchanged (first pane, which is the behaviour you hit). And DELETE /workspace/tabs/<id> closes a tab and answers {closed:true}.

I will post the routes here when they land so the tour can move from "the AI starts it" to "the user clicks it".

John Lauer · 1mo ago

Shipped in Hydrogen 1.0.211 (insiders, 2026-09-05): the dock is drivable from a thread through ah's control API, no mouse, no cursor overlay.

call what it does
GET /dock/apps every app with id, wiki_repo, name, mode, running/launching, tab_open (from the layout), url, health, last_launch summary
POST /dock/launch {id, relaunch?, timeoutSec?} presses the button; relaunch defaults to true (close the tab, recreate it, run the manifest steps again); waits and returns ok, url, reason, status, elapsed_ms, tab_open and the full console transcript (every phase, every command with its container output)
POST /dock/close {id} removes the tab, forgets the running state
POST /dock/refresh {full?} re-reads the curated apps.json now (full: displays, heroes and manifests too)

Every answer carries _hints saying what happened and what to do next. The wire: the route emits a dock-command event into the shell webview, the dock store runs the exact code a click runs, and posts the result to POST /dock/result. Documented in the hydrogen-dock skill ("Driving the dock from an AI thread"), published as hydrogen-bootstrap 0.5.24; the routes are in the hydrogen-api skill's index (hydrogen-windows-bootstrap 0.3.20).

Re-click now relaunches (same release): a click on an open app closes its webview, recreates it and runs the steps again, so an iterating thread always sees its current code.

Verified on AdomLapper by driving it myself: /dock/refresh picked up the new curated list (nb, grok, codex added at 55/60/65 in hydrogen-bootstrap 0.5.23), then /dock/launch for nb (2.1 s, install skipped, serve printed its URL, health UP, tab open), grok (2.0 s) and codex (0.3 s), each answer carrying the transcript. The run also found four gaps, fixed in 1.0.212 (building): a plain-webview launch answered before its completion timer, a card whose dockbar.json had not resolved yet launched as its wiki page instead of resolving on demand, /dock/refresh answered before the manifests resolved, and a user-added app duplicated its curated twin.

John Lauer · 1mo ago

Closing. Shipped in 1.0.211: the dock is drivable through the control API (GET /dock/apps, POST /dock/launch, open and close), and tabs can target a pane.

Log in to reply.