[CMUX Next] Chief pet: floating pixel pet over a glass rail
Summary
First of four Chief pet PRs. This one is the floating panel: the Chief Dock's pixel mascot over a glass rail, floating over every app the way chief-water-reference.png draws it.
It builds on Codex's Chief Dock (#21194):
- the same nine pixel mascots (
webviews/src/agent-session/acpmux/mascots/), with Orb as the default, as in the dock; - the dock's rail icons:
action.editfor compose, anddisclosure.collapsedturned to point up for the chevron.
The dock lives inside an agent pane. This pet is a native panel that works outside cmux.
Behavior
- A borderless, non-activating
NSPanelat.floatinglevel. It joins every Space and full-screen apps, never becomes key or main, and so never steals focus. The first click works without activating cmux. - Drag: a drag anywhere except a tool moves it. A press that moves less than 3 pt is a click. The spot is saved per display (
chiefPet.origins) and pulled fully back on screen after a drag, a resolution change or an unplugged display. The first spot is the bottom right corner, 24 pt in. - Click: clicking the character or the compose tool opens the Chief (
home.show). The chevron does the same until #PR2 makes it expand the notices. - Sizes, from the reference (a @2x capture):
- the pet there is 60 × 80 pt over a 40 pt capsule rail, 8 pt apart;
- the mascots are about square, so their box is 88 × 80 pt;
- each rail slot is 44 pt.
- Rendering: the character is drawn by a layer that scales up with whole pixels (nearest magnification). There's no idle animation.
- Rail material: the rail is Liquid Glass, and the solid overlay surface under Reduce Transparency.
- Voice slot: the reference rail has three slots. The middle one (voice) is left out, since dictation into the pet isn't in this scope.
- Code location: the pet lives in a new
CmuxNextFloatingtarget, becauseCmuxNextAppmay not grow (SW14). The floating chat's per-display frames moved there too, since the pet shares them. The App's source shrinks by 20 lines. - Off by default: it sits behind the
chiefPet.enabledDebug Settings toggle until #PR4 adds the user setting.
Reference
Matched: chief-water-reference.png (Leo's brief folder chief-pet-refs), at the same 714 × 480 pixel size:

The right side is a composite: the bundled Orb PNG and the rail drawn at this PR's point sizes at @2x, over the reference's own water. It is not a screen capture. No Mac capture host is reachable from the Linux build host, so the live look needs a dogfood build.
Testing
ChiefPetTests (CmuxNextFloatingTests) covers:
- the first spot, per-display save and restore, and clamping back on screen;
- click vs. drag on the character, including a drag from the rail's background that is not a click;
- the compose tool calling
onClick; - every mascot loading from the bundle;
- the panel being non-activating and on all Spaces;
- the controller showing the pet only while it is on.
These run in this PR's cmux-next CI lane. They were not run locally (Linux host).
Localization: three strings in ChiefPet.xcstrings with all 20 locales: the Chief label, "New Message" and "Show Chief". Chief stays untranslated.
Changelog
none (off by default behind a Debug Settings toggle)
🤖 Generated with Claude Code