Control UI
Use OpenClaw's typed UI tools for state and layout. Use browser automation only
to inspect or interact with rendered pixels.
Mental model
- A sidebar item is a session, not a dashboard page.
- Each session owns one board. The board contains tabs and widgets.
- Pinning a session keeps it in the sidebar. Sessions with a stored board appear
in the
/dashboards gallery.
screen changes connected Control UI layout and navigation. It does not read
the page or take screenshots.
sessions_list finds sessions. sessions renames, groups, pins, or archives
them. It does not edit board content.
dashboard reads and arranges the current session's board and registered
plugin widgets. show_widget authors or updates custom HTML/SVG widgets.
Do not replace these operations with shell calls or raw Gateway RPC when the
typed tool exists.
Start safely
- Identify the target session and whether the Control UI is local/direct or
published through Tailscale or another HTTPS proxy.
- If the user wants a dedicated sidebar dashboard, choose or create its
visible session before authoring any widget. A tab is only a partition
inside one session's board; it never creates a sidebar row.
- If the current turn is running in a temporary or parent session, hand the
dashboard task to the intended visible session first. Board widgets are
keyed by session and cannot be moved to another session afterward.
- Read current state before changing it:
- use
sessions_list to resolve the session;
- use
dashboard with action: "read" for the current session;
- inspect existing tabs, stable widget names, owners, sizes, and panel layout.
- If the task targets another session's board, move the work into that session.
Dashboard tools intentionally operate on the current session.
Read hosting.md before opening or repairing a remote
Control UI. Read dashboards.md before creating or
restructuring a board.
Navigate and arrange the UI
Use screen for deterministic client commands:
navigate to open a session by sessionKey;
sidebar_show / sidebar_hide for the session sidebar;
split_right / split_down, focus, and close_pane for panes;
terminal_show / terminal_hide and browser_show / browser_hide for
docked panels.
screen broadcasts to every connected Control UI that advertises UI commands;
it cannot select one browser tab. Confirm the blast radius when several clients
may be open. If it reports no capable client, ask the user to open the Control
UI and retry.
Use the in-app browser or an available browser-control tool when the task needs
DOM inspection, clicking, typing, or screenshots. Reuse the existing signed-in
Control UI tab when possible.
Build a session dashboard
- Call
dashboard read. Reuse suitable tabs and widget names.
- Create or rename tabs with
tab_create / tab_update; use short lowercase
slug IDs.
- Add content with the correct owner:
- self-contained custom HTML/SVG or registered-source content:
show_widget with pin: true;
- trusted plugin widgets:
dashboard widget_put with an advertised
pluginKind.
Do not embed Grafana or another external application in an <iframe> inside
show_widget; widget sandboxes reject child-frame URLs and navigation. Use
an ordinary user-clicked link to open the application, fetch an exact HTTPS
API through declared capabilities.netOrigins, use a Gateway data binding,
or install/use a trusted plugin widget instead.
- Use a stable
name when calling show_widget. Reusing the same name with
new widget_code updates the widget in place.
- Arrange with
widget_move, widget_resize, and tab reordering. Prefer size
presets and board order over pixel placement.
- Pin the current session with
sessions patch when it should stay prominent.
- Call
dashboard focus_tab to show the intended tab in the dashboard side
panel. If no Control UI is connected, the command returns unavailable; have
the user open the session and retry.
- Choose the presentation after focusing the tab.
set_presentation with
presentation: "expanded" expands the dashboard; "split" shows it beside
chat in the current panel layout. The human can use
Expand side panel for a full-width dashboard, Collapse to bring chat
back, or close the panel for chat alone.
Never create a fake top-level page for a dashboard. For a dedicated dashboard,
use a dedicated session, pin that session, and build its board from inside it.
Update without breaking the board
- Read first and mutate the smallest unit.
- Keep stable tab IDs and widget names unless replacement is intentional.
- Do not change a widget's content owner in place. Remove it, then recreate it
with the new owner or registered kind.
- Capability grants are bound to exact widget bytes and revision. Changed
content may require approval again.
- Resetting a conversation preserves its board. Deleting the session deletes
the board.
Verify the result
Use two layers of proof:
- State:
dashboard read shows the expected tabs, widgets, names, owners,
order, and sizes; sessions_list shows the expected session
metadata.
- Rendered UI: open the actual Control UI, confirm the correct session and
dashboard panel, then inspect or screenshot the widget frame. Exercise any
important controls.
An HTTP 200 for the shell or widget route is transport proof, not visual proof.
Do not claim the dashboard works until the sandboxed frame renders.
For widgets that fetch live data, exercise that fetch from the rendered frame.
A host-side curl does not prove the browser received the required capability
grant or accepted the endpoint's CORS and mixed-content policy.
If no browser-control or connected-client inspection is available, report the
dashboard as published but visually unverified instead of claiming success.
Recovery order
When a widget is blank or stale:
- confirm the expected session, tab, widget name, and revision with
dashboard read;
- classify the hosting path using hosting.md;
- verify the Control UI origin, the separate widget sandbox origin, and the
protocol used on every reverse-proxy hop;
- if widget JavaScript reports
Failed to fetch, verify its exact HTTPS origin
is declared and granted in capabilities.netOrigins, then check browser CORS
and mixed-content errors;
- after a Gateway restart or routing change, republish/update the widget so the
browser receives a fresh ticketed frame URL;
- reload the Control UI and verify the rendered frame, not only route status.
1---2name: control-ui3description: Operate and troubleshoot the OpenClaw Control UI: navigate connected clients, organize sessions, build session dashboards, and handle direct or Tailscale-hosted Gateways.4---5
6# Control UI
7
8Use OpenClaw's typed UI tools for state and layout. Use browser automation only
9to inspect or interact with rendered pixels.
10
11## Mental model
12
13- A sidebar item is a **session**, not a dashboard page.
14- Each session owns one board. The board contains tabs and widgets.
15- Pinning a session keeps it in the sidebar. Sessions with a stored board appear
16 in the `/dashboards` gallery.
17- `screen` changes connected Control UI layout and navigation. It does not read
18 the page or take screenshots.
19- `sessions_list` finds sessions. `sessions` renames, groups, pins, or archives
20 them. It does not edit board content.
21- `dashboard` reads and arranges the current session's board and registered
22 plugin widgets. `show_widget` authors or updates custom HTML/SVG widgets.
23
24Do not replace these operations with shell calls or raw Gateway RPC when the
25typed tool exists.
26
27## Start safely
28
291. Identify the target session and whether the Control UI is local/direct or
30 published through Tailscale or another HTTPS proxy.
31 - If the user wants a dedicated sidebar dashboard, choose or create its
32 visible session before authoring any widget. A tab is only a partition
33 inside one session's board; it never creates a sidebar row.
34 - If the current turn is running in a temporary or parent session, hand the
35 dashboard task to the intended visible session first. Board widgets are
36 keyed by session and cannot be moved to another session afterward.
372. Read current state before changing it:
38 - use `sessions_list` to resolve the session;
39 - use `dashboard` with `action: "read"` for the current session;
40 - inspect existing tabs, stable widget names, owners, sizes, and panel layout.
413. If the task targets another session's board, move the work into that session.
42 Dashboard tools intentionally operate on the current session.
43
44Read [hosting.md](references/hosting.md) before opening or repairing a remote
45Control UI. Read [dashboards.md](references/dashboards.md) before creating or
46restructuring a board.
47
48## Navigate and arrange the UI
49
50Use `screen` for deterministic client commands:
51
52- `navigate` to open a session by `sessionKey`;
53- `sidebar_show` / `sidebar_hide` for the session sidebar;
54- `split_right` / `split_down`, `focus`, and `close_pane` for panes;
55- `terminal_show` / `terminal_hide` and `browser_show` / `browser_hide` for
56 docked panels.
57
58`screen` broadcasts to every connected Control UI that advertises UI commands;
59it cannot select one browser tab. Confirm the blast radius when several clients
60may be open. If it reports no capable client, ask the user to open the Control
61UI and retry.
62
63Use the in-app browser or an available browser-control tool when the task needs
64DOM inspection, clicking, typing, or screenshots. Reuse the existing signed-in
65Control UI tab when possible.
66
67## Build a session dashboard
68
691. Call `dashboard read`. Reuse suitable tabs and widget names.
702. Create or rename tabs with `tab_create` / `tab_update`; use short lowercase
71 slug IDs.
723. Add content with the correct owner:
73 - self-contained custom HTML/SVG or registered-source content:
74 `show_widget` with `pin: true`;
75 - trusted plugin widgets: `dashboard widget_put` with an advertised
76 `pluginKind`.
77 Do not embed Grafana or another external application in an `<iframe>` inside
78 `show_widget`; widget sandboxes reject child-frame URLs and navigation. Use
79 an ordinary user-clicked link to open the application, fetch an exact HTTPS
80 API through declared `capabilities.netOrigins`, use a Gateway data binding,
81 or install/use a trusted plugin widget instead.
824. Use a stable `name` when calling `show_widget`. Reusing the same name with
83 new `widget_code` updates the widget in place.
845. Arrange with `widget_move`, `widget_resize`, and tab reordering. Prefer size
85 presets and board order over pixel placement.
866. Pin the current session with `sessions patch` when it should stay prominent.
877. Call `dashboard focus_tab` to show the intended tab in the dashboard side
88 panel. If no Control UI is connected, the command returns unavailable; have
89 the user open the session and retry.
908. Choose the presentation after focusing the tab. `set_presentation` with
91 `presentation: "expanded"` expands the dashboard; `"split"` shows it beside
92 chat in the current panel layout. The human can use
93 **Expand side panel** for a full-width dashboard, **Collapse** to bring chat
94 back, or close the panel for chat alone.
95
96Never create a fake top-level page for a dashboard. For a dedicated dashboard,
97use a dedicated session, pin that session, and build its board from inside it.
98
99## Update without breaking the board
100
101- Read first and mutate the smallest unit.
102- Keep stable tab IDs and widget names unless replacement is intentional.
103- Do not change a widget's content owner in place. Remove it, then recreate it
104 with the new owner or registered kind.
105- Capability grants are bound to exact widget bytes and revision. Changed
106 content may require approval again.
107- Resetting a conversation preserves its board. Deleting the session deletes
108 the board.
109
110## Verify the result
111
112Use two layers of proof:
113
1141. **State:** `dashboard read` shows the expected tabs, widgets, names, owners,
115 order, and sizes; `sessions_list` shows the expected session
116 metadata.
1172. **Rendered UI:** open the actual Control UI, confirm the correct session and
118 dashboard panel, then inspect or screenshot the widget frame. Exercise any
119 important controls.
120
121An HTTP 200 for the shell or widget route is transport proof, not visual proof.
122Do not claim the dashboard works until the sandboxed frame renders.
123For widgets that fetch live data, exercise that fetch from the rendered frame.
124A host-side `curl` does not prove the browser received the required capability
125grant or accepted the endpoint's CORS and mixed-content policy.
126If no browser-control or connected-client inspection is available, report the
127dashboard as published but visually unverified instead of claiming success.
128
129## Recovery order
130
131When a widget is blank or stale:
132
1331. confirm the expected session, tab, widget name, and revision with
134 `dashboard read`;
1352. classify the hosting path using [hosting.md](references/hosting.md);
1363. verify the Control UI origin, the separate widget sandbox origin, and the
137 protocol used on every reverse-proxy hop;
1384. if widget JavaScript reports `Failed to fetch`, verify its exact HTTPS origin
139 is declared and granted in `capabilities.netOrigins`, then check browser CORS
140 and mixed-content errors;
1415. after a Gateway restart or routing change, republish/update the widget so the
142 browser receives a fresh ticketed frame URL;
1436. reload the Control UI and verify the rendered frame, not only route status.