# Agent control overlay

| Target | Drawn | Code |
| --- | --- | --- |
| Native macOS window (`computer_use` window actions) | Inner glow, accent title-bar lights, cursor. One transparent, click-through, unfocusable window per conversation, 32pt margin. | [window_watch.py](https://github.com/Fzkuji/OpenProgram/blob/main/openprogram/programs/tools/computer_use/computer_use/desktop/macos/window_watch.py) reports; [agent-control.js](https://github.com/Fzkuji/OpenProgram/blob/main/apps/desktop/main/worker/agent-control.js) places; [menu-overlay/agent-control](https://github.com/Fzkuji/OpenProgram/blob/main/apps/web/app/menu-overlay/agent-control/page.tsx) renders |
| Webpage in the App: tab or floating preview | Inner glow, cursor. One such window per page, 24pt margin, shown only while the view and its App window are. It sits in the window stack directly above the App window and is not its child: on macOS showing a child window brings its parent in front of every other app. Glow follows the corners: preview 10pt, tab rounded bottom. | [action-cues.js](https://github.com/Fzkuji/OpenProgram/blob/main/apps/desktop/main/windows/action-cues.js) places; `subscribeAgentPageGlow` in [bridge-events.ts](https://github.com/Fzkuji/OpenProgram/blob/main/apps/web/lib/desktop/bridge/bridge-events.ts) reports |
| Chat preview (PiP), web build | Cursor in a `pointer-events: none` layer over the preview image | `ActionCueTravel` in [browser-control-bar.tsx](https://github.com/Fzkuji/OpenProgram/blob/main/apps/web/components/center-tabs/browser/toolbar/browser-control-bar.tsx) |

Every surface draws [AgentCursor](https://github.com/Fzkuji/OpenProgram/blob/main/apps/web/components/agent-cursor/agent-cursor.tsx).

## When a webpage glows

| Aspect | Rule |
| --- | --- |
| Glows while | Control state is Agent operating, stopping, or not confirmed stopped, and its conversation's run is still going |
| After the run ends | Idle whatever the state says, since the backend keeps it active until it reconciles (`presentedControlState` in [browser-control.ts](https://github.com/Fzkuji/OpenProgram/blob/main/apps/web/lib/browser/control/browser-control.ts)) |
| Not drawn | A pausing state, a frame around the page |
| Header and toolbar | Speak only for Needs your confirmation; an unknown state says nothing while it is read again |

## Where the window is

| Aspect | Value |
| --- | --- |
| Held | From the first read or step until 20 s after the last step, or until the agent moves on |
| Read | Window server's on-screen list, once per burst of Accessibility notifications from any application with a window on screen, and at least every 5 s; every 0.12 s without Accessibility access. Reported when changed |
| Reported | Frame in screen points, button frames relative to the window (read once through Accessibility), windows in front within the margin |
| Excluded | Windows titled `OpenProgram agent overlay` |
| Ends | A last report with `active: false` |
| Transport | `native.control` and `native.action` frames, only while **Show actions** is on |

## Look and motion

| Element | Specification |
| --- | --- |
| Glow shape | 18pt accent stroke along the rounded edge (10pt corners), blurred 11pt, 55% opacity, clipped to the window. No line on the edge, nothing outside. |
| Glow breathing | 60% to 100% of that strength every 2.6 s |
| Covered parts | Windows in front are cut out of glow and lights |
| Lights | Three accent circles over close, minimize, zoom, half a point larger. A white layer rises to 40% and falls every 1.4 s, 0.2 s apart. No buttons, no lights. Clicks reach the button below. |
| Cursor glyph | Solar `cursor`, bold duotone, 26px, accent, tail at half strength, on a white keyline from Solar `cursor-bold` showing 2px, plus a faint contact shadow |
| Hot spot | Box centred on the action point; arrow tip 2px right and below, so the dot shows beside it. Element: centre of its frame before the action. Coordinates: screenshot point mapped to screen. |
| Staying | Over a desktop app it stays where the last step left it and moves with the window; first step starts mid-window. Over a held page it stays between steps; a step without a hold fades after 2.8 s. |
| Travel | Gentle arc, bend 16% of distance up to 56pt, ease-in-out, 240–680 ms by distance |
| Press | Click, press, selection, drag or open: arrow dips to 82% toward its tip and springs back in 0.26 s; an 8px accent dot with 2px white ring settles and fades within 1 s. Typing and scrolling neither press nor leave a dot. |
| Reduced motion | Cursor jumps; press, dot, breathing and pulsing off |

## Accent colour

`--agent-accent` is `--theme-accent` ([themes/fallback.css](https://github.com/Fzkuji/OpenProgram/blob/main/apps/web/app/styles/themes/fallback.css)), used by glow, lights, cursor and click dot; keyline, dot ring and light pulse are white. The overlay shares the App's origin and theme settings, so a change reaches it at once.

## Safety

| Rule | Detail |
| --- | --- |
| No input | Ignores the mouse, never takes focus or activates, and never brings the App in front of another app. Nothing moves the system pointer. |
| Visible in control | Up for the whole window session, fades in 0.36 s. A minimized window or another Space hides it until back. |
| Per conversation | Each conversation shows its own |
| Display only | Failures are dropped; the step goes on |
| No Stop control | A clickable area would catch clicks meant for the app. Stopping is the conversation's stop control and the Running panel. The webpage floating control offers only Review request while confirmation waits. |

## Implementation status

Implemented on macOS and the three web surfaces. The macOS live-capture marker (a badge over the title-bar buttons, the menu-bar icon) is still requested but does not show in screenshots, so the accent lights mark the buttons.
