feat(panel,ui): open a Manager page's title on its face from Change face

CH
1h ago
+552-48

What changes

On a Manager's page, Change face in the ⋯ menu and in the title's right-click menu is now a plain action, no longer a submenu panel. It opens the title's in-place rename, and the face in the toolbar's lead becomes a compact ManagerFaceWell with its picker already open. A pick saves the face right away (the toolbar, sidebar and chat all read it) and puts the focus back in the name field. Escape or Return ends the rename as before.

On the phone layout (PhoneHead), there is no face beside the name, so Change face keeps the panel beside the menu item, which now shows PR 5's picker.

How

  • useAgentActions (agent-actions.tsx): a new option, faceIn: FACE_IN.EDITOR | FACE_IN.PANEL, defaulting to PANEL, because other Manager surfaces (the pinned tab, crumb menus, history) draw no face well. Under EDITOR it returns face: AgentFaceEdit (picking, onPicking, onPick), and Change face starts the rename with the picker open. The rename it returns resets picking on both begin and end, so a plain Rename never opens the picker. The row in PR 6 builds on the same door.

  • Toolbar: ToolbarTitleEdit gains holding and ref (an InlineEditHandle). When holding is set, the lead box counts as part of the edit (InlineEdit's within), so moving the focus to the face well, into its picker, or into the colors that float from it doesn't end the edit. A press away from the picker ends it through leave(), as a section head's editor does.

  • Page (desktop-agent-page.tsx): while the name is being edited, the lead shows the well instead of ManagerGlyph. finalFocus returns the focus to the title field after a pick.

  • Phone fix (icon-picker.tsx): a phone's menu is a modal sheet that names no layer, so the colors floating from a face in the Change face panel stood on the window's layer, under the sheet, where nothing could press them. A flyout from a picker inside a modal card with no named layer now stands over the dialog, the same way PopoverIconButton picks its layer. I checked it in a browser on the phone layout. There's no jsdom test: the only thing jsdom can show is the flyout's data-layer, which is markup, and stacking isn't something it can see.

Stack

Base: PR 5, agent/manager-face-picker (#11072). This branch also carries PR 6's two ui commits (InlineEdit's holding/within/ref and its focusout on each within box, and PopoverIconButton/ManagerFaceWell finalFocus) and the shared agent-actions commit, both cherry-picked so the two siblings build on the same pieces.

Tests

  • Added one case to desktop-agent-page.test.ts: ⋯ → Change face opens the title field with the picker in the lead; a face's colors opening leaves the field standing; a pick calls onFace and the focus goes back to the name. I checked that it fails when the page doesn't pass holding.
  • In a production-like web build on ?fixture=inbox, Change face opens the title field with the picker in the lead, the field stays open while a face's colors are up, and a pick puts the focus back in the name. On the phone layout, a pick from the panel's colors closes the sheet. The fixture doesn't keep a face change on any path, the Settings card's included, so the face drawn there stays the same after a pick.
  • Ran desktop-agent-page.test.ts, toolbar.test.ts, sidebar-managers.test.ts, and the icon-picker, inline-edit and manager-face tests (all pass), plus typecheck for @repo/ui and @repo/panel. I left the rest to CI.