← Commit history

Widgets: feature row, section and sub-readme with a title-bar screenshot; Report a problem in the Adom menu

John Lauer ·f1172a2948 ·1mo ago ·parent 3c74693
3 files changed +69
README.md+17
@@ -125,6 +125,7 @@ Hover a card and dwell, and it zooms to a full billboard so you can actually rea |---|---| | [The Dock Bar](docs/dockbar.md) | The full tour with screenshots of everything the Dock Bar does (the interstitial, webview takeover, container launch steps, AI threads new and resumed, health LEDs, honest failures, settings), plus the complete `dockbar.json` manifest reference and the publisher checklist for making YOUR app dock-ready. | | [Project workspaces](project-workspaces/README.md) | The layout a project ships (hydrogen/workspace.json): the menu next to the Adom logo, Apply, Unload and Save as project workspace, the one-time offer, placeholder tabs that know the Adom Bridge state, and every control on the API so your AI never needs a mouse. Opens with a 70-second video. |+| [Widgets](widgets/README.md) | Small live panels in the title bar, served from your workspace: Claude usage (5-hour, weekly, model bucket), Codex usage, a clock to copy. Any wiki repo can ship one with a hydrogen-widget.json; open widgets come back after a restart; everything is on the control API. |  **Publishing an app?** Start with the [Dock Bar guide](docs/dockbar.md); the `hydrogen-dock` skill that ships in every Hydrogen container teaches your AI the same contract. To request a spot on the global list, open an issue on this page. @@ -167,6 +168,10 @@ When something feels broken and you don't know what, open the Doctor. It runs ab  Two buttons do the repairing. **Fix problems** runs the safe repair (the same one the wake recovery uses) and then re-runs every check so you can see the before and after. **Restart workspace** is the bigger hammer, and Hydrogen only offers it when the safe fix wasn't enough; it asks first, because it reloads your editor for about thirty seconds. Your AI can run the Doctor too (it's on the control API), so "hey, something's broken" in chat is a legitimate way to start. +### Report a problem++Files an issue on this page in your name, with the last part of Hydrogen's log and the Doctor's checks attached, so nothing needs to be hunted down by hand. The same button appears on the setup card when setup stops, and signs you in first if you are not yet (an Adom account is created on that page if you have none). Your AI can do it too: POST /report/problem.+ ### Run Wake Check  Laptops sleep, and the Linux world inside WSL2 sometimes wakes up groggy. Hydrogen detects the wake and repairs the connection automatically: it confirms the editor backend is genuinely serving again, restores credentials the sleep wiped, and un-sticks the editor pane if it froze, all before you notice. A small indicator in the header (optional, in Settings) shows the repair happening with a live play-by-play tooltip.@@ -309,3 +314,15 @@ Uninstall Hydrogen like any Windows app: **Settings → Apps → Installed apps - **Setup paused at "Claude Authentication."** That's the one human step, approve the sign‑in in the browser window Hydrogen opened, and it continues automatically. - **"Ensure container runtime" won't complete.** Make sure WSL2 is healthy (`wsl --version`, `wsl -l -v`). A stale or corrupt `Adom‑Workspace` distro can be reset with `wsl --unregister Adom-Workspace`: Hydrogen re‑imports a fresh v15 image on the next launch. - **Something feels out of date.** The container self‑updates, but you can force it from the container terminal: `adom-wiki pkg install adom/hydrogen-windows-bootstrap`.++## Hydrogen widgets (small live panels in the title bar)++Left of the bell there is a grid icon: **Widgets**. Each widget is a page about 30 px tall, served by a small program inside your workspace and shown in a sandboxed slot in the title bar. Open one from the pulldown and it stays open across restarts, per user.++Three ship today:++- **Claude usage**: your 5-hour session, your weekly limit, and the weekly model bucket that applies, as percent used, from the Claude Code sign-in in your workspace. The numbers you would otherwise check by hand in Claude Code's `/usage`.+- **Codex usage**: the plan's rate-limit window as percent used, from the Codex sign-in.+- **Clock**: the time and date, and the smallest possible widget, the one to copy when you make your own.++Making one is a facet a wiki repo carries, `hydrogen-widget.json`, next to its dock manifest or its project workspace, or alone. The [hydrogen-widget skill](https://wiki.adom.inc/adom/hydrogen-bootstrap/files/skills/hydrogen-widget/SKILL.md) has the manifest, the launch contract and a fifty-line example. Your AI drives all of it with no mouse: `GET /widgets`, `POST /widgets/open {"id":"claude-usage"}`, `POST /widgets/close`, `POST /widgets/navigate`, `GET /widgets/status`. Details and pictures: [Widgets](widgets/README.md).
widgets/README.mdadded+52
@@ -0,0 +1,52 @@+# Widgets: small live panels in the title bar++![Three widgets in the Hydrogen title bar: Claude usage, Codex usage and a clock](widgets/title-bar-widgets.png)++Left of the bell there is a grid icon, **Widgets**. Open one from that pulldown and a small+panel appears in the title bar, served by a program running inside your workspace and shown in+a sandboxed slot. It stays open across restarts, per user, and closes from the same pulldown or+the small x that appears when you hover it.++## The three that ship++| Widget | Shows | Where the numbers come from |+|---|---|---|+| Claude usage | your 5-hour session, your weekly limit, and the weekly model bucket that applies, as percent used | the Claude Code sign-in in your workspace, the same numbers Claude Code shows in `/usage` |+| Codex usage | your plan's rate-limit window as percent used, plus a secondary window when the plan has one | the Codex sign-in in your workspace, what Codex shows in `/status` |+| Clock | the time and date | the workspace clock; the smallest possible widget, the one to copy |++A widget with nothing to show says so in its slot ("sign in to Codex in this workspace") rather than staying blank.++## Driving it from an AI++Nothing in the pulldown needs a mouse. On Hydrogen's control API:++| Route | What it does |+|---|---|+| `GET /widgets` | the list, with `open`, `status` (closed, installing, starting, live, failed) and `url` per widget |+| `POST /widgets/open {"id":"claude-usage"}` | mounts the slot, installs the widget's package, launches it, hands the slot over when its page answers |+| `POST /widgets/close {"id":"..."}` | unmounts the slot and stops the program |+| `POST /widgets/navigate {"id":"...","url":"..."}` | points an open slot at a page yourself |+| `POST /widgets/refresh` | re-reads the list from the wiki and your checkout |+| `POST /widgets/menu {"open":true}` | shows or hides the pulldown |+| `GET /widgets/status` | open ids, each widget's status and url, the pulldown state |++UI-bus commands `widgets.menu.open` and `widgets.menu.close` do the same as the pulldown click.++## Making your own++A widget is a facet a wiki repo carries: a `hydrogen-widget.json` at its root, next to its dock+manifest or its project workspace, or on its own. Any repo in your checkout with that file+shows up in the pulldown at once, marked "(checkout)", so you can build one without publishing.+Publishing it and asking the adom team to list it in `widgets/widgets.json` on+adom/hydrogen-bootstrap puts it in front of everyone.++The [hydrogen-widget skill](https://wiki.adom.inc/adom/hydrogen-bootstrap/files/skills/hydrogen-widget/SKILL.md)+has the manifest fields, the launch contract (`HYDROGEN_WIDGET_ID`, `HYDROGEN_WIDGET_PORT`,+`HYDROGEN_WIDGET_SLOT`, the health URL and the explicit takeover) and the fifty-line clock to+copy. Your AI already has that skill.++## Why the name++wiki-widget is the component-page widget, and other surfaces will get their own+(kicad-widget, fusion-widget). hydrogen-widget is only ever the title bar.
widgets/title-bar-widgets.pngadded
⋯ 1 unchanged line ⋯