cmux NEXT Chief pet: notices open toward the side with room as you drag it; the profile menu shows or hides it
The Chief pet's notice cards and reply box now open toward the side of the screen with room, wherever the pet is dragged. The sidebar's profile menu gets Show Chief / Hide Chief, the way Codex's profile menu toggles its floating window.
Cards follow the pet's quadrant. Before, the cards were centered over the pet and only flipped below it when they ran into the top of the screen. ChiefPetBubblePanel.frame now picks the side by quadrant:
- Right half: the cards' trailing edge lines up with the pet's and they extend left.
- Left half: their leading edge lines up and they extend right.
- Lower half: they sit above the pet. Upper half: below it.
The reply box sits in the cards' place and takes the same side. Dragging and the saved spot per screen already worked (ChiefPetPlacement), and they're unchanged.
No jump on drop. Each drag step re-places the bubble and the reply box (ChiefPetView.onDragMoved ā ChiefPetController.followPet). Only their frames change: nothing is redrawn and nothing fades in again. So the cards switch sides as the pet crosses the screen's middle, and the drop doesn't move them.
Show Chief / Hide Chief sits above Settings in the profile menu. It flips home.chiefPetEnabled through palette.toggleSetting, the same setting path the palette and cmux settings toggle-setting use. The menu is built each time it opens, so the title follows the current value.
Base-red fixes. Two tests didn't compile with Xcode 26.6 at 16dde1c5702a, which broke the CmuxNext test build:
TransferProgressGateTests(#22455) called the mutatingadmits()inside#expect. Each result is now read into aletfirst.DaemonRestartTests(#22296) called the rethrowingcompactMapinside#require. The map now runs outside it.
The Quick Composer's Chief Dock wiring (#22024, #22514) is left as is.
Testing
Fleet runs of scripts/ci/package-test-lane.sh suite Packages/macOS/CmuxNext ā¦:
- Red, at 30782b07701d (the tests plus the first base-red fix, no implementation): the test build fails on the missing API (
extra argument 'chiefPetShown'), step 7b786db53ca8. - Green, at ae6ae9e8f57a: ChiefPetTests, ChiefPetFeedTests, ChiefPetReplyTests, ProfileMenuBuilderTests, ProfileMenuInsetTests, TransferProgressGateTests and DaemonRestartTests all pass, 7 of 7 suites, step
leo-chief-pet-green-ae6ae9e8.
A review subagent found no blockers. Its one should-fix is in: a drop past the screen edge pulls the pet back on screen, and the reply box now moves with it. Drags also move in whole points now.
New tests:
noticesOpenTowardTheQuadrantWithRoomandreplyBoxTakesTheNoticesSidecover all four quadrants and check the cards stay on screen.dragReportsEveryMoveBeforeItEndschecks that a move under the drag slop isn't reported.noticesFollowTheDragLiveAndTheDropMovesNothingdrags a shown bubble across the screen's middle. It checks the cards switch sides mid-drag and the drop leaves their frame alone.chiefRowShowsOrHidesThePetThroughTheSettingPathchecks the row's title and itspalette.toggleSettingarguments in both states, and that it sits above Settings.
Not checked in the app or visually; I built this on a Linux host.
Localization: two new strings, menu.profile.showChief and menu.profile.hideChief, in all 21 locales of ProfileActions.xcstrings. Show Chief reuses the pet's existing chiefPet.expand translations.
Changelog
Added: The profile menu shows or hides the Chief pet, and the pet's notices open toward the side of the screen with room wherever you drag it.
š¤ Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Makes the Chief pet's notice cards and reply box open toward the side of the screen with room as you drag it, and adds Show Chief / Hide Chief to the sidebar profile menu.
- Cards lay out by the pet's quadrant: extending left from its trailing edge on the right half, right from its leading edge on the left half, above it on the lower half, and below it on the upper half. The reply box takes the same place.
- Each drag step re-places the cards and reply box live so they switch sides mid-drag; the drop moves nothing. A drop pulled back on screen now moves the reply box with the pet too, and drags move in whole points so the drop rounds nothing.
- Show Chief / Hide Chief flips
home.chiefPetEnabledthroughpalette.toggleSetting, the same path the palette andcmux settings toggle-settinguse. - Fixes two CmuxNext test target builds:
TransferProgressGateTestscalled the mutatingadmits()inside#expect, andDaemonRestartTestsread the rethrowingcompactMapinside#require.