Adom Hydrogen
Public Made by Adomby adom
The whole Adom experience as one signed native app: your editor, your AI agent, and the full electronics design toolchain, running locally on your own machine.
Wake-from-sleep self-heal: auto-clear the 'Cannot reconnect' dialog by reloading ONLY the VS Code pane, only when provably required
Type: Feature (design agreed with John 2026-08-02; proven manually the same morning)
Symptom today: close the laptop lid overnight; on wake the VS Code pane shows the workbench's terminal modal, "Cannot reconnect. Please reload the window." It sits there until the user clicks Reload Window by hand. HD, a desktop app that can know the machine just resumed, does nothing.
Proof this is deterministically healable (live, 2026-08-02): after an overnight sleep, /workspace/health reported fully healthy (distro running, code-server 200, editor_will_load true) while the dialog was still up. One click of the dialog's own Reload Window button reconnected instantly, restored the Claude tabs with their conversations, and activated the freshly staged adom-vscode 1.1.13. So when the backend is healthy and that dialog is showing, reload is guaranteed-correct and the ONLY remaining action (the workbench has permanently given up retrying by the time it shows this modal).
Design (wake-heal cascade):
- Detect resume without Win32 plumbing: a 10s wall-clock tick task; if SystemTime jumped >90s between ticks, the machine slept (HD's own #7 logs prove the process freezes through sleep, heartbeat 26150s -> 26160s across 13 wall-clock hours). Optionally add WM_POWERBROADCAST later; the gap detector alone is sufficient and cross-platform.
- Heal the backend first: poll the existing /workspace/health logic (in-process, NOT wsl.exe-spammed) with backoff up to ~2 min; the existing supervisor restart paths cover an unhealthy distro/code-server.
- Only then look at the pane: CDP-eval the workbench frame (the /eval-in "workbench" target infra already exists) for the terminal reconnect dialog (.monaco-dialog-box containing "Cannot reconnect").
- Dialog present + backend healthy -> reload ONLY the VS Code pane (emit an event; PanelVisualStudioCode resets the iframe behind the 0.1.303 editor-cover splash). Never the HD window, never other tabs; the Wiki pane etc. are untouched. This honors "reload is a last resort": the terminal dialog IS the proof that nothing less works.
- No dialog -> do nothing (short sleeps where the workbench reconnected on its own).
- Toast "Workspace reconnected after sleep" so the heal is visible but not modal.
Explicitly rejected: auto-reloading on every wake (reload without checking is the annoying thing we are replacing); wiring anything through wsl.exe (hd-prefer-adom-vscode); touching the whole window.
Ship note: needs a laptop build slot (running HD is currently a dirty build owned by another thread; coordinate before hd_stop).