The layout
The cockpit is a row of three columns:- The conversation sidebar, 252 px wide, resizable. The traffic light clearance, the collapse action and the history buttons sit in its titlebar strip, and the strip drags the window.
- The main column: the header with the thread title, the transcript, the composer and the workspace footer.
- The right panel, a drawer with the surfaces. It has its own titlebar strip, and that one drags the window too.
The files
The events
GPUIX maps DOM style props onto GPUI ones. A few rules matter when you write new UI:- An unfilled in-flow
divhas no hitbox, so it never receives a mouse event. A region that has to be clickable needspointerEvents: 'auto'. - A drag needs three handlers on the same element:
onMouseDown,onMouseMoveandonMouseUp. GPUIX arms the pointer capture on the press only when the element also listens for moves, and that capture is what keeps a drag alive outside the element. - There is no
zIndex. Stacking is the order of the tree: a later child paints over an earlier one. - A
<text>with several children wraps. Use one template literal andwhiteSpace: 'nowrap'.
AGENTS.md and in the hiroshi-gpuix skill.
The surfaces
The right panel holds four surfaces:- Browser, a local app or a URL
- Terminal, a shell in the workspace; every command is a run of the engine, not of the window
- Files, the workspace tree
- Review, the changes of the branch