mirror of
https://github.com/Louis-CFM/coucou.git
synced 2026-12-07 07:32:35 +09:00
* feat: Mochi on the desktop Drag Mochi out of the notch and drop him anywhere on the screen — he lives as a floating 120 pt companion until you double-click to fly him home. - **DesktopMochi.swift** (new): `DesktopMochiController` manages the floating NSPanel (.floating level, canJoinAllSpaces/stationary/ ignoresCycle/fullScreenAuxiliary), 60 Hz polling loop, click-through toggle, drag repositioning, double-click fly-home, right-click wardrobe, sleep detection (2 min idle + mouse > 150 pt → .sleeping state), screen sleep/wake pause, position persistence and launch-restore fly animation. `DesktopBotView` renders the full character at 30 fps with rigid-roll, outfit, dance and eye tracking from the panel's own screen position. - **AppState**: `mochiOnDesktop` published flag; `BotPlacement` hides the notch bot while it is true (same pattern as `isDraggingBot`). - **BotCanvasView**: `lookOriginOverride: CGPoint?` parameter lets the desktop view override the island-based eye tracking. - **IslandWindowController.finishDrag**: drop outside notch zone and no window → promote ghost panel to desktop Mochi via `DesktopMochiController.install(ghostPanel:at:)`; drop in notch zone → return to notch; drop on window → attach context (unchanged). - **AppDelegate**: observes `.greetComplete` → `launchFlyIfNeeded()` so Mochi flies from the notch to the saved position after launch greeting. - **Alert cycle**: hookExpand → surprised emote → retract (panel flies home, notch Mochi reappears for the alert, UserDefaults flag stays true) → pendingApproval/pendingQuestion clears → fly back to saved position. - **docs/SPEC.md**: new §13 "Mochi sur le bureau" (French, full spec). - **README.md**: one-line feature entry. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(desktop): alert detection, App Store build, drops from the desktop, clicks, monitor leak, tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(desktop): no second Mochi from the hidden notch bot, alerts during flights Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
9 lines
314 B
Bash
Executable File
9 lines
314 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/coucou-desktop.XXXXXX")"
|
|
trap 'rm -rf "$TEST_DIR"' EXIT
|
|
swiftc NotchBuddy/Sources/App/DesktopMochiLogic.swift \
|
|
tests/DesktopMochiTests.swift -o "$TEST_DIR/desktop-mochi-tests"
|
|
"$TEST_DIR/desktop-mochi-tests"
|