---
title: Devtools panel reference
description: Every input and output of the weft devtools panel — its data-* attributes and weft:* meta tags with type, default and whether a change is applied live, the mount() options, the element's and window.weft.devtools's members, the npm exports and subpaths, the weft:* events, the --weft-* CSS tokens, the keys and the localStorage fields.
url: https://weftgo.dev/docs/reference/panel/
type: reference
sources:
  - 'weft/studio/web/src/panel/layout.ts:51-52, 125-126 (TABS; an unknown stored tab opens story, or raw when raw is set); weft/studio/web/src/panel/element.ts:2438-2476 (autoMounted: removed only when no Studio answered, not walled, and not a named loopback endpoint); weft/studio/web/src/lib/palette.ts:30 (warn #875c04, light); weft/studio/web/src/panel/config.ts:478-500 (no scope named: a panel token''s claims) — v0.20.2'
  - 'weft/studio/web/src/lib/keys.ts:122-150 (PANEL_KEYMAP); weft/studio/web/src/panel/element.ts:3670-3725 (the key handler: the g s chord in 1.5 s, the view keys case-insensitive, J and ] , K and [, o) — v0.20.2'
  - 'weft/studio/web/src/panel/config.ts:1-32 (the six-rung ladder, the scope''s two spellings), 41-48 (PanelPosition: 3 values; PanelPlacement: 6), 49-99 (PanelConfig: every field''s meaning), 101-116 (MountOptions inside the panel), 118-122 (DetectSetting, detectSetting), 122-129 (POSITIONS), 131-147 (FIELDS), 259-295 (findPanelScript: data-weft), 376-390 (optionsRung: no global, mode, push or z-index), 306-323 (metaRung, attrRung), 431-548 (readConfig: every parse and default), 550-572 (discoverEndpoint: same origin, no credentials), 350 (window.__WEFT__), 425-447 (weft_scope in the query, then the fragment), 537-562 (headerRungOn, markerRungOn), 213-227 (?weft=debug, weft_debug)'
  - 'weft/studio/web/src/panel/element.ts:504-513 (HOW_TO_SCOPE), 525-529 (SHORTCUTS), 538-576 (DevtoolsEvents, DEVTOOLS_EVENTS), 578-604 (DevtoolsAPI), 669-716 (scopeValue: sessionId and runId), 817-830 (observedAttributes: no data-mode), 866-874 (autoMounted, options), 1074-1111 (connectedCallback: data-position, data-open and data-mode are initial values; Alt+W on window), 1252-1296 (isOpen getter, open, close), 1309-1358 (scope, lookupSession), 1363-1409 (select), 2283-2292 (on), 2292-2293 (studioLink), 1413-1432 (api: one frozen object), 1505-1548 (syncGlobal and its footer lines), 791-791 (run, error, parked), 745-761 (fire: queueMicrotask, bubbles, composed), 2115-2140 (rescan, attributeChangedCallback: data-position moves the dock), 2497-2504 (toggle), 3598, 2765 (data-z-index on the dock and the pill)'
  - 'weft/studio/web/src/panel/element.ts:3665-3743 (panelKey: Tab before the typing check, Timeline rows, the g chord 1.5 s, Esc on a drawer, r or R, / on Request)'
  - 'weft/studio/web/src/panel/main.ts:107-127 (publicId and scope watched on the object), 1-13 (what the bundle does), 60-68 (the self-mount decision: data-auto or ?weft=debug, no markup)'
  - 'weft/studio/web/src/panel/layout.ts:22 (CYCLE), 25-54 (Layout, TABS), 57 (STORE_KEY), 60-69 (MIN_W, MIN_H, GAP, NARROW_W, SHEET_VW), 71-71 (initialLayout: 520×560, 460, mode), 103-196 (readStore: v 1 only), 79-85 (PLACE), 91-138 (writeStore), 142-226 (migrateDebug), 227-280 (Push, --weft-devtools-inset)'
  - weft/studio/web/src/panel/theme.ts:1-36 (the theme order, themeSetting)
  - weft/studio/web/src/panel/markers.ts:1-24 (data-weft-scope, data-weft-untrusted)
  - 'weft/studio/web/src/panel/styles.ts:43-63 (TOKENS), 87-89 (:host tokens, data-theme-resolved), 98, 128 (z-index: var(--weft-z, 2147483000))'
  - 'weft/studio/web/src/lib/palette.ts:19-60 (PALETTE: light and dark values), 64-99 (STUDIO_NAMES)'
  - weft/studio/web/src/lib/scope.ts:1-28 (Scope and its string form), 33-53 (serializeScope, parseScope)
  - 'weft/studio/web/src/npm/index.ts:20-25 (exports parseScope, serializeScope, Scope), 27-40 (Position: 6; Mode), 42-81 (MountOptions), 83-86 (PanelOptions), 91-122 (WeftDevtoolsElement), 124-147 (DevtoolsEvents), 156-176 (no global), 230-242 (layout: mode, push and zIndex as attributes), 244-335 (mount), 337-378 (scope), 380-391 (select), 393-397 (isOpen: a function), 399-407 (studioLink), 409-439 (open, close, toggle), 441-461 (on: on document)'
  - 'weft/studio/web/src/npm/marker.ts:11-24 (HelperOptions), 27-65 (attach: lazy import, mount only with endpoint or token)'
  - 'weft/studio/web/src/npm/react.ts:9-33 (useWeftDevtools: a callback ref)'
  - 'weft/studio/web/src/npm/vue.ts:9-23 (useWeftDevtools: a function ref, options or a getter)'
  - weft/studio/web/src/npm/svelte.ts:9-30 (weftDevtools action, useWeftDevtools)
  - weft/studio/web/npm/package.json:3, 31-63 (version, exports, types)
  - weft/studio/web/npm/README.md:48-56 (the meta-tag list it gives), 103-126 (API table)
  - weft/studio/README.md:1111-1197 (layout attributes, theme, tokens, localStorage), 1199-1221 (keyboard), 1274-1316 (the configuration ladder), 1456-1507 (host API, events, the global)
  - weft/studio/web/src/panel/state.ts:745-745 (any fetchMeta failure, a refused 401 or 403 included, sets gone); weft/studio/web/src/panel/element.ts:2436-2474 (the self-mounted dock removed, a mount the host made shows the not-reachable line)
  - 'observed in the fact-check of the devtools pages (docs-site/factcheck/devtools-1.md, devtools-2.md): typeof element.isOpen is boolean; data-open set after load leaves isOpen false; Object.keys(window.weft.devtools) is the eight members; getComputedStyle(host) returns --weft-result, --weft-status-run and --weft-status-run-ink; Alt+Shift+W cycles right, bottom, left, top, float'
---

# Devtools panel reference

The devtools panel is one custom element, `<weft-devtools>`, configured by `data-*` attributes, `weft:*` meta tags or `mount()` options, driven by its methods, observed through `weft:*` events and styled by `--weft-*` custom properties. This page lists each of them with its type, default and behaviour. How to install and use the panel is under [Devtools](https://weftgo.dev/docs/observe/devtools/overview/); the panel's script is served by Studio's [`/panel.js`](https://weftgo.dev/docs/reference/studio-api/) route.

A script tag that sets five fields, and the same five as meta tags:

```html
<script type="module" src="/studio/panel.js" data-weft
        data-position="right-dock" data-open="true" data-push="true"
        data-theme="dark" data-scope="pub_demo"></script>

<meta name="weft:position" content="right-dock">
<meta name="weft:open" content="true">
<meta name="weft:push" content="true">
<meta name="weft:theme" content="dark">
<meta name="weft:scope" content="pub_demo">
```

## Attributes and meta tags

Thirteen fields configure the panel. Each resolves on its own, the first source that sets it winning: `mount()` options, then the element's `data-*` attributes, then `<meta name="weft:*">` tags, then the panel's script tag, then (for the endpoint only) `panel-config.json`, then the script's own directory. [Install the panel](https://weftgo.dev/docs/observe/devtools/install/#where-configuration-comes-from) explains the ladder.

| Attribute | Meta tag | Values | Default | A change |
|---|---|---|---|---|
| `data-endpoint` | `weft:endpoint` | Studio's base URL, http or https, a trailing `/` added; another scheme and the panel does not start; an empty value sets nothing | the script's origin and directory; with no explicit endpoint, `panel-config.json` beside the script may move its path (same origin only) | live: a new connection |
| `data-scope` | `weft:scope` | the scope's string form, `pub_…;session=…;flow=…;run=…` | `window.__WEFT__`, then the page URL, markers and headers; since 0.20.0, with none of them, a panel token's claims ([scope](https://weftgo.dev/docs/observe/devtools/scope/)) | live: rescopes |
| `data-public-id` | `weft:public-id` | a public id: the older, deprecated spelling of `data-scope` | none; `data-scope` wins at the same rung | live: rescopes |
| `data-token` | `weft:token` | a bearer token: a panel token in pages you ship | none (setup A) | live: a new connection |
| `data-detect` | `weft:detect` | `headers`, `markers`, `headers,markers` (any order, any case), or `off`; `off` anywhere wins, another word makes it unset | unset: the header rung on only with page and endpoint on loopback and no panel token; the marker rung on except off loopback under a read-scoped panel token | live |
| `data-position` | `weft:position` | `bottom-right`, `bottom-left`, `right-dock`, `left-dock`, `top-dock`, `bottom-dock`; another value reads as the default | `bottom-right` | live: moves the dock, keeps its size. The user's stored placement wins over it on load |
| `data-open` | `weft:open` | `"true"`, or the attribute present and empty | collapsed (the pill) | read once, when the element first connects. A stored placement wins over it, `data-mode` `float` or `dock` opens the panel and `pill` collapses it |
| `data-mode` | `weft:mode` | `float`, `dock`, `pill`, `hidden` | from position and open | read once; not an observed attribute. `float` and `dock` start expanded, `pill` collapsed, `hidden` draws nothing (the API and events still work); a stored placement wins |
| `data-push` | `weft:push` | `"true"` | off | live |
| `data-z-index` | `weft:z-index` | an integer, trimmed | `--weft-z` on the element, else `2147483000` | live |
| `data-theme` | `weft:theme` | `light`, `dark` (any case, trimmed); anything else is `auto` | `auto`: the stored ◐ choice, then the page's `<html>` (`data-theme`, then `class="dark"` or `"light"`, then its `color-scheme`), then `prefers-color-scheme`, else dark | live |
| `data-auto` | `weft:auto` | any value but `"false"` is on | on | read once, by the bundle's self-mount decision, from a meta tag or the script tag only. On a `<weft-devtools>` element it is an observed attribute but does nothing |
| `data-global` | `weft:global` | `off` or `false` (any case) turns it off | on: `window.weft.devtools` while the panel is connected | live |

"Live" means a change to the element's attribute is applied at once. A meta tag or a script tag's attribute is read whenever the element re-reads its configuration (an observed attribute change, `rescan()`, a new `window.__WEFT__`), but changes to them are not watched. `mount()`'s `mode`, `push` and `zIndex` are written onto the element as `data-mode`, `data-push` and `data-z-index`.

Other attributes the panel reads or writes:

| Attribute | On | Meaning |
|---|---|---|
| `data-weft` | the panel's `<script>` tag | Marks the tag whose `data-*` fields configure the panel, whatever its `src` (a renamed or proxied bundle). Without it the standalone bundle finds its tag as the running classic script or by its own URL; imported from npm, only `data-weft` counts |
| `data-weft-scope` | any element of your page | A DOM marker naming the conversation it shows, in the scope's string form; the framework helpers set it. The panel also writes it on its own element when `scope()` sets a scope |
| `data-weft-untrusted` | any element of your page | Markers on or inside it are ignored: put it on rendered user or model HTML |
| `data-theme-resolved` | `<weft-devtools>` | Written by the panel: `light` or `dark`, the theme it resolved, for your CSS or tests |

The page itself can carry three more inputs:

| Input | Values | Effect |
|---|---|---|
| `window.__WEFT__` | `{scope}` (a `Scope` or its string form) or `{publicId}` | The scope when no attribute, meta tag or option names one. Reassigning `window.__WEFT__`, or setting `publicId` or `scope` on the existing object, rescopes every panel |
| `?weft_scope=` in the page URL, else `#weft_scope=` | the scope's string form, URL-encoded once | Detection rung 4: below the explicit forms, above markers and headers; read, never written. A hash router's `#/chat?weft_scope=…` is read too |
| `?weft=debug` in the page URL | `debug` | Mounts the dock even where `data-auto` is off ([Install](https://weftgo.dev/docs/observe/devtools/install/#the-script-tag)) |

## MountOptions

`mount(opts)` from `@weftgo/devtools` is configuration rung 1: each option it sets wins over the attributes and meta tags. It returns the element, or `null` with `enabled: false` or on a server.

| Option | Type | Default | Field |
|---|---|---|---|
| `endpoint` | `string` | the page's directory, when nothing else names one | `data-endpoint` |
| `scope` | `Scope \| string` | none; wins over `publicId` | `data-scope` |
| `publicId` | `string` | none; `""` is the dev list | `data-public-id` |
| `detect` | `"headers" \| "markers" \| "headers,markers" \| "off"` | unset | `data-detect` |
| `token` | `string` | none | `data-token` |
| `position` | `Position` | `"bottom-right"` | `data-position` |
| `open` | `boolean` | the last `open()` or `close()`, else collapsed; replacing the self-mounted dock carries its open state | `data-open` |
| `auto` | `boolean` | `true` | `data-auto`; has no effect on the element `mount()` makes |
| `theme` | `"auto" \| "light" \| "dark"` | `"auto"` | `data-theme` |
| `mode` | `Mode` | unset | written as `data-mode` |
| `push` | `boolean` | unset | written as `data-push` |
| `zIndex` | `number \| string` | unset | written as `data-z-index` |
| `target` | `Element` | `document.body`; before `<body>` exists, appended on `DOMContentLoaded` | where the element is appended |
| `enabled` | `boolean` | `true` | `false`: mount nothing and return `null` |

A second `mount()` returns the first element with the new options (moved to a new `target`), never a second panel. A scope set by `scope()` before it carries over unless `opts` names one.

The types it uses:

| Type | Definition |
|---|---|
| `Position` | `"bottom-right" \| "bottom-left" \| "right-dock" \| "left-dock" \| "top-dock" \| "bottom-dock"` |
| `Mode` | `"float" \| "dock" \| "pill" \| "hidden"` |
| `PanelOptions` | `MountOptions` without `target`, `enabled`, `mode`, `push` and `zIndex`: what the element's `options` holds |
| `Scope` | `{ publicId: string; session?: string; flow?: string; run?: string }` |

The framework helpers take `HelperOptions`: `scope` (a `Scope`, or a string read as a public id), `endpoint`, `token` and `enabled` (default `true`; `false` sets no marker and loads nothing). With `endpoint` or `token` and no panel of the page's own, a helper mounts one with `mount({endpoint, token})`; without either it only scopes the panel the page has.

## The element

`<weft-devtools>`'s public members. The npm package types them as `WeftDevtoolsElement`.

| Member | Signature | What it does |
|---|---|---|
| `open` | `open(): void` | Expand the dock; from hidden it opens |
| `close` | `close(): void` | Collapse the dock to the pill |
| `toggle` | `toggle(): void` | Flip the dock; from hidden it opens |
| `isOpen` | `readonly isOpen: boolean` | Whether the dock is expanded: a property, not a function |
| `scope` | `scope(s: Scope \| string \| null): void` | Set the explicit scope (rung 1); `sessionId` and `runId` are read as `session` and `run`. `null` undoes it: back to `mount()`'s scope, else the ladder |
| `select` | `select(runId: string, step?: number): void` | Select that turn, and the step by its ordinal, once a `scope()` just before has settled |
| `on` | `on(event: "run" \| "parked" \| "error", cb: (detail) => void): () => void` | Follow this panel's events; returns the unsubscribe |
| `studioLink` | `studioLink(runId: string, step?: number): string` | The Studio page of that run (and step), never with a token; `""` before the endpoint is known |
| `options` | `PanelOptions \| null` | Rung 1: what `mount()` passed |
| `autoMounted` | `boolean` | `true` only on the dock the bundle mounted by itself, the one node the panel may remove. It does when Studio does not answer `/api/meta`, unless the endpoint was named and is on loopback. A 401 or 403 is said, never removed |
| `rescan` | `rescan(): void` | Re-read the configuration ladder and apply it |
| `syncGlobal` | `syncGlobal(): void` | Publish or remove `window.weft.devtools` as the configuration says |

None of the methods throws; a refusal is one line in the panel. [Host API and events](https://weftgo.dev/docs/observe/devtools/host-api/#methods) lists those lines.

### window.weft.devtools

Under the script tag, while a panel is connected and `data-global` is on, `window.weft.devtools` is one frozen object with eight members: `open()`, `close()`, `toggle()`, `isOpen` (a getter, so a boolean), `scope(s)`, `select(runId, step?)`, `on(event, cb)` and `studioLink(runId, step?)`, the element's own. `window.weft` is created only when absent; a non-plain `window.weft` or an existing `devtools` is left alone and the footer says `window.weft is the page's: no window.weft.devtools` or `window.weft.devtools is the page's: not replaced`. The npm package never adds the global.

## npm exports

`@weftgo/devtools` (its version is the weft version) ships the same `panel.js` as Studio's route and calls the element's methods on every panel on the page. It is built from weft's repository, not installed from the registry ([Install › npm](https://weftgo.dev/docs/observe/devtools/install/#npm)).

| Export | Signature | Differs from the element |
|---|---|---|
| `mount` | `mount(opts?: MountOptions): WeftDevtoolsElement \| null` | Creates the panel ([MountOptions](#mountoptions)) |
| `open`, `close` | `(): void` | Act on every panel; a panel mounted later starts that way |
| `toggle` | `(): void` | Flips every panel there now |
| `isOpen` | `isOpen(): boolean` | A function: whether any panel is expanded; `false` with none |
| `scope` | `scope(s: Scope \| string \| null): void` | Every panel; a panel mounted later starts in it |
| `select` | `select(runId: string, step?: number): void` | Every panel |
| `studioLink` | `studioLink(runId: string, step?: number): string` | The first panel's link; `""` with none |
| `on` | `on(event, cb): () => void` | Listens on `document`: every panel, one mounted later included |
| `serializeScope`, `parseScope` | `(s: Scope): string`, `(str: string): Scope` | The scope's string form |
| types | `Scope`, `MountOptions`, `PanelOptions`, `Position`, `Mode`, `WeftDevtoolsElement`, `DevtoolsEvents` | |

On a server every export is a no-op: `mount()` returns `null`, `on()` a no-op unsubscribe, `isOpen()` `false`, `studioLink()` `""`. Calls made while the page is still parsing take effect once the dock is mounted.

| Subpath | Exports | Notes |
|---|---|---|
| `@weftgo/devtools` | the table above | Importing it loads `panel.js`, which defines the element and may self-mount the dock |
| `@weftgo/devtools/react` | `useWeftDevtools(opts): ref`; types `HelperOptions`, `Scope` | A callback ref for React 18 and 19 |
| `@weftgo/devtools/vue` | `useWeftDevtools(opts or () => opts): ref`; types `HelperOptions`, `Scope` | A function ref for Vue 3; pass a getter to follow reactive state |
| `@weftgo/devtools/svelte` | `weftDevtools(node, opts)`, `useWeftDevtools`; types `HelperOptions`, `Scope` | A Svelte action (3, 4 and 5) |
| `@weftgo/devtools/scope` | `serializeScope`, `parseScope`, `Scope` | No DOM: safe in server code |
| `@weftgo/devtools/panel.js` | the bundle itself | The same bytes as `/studio/panel.js` |
| `@weftgo/devtools/package.json` | the manifest | |

The helpers import the panel lazily, when an element is bound, so they are safe to import in server-rendered components. React, Vue and Svelte are optional peer dependencies the helpers never import.

## Events

The panel dispatches each event from the element as a `CustomEvent` named `weft:<event>`, with `bubbles` and `composed` set, after its own work (a microtask). `on()` takes the name without the prefix.

| Event | `detail` | When |
|---|---|---|
| `weft:run` | `{runId: string, status: string, publicId?: string, sessionId?: string, step?: number}` | A run starts (`running`) and on each status change, once per transition: `succeeded`, `failed`, `parked`, `interrupted`. `step` is the last step ordinal the panel knows |
| `weft:parked` | `{runId: string, callId: string, ackId: string, name: string}` | Once per call a run parked on. `ackId` is the id the approval names, equal to `callId` |
| `weft:error` | `{message: string, runId: string}` | A run of the conversation failed, once per run; the panel's own failures are lines, not events |

Only runs of the conversation the panel follows are reported, and only transitions it sees: the first read of a conversation's list is history, except a run reading running there and the run the scope pins.

## CSS tokens

Every colour, radius and font is a custom property on the panel's `:host`, dark by default and light under `data-theme-resolved="light"`. A rule in your page's CSS, such as `weft-devtools { --weft-bg: #fff }`, beats the shadow tree's `:host` in either theme. The palette is Studio's: a token with a Studio variable equals it in that theme.

| Token | Used for | Light | Dark | Studio variable |
|---|---|---|---|---|
| `--weft-bg` | panes | `#fbfaf7` | `#131211` | `background` |
| `--weft-bg2` | header, steps, footer | `#fbfaf7` | `#1c1a17` | `card` |
| `--weft-bg3` | selected row, fields | `#f3f1ea` | `#2a2722` | `secondary` (light), `sidebar-accent` (dark) |
| `--weft-fg` | text | `#191713` | `#ece6d6` | `foreground` |
| `--weft-dim` | secondary text | `#6e6759` | `#a39c8f` | `muted-foreground` |
| `--weft-faint` | the faintest text | `#766f61` | `#8d887b` | the panel's own (light), `code-mut` (dark) |
| `--weft-line` | rules and borders | `#e7e3d9` | `#2a2722` | `border` |
| `--weft-accent` | the accent | `#d13c10` | `#ff7d52` | `thread-ink` |
| `--weft-on-accent` | text on the accent | `#fbfaf7` | `#131211` | `primary-foreground` |
| `--weft-warn` | errors returned as data, interrupted, cancelled | `#875c04` | `#e3b341` | `status-int` |
| `--weft-err` | failed runs and rows | `#b42318` | `#f87171` | `status-bad` |
| `--weft-info` | tool rows | `#2f5bd3` | `#7aa2ff` | `ev-tool` |
| `--weft-ok` | succeeded, live, added diff lines | `#1f7a45` | `#4ade80` | `status-ok` |
| `--weft-result` | a tool result's tone | `#4d7a2a` | `#8fbf6a` | `ev-result` |
| `--weft-parked` | parked | `#8a3fb0` | `#c678dd` | `status-parked` |
| `--weft-status-run` | the running dot, the pill's pulse and border | `#ef4d21` | `#ff5c2b` | `status-run` |
| `--weft-status-run-ink` | the running word | `#d13c10` | `#ff5c2b` | `status-run-ink` |
| `--weft-scrim` | the `?` overlay's backdrop | `rgba(251,250,247,.92)` | `rgba(19,18,17,.92)` | the panel's own |
| `--weft-shadow` | the float's shadow | `rgba(25,23,19,.18)` | `rgba(0,0,0,.45)` | the panel's own |
| `--weft-font` | ids, JSON, numbers | `ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace` | same | |
| `--weft-font-prose` | a step's text, the prompt, notes | `system-ui, sans-serif` | same | |
| `--weft-radius` | corner radius | `8px` | same | |
| `--weft-radius-sm` | small corner radius | `5px` | same | |
| `--weft-z` | the dock's and the pill's `z-index`, below `data-z-index` | unset: `2147483000` | same | |

One more property is written to your page, not the panel: with `data-push="true"`, while the panel is docked and open, `<html>` gets `--weft-devtools-inset` set to the dock's size (`70vh` as the bottom sheet) and `padding-<side>: var(--weft-devtools-inset)`, both put back exactly when it closes. Use the variable to keep a fixed element clear: `bottom: var(--weft-devtools-inset, 0)`. [Lay out and theme the panel](https://weftgo.dev/docs/observe/devtools/layout-and-theme/#override-the-colours) shows overrides.

## Keyboard

`Alt+W` is the one key the panel hears on `window`. Every other key is heard on its shadow root, so it fires only while focus is inside the panel, and, except `Tab`, never while a text field has focus. `?` in the panel shows the list. Since 0.20.0 the keys the panel shares with Studio mean the same on both (`lib/keys.ts`).

| Key | Does |
|---|---|
| `Alt+W` | Toggle the dock from anywhere on the page, except a text field; `Ctrl+Shift+W` too where the browser delivers it. Opening puts focus in the panel |
| `Alt+Shift+W` | Next layout: float, dock right, bottom, left, top |
| `Esc` | Close (the `?` list first); your page's own `Esc` handlers still run. On a control of the experiment drawer it closes the drawer instead, focus back to its verb |
| `j` / `k` | Next / previous item of the list in focus (the turns) |
| `[` / `]` | Previous / next step (`⤢` carries it); `K` / `J` too |
| `s` / `w` / `q` / `r` | The story, waterfall, request or raw tab; again, back to the tab before it. Capitals work too |
| `o` | Open the turn, and the step picked, in Studio in a new tab |
| `g s` | The same as `o`; `s` must follow `g` within 1.5 s |
| `/` | Focus a filter: on the `raw` tab the raw tree's; on the `request` tab an open tree's, else the turn list's; on other tabs the turn list's |
| `←` / `→` | On the tabs: previous / next tab (`Home` / `End`: first / last) |
| `?` | The key list |
| `↓` / `↑` | On a turn row, or a waterfall step row: move the list's one tab stop (`Enter` or a click selects a turn; `Enter` or `Space` selects a waterfall row) |
| `Tab` | In an open, focused float: wraps from the last control to the first (`Shift+Tab` back), from a text field too; the panel's only focus trap |

## localStorage

The panel keeps one JSON object per origin in `localStorage["weft.devtools"]`. A document whose `v` is not `1` is ignored; every read and write is guarded, so a private window just forgets. `localStorage.removeItem("weft.devtools")` resets it.

| Field | Type | Holds |
|---|---|---|
| `v` | `1` | The format version |
| `mode` | `"float"` or `"dock"` | The layout mode |
| `side` | `"left"`, `"right"`, `"bottom"` or `"top"` | The docked edge |
| `open` | boolean | Expanded |
| `hidden` | boolean | Hidden: nothing drawn |
| `x`, `y`, `w`, `h` | number, px | The float's box (default 520×560, at least 360×280) |
| `d` | number, px | The dock's size across its edge (default 460) |
| `run` | string | The last selected turn, by run id |
| `theme` | `"light"`, `"dark"` or `""` | The ◐ choice; `""` is auto |
| `tab` | `"story"`, `"request"`, `"waterfall"` or `"raw"` | The turn view's open tab. Another value (a `"timeline"` stored before 0.20.0) opens story, or raw when `raw` is true |
| `raw` | boolean | Mirrors `tab` being `raw`; a document without `tab` opens raw when it is true |
| `debug` | boolean | The force-on switch |

The placement fields, `mode` through `d`, are written only once the user places the panel (a toggle, drag, resize or re-dock); until then the `data-*` attributes decide on every load. An old `localStorage.weft_debug=1` is migrated into `debug` and removed.

## See also

- [Install the devtools panel](https://weftgo.dev/docs/observe/devtools/install/)
- [Scope the panel to a conversation](https://weftgo.dev/docs/observe/devtools/scope/)
- [Lay out and theme the panel](https://weftgo.dev/docs/observe/devtools/layout-and-theme/)
- [Drive the panel from your page](https://weftgo.dev/docs/observe/devtools/host-api/)
- [Studio pages, URL parameters and keyboard](https://weftgo.dev/docs/reference/studio-urls/)
