adom-workspace-control

Install

Adom workspace panel and pane management — open, close, split, resize, swap, and move tabs in the Hydrogen editor layout

adom-wiki pkg install adom/adom-workspace-control

Latest: v2.1.1, published

Contents

Adom Workspace Control

🛑 Never wipe the user's full Hydrogen layout — and never remove the VS Code tab 🛑

The danger is leaving the Hydrogen screen empty, or without VS Code. The user panics because "everything is gone" and they can't tell what happened.

What's safe

  • Per-tab CLI operations via adom-cli hydrogen workspace ...: add-tab, remove-tab, move-tab, swap, split, resize, active-tab, close-panel. These are bounded — each mutates one tab/pane at a time. Use them freely.
  • GET on the editor endpoint is fine (read-only).

What's NOT safe

  • Never call curl, gh api, fetch, or any raw HTTP client with PUT, PATCH, or DELETE against https://hydrogen.adom.inc/api/workspaces/editor/<user>/<ws>/current. That endpoint is the WHOLE LAYOUT; any write replaces it wholesale and wipes every panel, tab, and split.
  • Never remove the VS Code tab — even via a safe CLI op — unless the user explicitly asks. VS Code is where the user lives; removing it is indistinguishable from "everything is broken" to them.
  • Never remove the last remaining tab in a pane without the user asking (pane goes blank; if it's the only pane, the workspace looks wiped).

Just-in-time confirmation: ALWAYS use AskUserQuestion before any authorized destructive op

Even when the user has explicitly asked for a destructive action (workspace wipe, screenshot-the-empty-state dance, mass tab close, anything that would leave the screen empty), call the harness-level AskUserQuestion tool as the IMMEDIATE LAST ACTION before firing the destruction. The user clicks "Proceed" and the destructive call fires in the same tool-turn — no drift between click and wipe.

Why: the user is typing to Claude while you work. If you said "going now" three tool calls ago, they've resumed typing; firing destruction now eats whatever they're mid-drafting. AskUserQuestion is blocking and synchronous in the Claude Code chat UI, but non-