Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

Merge #246 (Spotify pill), without the Apple Music card redesign

Claude501843026620
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 872a784b..2dc970ab 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,10 +1,5 @@
# Changelog
-## Unreleased
-
-- Apple Music (macOS, GitHub build): the card gets the album cover, the album, a progress bar you drag or click to seek, shuffle, repeat (all or one), volume and a heart to favorite the track, in the same layout as Spotify. The cover comes from Music itself, or from Apple's public catalog for a track that has none — thanks @JhoanG956
-- Spotify (macOS, GitHub build): a new pill with the album cover, title, artist and album, a progress bar you drag or click to seek, play/pause, previous/next, shuffle, repeat and volume. It follows Spotify's own notification, so nothing polls, and it never opens Spotify by itself. The cover shows even before you allow Automation, through Spotify's public oEmbed; Mochi dances while it plays — thanks @JhoanG956
-
## Windows and Linux 0.2.0 — October 8, 2026
The Windows and Linux app catches up with the Mac, from 0.1.1 to 0.2.1 — everything except Apple Music and the iPhone, which depend on macOS and iCloud.
diff --git a/NotchBuddy/NotchBuddy.xcodeproj/project.pbxproj b/NotchBuddy/NotchBuddy.xcodeproj/project.pbxproj
index 1c09944d..dcaa83f0 100644
--- a/NotchBuddy/NotchBuddy.xcodeproj/project.pbxproj
+++ b/NotchBuddy/NotchBuddy.xcodeproj/project.pbxproj
@@ -10,9 +10,7 @@
0099C844CFD9424CEAA5CA77 /* ClaudeResponseText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 444604C7E2C530B664849EF9 /* ClaudeResponseText.swift */; };
01B96F947DF2BDC352E8526D /* WeeklyRecapView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 888B3E1420BCB6292BDC8117 /* WeeklyRecapView.swift */; };
0329E76BA4A8FEEA8A6D76E7 /* ClaudeService.swift in Sources */ = {isa = PBXBuildFile; fileRef = A83D5410BD030B243ADDCFF4 /* ClaudeService.swift */; };
- 03538CF0E693300A14029EDE /* SpotifyViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 914A792788D403F836BEB570 /* SpotifyViews.swift */; };
0393CA5466F52252378F0346 /* ServiceSnapshot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84ECC59BE7CDDEE348FC7096 /* ServiceSnapshot.swift */; };
- 03FDC0AA0CEDE913B59D0F4D /* NowPlayingViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = F56C7E1EBC74664A7F1689CF /* NowPlayingViews.swift */; };
0408FE7F86EBEE61CAED32DA /* TurnRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2DFAEAF1DD1CBF03D3C314E /* TurnRecorder.swift */; };
0417DE195518EE21267F8479 /* IslandTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0365DDE3C554F5E8570055F4 /* IslandTypes.swift */; };
053B30CF4568F7FE5138A898 /* MochiWardrobe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79A7807ADD0963FF260D1FAD /* MochiWardrobe.swift */; };
@@ -48,7 +46,6 @@
2132477000FD77F7EB234DAA /* FileDropView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3232F258523DD8D09B670363 /* FileDropView.swift */; };
23BFB915C12B0BC4E9B50AAA /* ApprovalRelay.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD426E81DF79CA79888059D9 /* ApprovalRelay.swift */; };
244EC9B77D1903C8DD505D04 /* MochiLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADA6A002ABEC0CC57667FBE0 /* MochiLiveActivity.swift */; };
- 2540E4198492CC2B9237ED99 /* SpotifyController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A9E6EB7C8468A8339CF6A5C /* SpotifyController.swift */; };
25F66E99460D62478899A292 /* MochiWardrobe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79A7807ADD0963FF260D1FAD /* MochiWardrobe.swift */; };
26E35C79CCD09FEBA04A3EF6 /* LinkTestView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6762C38A8952A90F394EDFE4 /* LinkTestView.swift */; };
273FC0FA14AAF6CE62FD14AE /* DesktopMochi.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1DDC96E7967032F5D0BD585 /* DesktopMochi.swift */; };
@@ -61,7 +58,6 @@
2F36E3C6C073E968A682AFA4 /* NotionPoller.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE03E03D1804B0B92C5C2DAD /* NotionPoller.swift */; };
3756B7E1A55D9CEC8C4D34A4 /* IslandStateMachine.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8212018F09EA1E96FBD63CD /* IslandStateMachine.swift */; };
38EEB2D3A6EC538958D92575 /* GitHubPulse.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8D3AD61802A32C4833F3EDA /* GitHubPulse.swift */; };
- 3E84EA0AE7C450941ED943CF /* NowPlayingViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = F56C7E1EBC74664A7F1689CF /* NowPlayingViews.swift */; };
40473EEC3029D466B2769672 /* AppleStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 681E15F99FCF1E60C2553004 /* AppleStyle.swift */; };
4117E7C8AA231AAE36E7509D /* UploadCanvasView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B241B043223AFBBFB7418A5E /* UploadCanvasView.swift */; };
41966EEF7599793AD70DFCEA /* DiffEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = B32FB972D02162720E566674 /* DiffEngine.swift */; };
@@ -73,7 +69,6 @@
4A32FB2EA69E8BA70EBEA8A7 /* ServiceLiveDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21B710512DB99390EC564487 /* ServiceLiveDetail.swift */; };
4B6AC00F22EC75E90E0157D5 /* AppLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F6D7015D6A77AA59323C0E7 /* AppLog.swift */; };
4B83070258D5AAAC8FCEB15F /* MochiOutfitDrawing.swift in Sources */ = {isa = PBXBuildFile; fileRef = E84E5D91129352E8A1D32AA4 /* MochiOutfitDrawing.swift */; };
- 4B99E2AD54926078AB087B43 /* SpotifyViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 914A792788D403F836BEB570 /* SpotifyViews.swift */; };
4D34FF10654B19B69FE1964C /* TurnSnapshot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A1C4152EBDBD7C24CABFFD7 /* TurnSnapshot.swift */; };
4D958F2DDCE9504490FDA357 /* DiffEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = B32FB972D02162720E566674 /* DiffEngine.swift */; };
4F1E0B3C838DA3CD6F864BC0 /* CalcomPoller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3104222B3F17BA5E8DEA5277 /* CalcomPoller.swift */; };
@@ -225,7 +220,6 @@
DE05D09A32117582AC93A24A /* NotchBuddyApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1BD8F3CAA60CF37640759E1 /* NotchBuddyApp.swift */; };
DE66BB6D18F467A7F4220CC3 /* SessionPublisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 824E56D2255CA86DAC350DBF /* SessionPublisher.swift */; };
E1581F8F2725B26E90D91C4A /* IntroView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B2EED5205DD7161E51BE1E1 /* IntroView.swift */; };
- E2414533EDC7565286141198 /* SpotifyController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A9E6EB7C8468A8339CF6A5C /* SpotifyController.swift */; };
E4B9986674F4D425826F15A8 /* StripePoller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EF78999D68D56ADE4CEFBE2 /* StripePoller.swift */; };
E701BC8996229D08362CA732 /* ServiceStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AF705275522F99CAE7E1429 /* ServiceStatus.swift */; };
E776C7D1DE5C62EA8D4BA3E3 /* FileDropView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3232F258523DD8D09B670363 /* FileDropView.swift */; };
@@ -340,7 +334,6 @@
66E6F5FC81429871B6F766A8 /* BotEngine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BotEngine.swift; sourceTree = "<group>"; };
6762C38A8952A90F394EDFE4 /* LinkTestView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkTestView.swift; sourceTree = "<group>"; };
681E15F99FCF1E60C2553004 /* AppleStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppleStyle.swift; sourceTree = "<group>"; };
- 6A9E6EB7C8468A8339CF6A5C /* SpotifyController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotifyController.swift; sourceTree = "<group>"; };
6C6993B34A0FFF8E3D454ADC /* QuestionPayload.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuestionPayload.swift; sourceTree = "<group>"; };
6E5F9E4BB282FDE68D65FE6B /* TurnArchive.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TurnArchive.swift; sourceTree = "<group>"; };
6F0C229BD085D76EB3DD94DF /* ServicePublisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServicePublisher.swift; sourceTree = "<group>"; };
@@ -361,7 +354,6 @@
8ACB4350729C6513824D1ADF /* ColorHex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorHex.swift; sourceTree = "<group>"; };
8BF22817EC70748F2D1FB2E7 /* ClaudePlanGauge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClaudePlanGauge.swift; sourceTree = "<group>"; };
8CB8B6E5E9DA6164F979E88F /* GithubPoller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GithubPoller.swift; sourceTree = "<group>"; };
- 914A792788D403F836BEB570 /* SpotifyViews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotifyViews.swift; sourceTree = "<group>"; };
9466FDE02C9B3FB4EF01DFF8 /* IslandScreenGeometry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IslandScreenGeometry.swift; sourceTree = "<group>"; };
96C64C4C5D705CE486221B74 /* PillCatalog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PillCatalog.swift; sourceTree = "<group>"; };
9AF705275522F99CAE7E1429 /* ServiceStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServiceStatus.swift; sourceTree = "<group>"; };
@@ -411,7 +403,6 @@
F1BD8F3CAA60CF37640759E1 /* NotchBuddyApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotchBuddyApp.swift; sourceTree = "<group>"; };
F4263B550838CC5614569D13 /* ClaudePlanCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClaudePlanCardView.swift; sourceTree = "<group>"; };
F4A13AEE6E06F46CEC9D908C /* UserIdentity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserIdentity.swift; sourceTree = "<group>"; };
- F56C7E1EBC74664A7F1689CF /* NowPlayingViews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NowPlayingViews.swift; sourceTree = "<group>"; };
F86B99CF65C5E4BC887888C6 /* Haptics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Haptics.swift; sourceTree = "<group>"; };
F8D3AD61802A32C4833F3EDA /* GitHubPulse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GitHubPulse.swift; sourceTree = "<group>"; };
FA02B08886939FF6FE0475DD /* IslandViewContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IslandViewContent.swift; sourceTree = "<group>"; };
@@ -470,7 +461,6 @@
B89DA1A0C21AE3535A1760BB /* N8nPoller.swift */,
F1BD8F3CAA60CF37640759E1 /* NotchBuddyApp.swift */,
BE03E03D1804B0B92C5C2DAD /* NotionPoller.swift */,
- F56C7E1EBC74664A7F1689CF /* NowPlayingViews.swift */,
78FB882D49084DEA6A10DB4D /* RecapStore.swift */,
61B5FDDE03F5F711146937E2 /* ResendPoller.swift */,
B2FDED98F7F6C755A72C97A3 /* SafeWebURL.swift */,
@@ -478,8 +468,6 @@
FA51E5B140C20812641168EA /* ShortcutLogic.swift */,
62CF42AE7611EF212CA0458F /* ShortcutsSettingsView.swift */,
1BE21C2B315D37AA70ED45E9 /* SoundEngine.swift */,
- 6A9E6EB7C8468A8339CF6A5C /* SpotifyController.swift */,
- 914A792788D403F836BEB570 /* SpotifyViews.swift */,
2EF78999D68D56ADE4CEFBE2 /* StripePoller.swift */,
B241B043223AFBBFB7418A5E /* UploadCanvasView.swift */,
6FD65943C32E150F1CD65C31 /* UploadSequenceEngine.swift */,
@@ -864,7 +852,6 @@
0A267EE2955C7AD8E02A296C /* N8nPoller.swift in Sources */,
06BF5FD95E03010CAFDBF2D0 /* NotchBuddyApp.swift in Sources */,
2F36E3C6C073E968A682AFA4 /* NotionPoller.swift in Sources */,
- 03FDC0AA0CEDE913B59D0F4D /* NowPlayingViews.swift in Sources */,
BDD8A210DD6D9DA2D15BC5EE /* PillCatalog.swift in Sources */,
CD05A497A7D0B3D723D92C06 /* QuestionPayload.swift in Sources */,
93AB64BF47D6D1EE7DB4C22B /* QuestionRelay.swift in Sources */,
@@ -880,8 +867,6 @@
C07E9A04E827284FDF33DB16 /* ShortcutLogic.swift in Sources */,
1EAFEE80A8066B77F9410025 /* ShortcutsSettingsView.swift in Sources */,
60E361FFE84C387E5E3ED1AA /* SoundEngine.swift in Sources */,
- E2414533EDC7565286141198 /* SpotifyController.swift in Sources */,
- 4B99E2AD54926078AB087B43 /* SpotifyViews.swift in Sources */,
1558BB00C530B721172F6E65 /* StripePoller.swift in Sources */,
0408FE7F86EBEE61CAED32DA /* TurnRecorder.swift in Sources */,
68C3ACC708B69035FD0CB8C4 /* TurnSnapshot.swift in Sources */,
@@ -1023,7 +1008,6 @@
160EDB9D06275E2607DA5151 /* N8nPoller.swift in Sources */,
DE05D09A32117582AC93A24A /* NotchBuddyApp.swift in Sources */,
78FCEDC8F78B683AB10E6529 /* NotionPoller.swift in Sources */,
- 3E84EA0AE7C450941ED943CF /* NowPlayingViews.swift in Sources */,
13663D98590927AF71C17628 /* PillCatalog.swift in Sources */,
535EC818E1DAF0FA588545D8 /* QuestionPayload.swift in Sources */,
9AEFD05D0A39D4AF3C091B3A /* QuestionRelay.swift in Sources */,
@@ -1039,8 +1023,6 @@
6CCEC73ED68E9F253C22D692 /* ShortcutLogic.swift in Sources */,
908043F62E2C31F5FBC0A0C4 /* ShortcutsSettingsView.swift in Sources */,
78B3C6814431B2DD9D1F4949 /* SoundEngine.swift in Sources */,
- 2540E4198492CC2B9237ED99 /* SpotifyController.swift in Sources */,
- 03538CF0E693300A14029EDE /* SpotifyViews.swift in Sources */,
E4B9986674F4D425826F15A8 /* StripePoller.swift in Sources */,
CE0A1BD64DF3E08D200691A6 /* TurnRecorder.swift in Sources */,
4D34FF10654B19B69FE1964C /* TurnSnapshot.swift in Sources */,
diff --git a/NotchBuddy/Sources/App/IslandViewContent.swift b/NotchBuddy/Sources/App/IslandViewContent.swift
index e17a0c03..6a7a9a43 100644
--- a/NotchBuddy/Sources/App/IslandViewContent.swift
+++ b/NotchBuddy/Sources/App/IslandViewContent.swift
@@ -4021,110 +4021,60 @@ struct MusicCardView: View {
.buttonStyle(.plain)
.padding(.leading, 108)
.padding(.top, 2)
- } else if let title = controller.trackTitle {
- nowPlaying(title)
- }
- }
- .frame(maxWidth: .infinity, alignment: .topLeading)
- .padding(.top, 4)
- // Music doesn't announce seeks made in its own window: re-read when the card shows
- .onAppear { controller.refresh() }
- }
-
- private let red = Color(hex: "#FA2D48")
-
- // The card is 98 pt tall: artwork row, progress row, controls row (same layout as Spotify).
- private func nowPlaying(_ title: String) -> some View {
- let subtitle = [controller.artist, controller.album].compactMap { $0 }.joined(separator: " · ")
- return VStack(alignment: .leading, spacing: 0) {
- HStack(alignment: .center, spacing: 9) {
- NowPlayingArtwork(image: controller.artwork, accent: red)
- .frame(width: 36, height: 36)
- .onTapGesture { controller.openMusic() }
- .help(controller.album.map { "\($0) — open Music" } ?? "Open Music")
-
- VStack(alignment: .leading, spacing: 2) {
- HStack(spacing: 5) {
- Circle().fill(red).frame(width: 6, height: 6)
+ } else {
+ // Line 1: dot + title
+ HStack(spacing: 6) {
+ Circle()
+ .fill(Color(hex: "#FA2D48"))
+ .frame(width: 7, height: 7)
+ if let title = controller.trackTitle {
Text(title)
.font(.system(size: 12, weight: .semibold))
.foregroundColor(Color(hex: "#F5F6F8"))
.lineLimit(1).truncationMode(.tail)
- if let fav = controller.favorited {
- NowPlayingIconButton(icon: fav ? "heart.fill" : "heart", size: 9,
- tint: fav ? red : Color(hex: "#6B7079"),
- help: fav ? "Remove from favorites" : "Favorite") {
- controller.toggleFavorite()
- }
- }
- }
- if !subtitle.isEmpty {
- Text(subtitle)
- .font(.system(size: 11))
- .foregroundColor(Color(hex: "#8E939C"))
- .lineLimit(1).truncationMode(.tail)
+ .frame(maxWidth: 150, alignment: .leading)
}
}
- Spacer(minLength: 0)
- }
- .padding(.trailing, 24) // the ↗ button sits top-right
- .padding(.top, 6)
-
- // Position runs on its own clock only while playing and on screen
- TimelineView(.animation(minimumInterval: 0.5, paused: !appState.musicPlaying)) { context in
- NowPlayingProgress(
- position: controller.position(at: context.date),
- duration: controller.duration,
- accent: red,
- canSeek: controller.duration > 0,
- onSeek: { controller.seek(to: $0) }
- )
- }
- .padding(.top, 7)
-
- controls
- .padding(.top, 4)
- }
- .padding(.leading, 108)
- .padding(.trailing, 12)
- }
+ .padding(.top, 6)
+ .padding(.leading, 108)
- private var controls: some View {
- HStack(spacing: 0) {
- HStack(spacing: 10) {
- NowPlayingIconButton(icon: "shuffle", size: 10,
- tint: controller.shuffling ? red : Color(hex: "#6B7079"),
- help: controller.shuffling ? "Shuffle on" : "Shuffle off") {
- controller.setShuffling(!controller.shuffling)
- }
- NowPlayingIconButton(icon: "backward.fill", size: 11, tint: Color(hex: "#C5C8CD"), help: "Previous") {
- controller.previousTrack()
+ // Line 2: artist
+ if let artist = controller.artist {
+ Text(artist)
+ .font(.system(size: 11))
+ .foregroundColor(Color(hex: "#8E939C"))
+ .lineLimit(1).truncationMode(.tail)
+ .frame(maxWidth: 150, alignment: .leading)
+ .padding(.leading, 108)
}
- Button(action: { controller.playPause() }) {
- ZStack {
- Circle().fill(Color(hex: "#F5F6F8"))
+
+ // Line 3: controls
+ HStack(spacing: 8) {
+ Button(action: { MusicController.shared.previousTrack() }) {
+ Image(systemName: "backward.fill")
+ .font(.system(size: 11))
+ .foregroundColor(Color(hex: "#8E939C"))
+ }
+ .buttonStyle(.plain)
+ Button(action: { MusicController.shared.playPause() }) {
Image(systemName: appState.musicPlaying ? "pause.fill" : "play.fill")
- .font(.system(size: 8.5, weight: .bold))
- .foregroundColor(Color(hex: "#0E0F11"))
- .offset(x: appState.musicPlaying ? 0 : 1)
+ .font(.system(size: 11))
+ .foregroundColor(Color(hex: "#FA2D48"))
}
- .frame(width: 20, height: 20)
- }
- .buttonStyle(NowPlayingPressStyle())
- .help(appState.musicPlaying ? String(localized: "Pause") : String(localized: "Play"))
- NowPlayingIconButton(icon: "forward.fill", size: 11, tint: Color(hex: "#C5C8CD"), help: "Next") {
- controller.nextTrack()
- }
- NowPlayingIconButton(icon: controller.repeatMode == .one ? "repeat.1" : "repeat", size: 10,
- tint: controller.repeatMode == .off ? Color(hex: "#6B7079") : red,
- help: controller.repeatMode == .off ? "Repeat off"
- : controller.repeatMode == .all ? "Repeat all" : "Repeat one") {
- controller.cycleRepeat()
+ .buttonStyle(.plain)
+ Button(action: { MusicController.shared.nextTrack() }) {
+ Image(systemName: "forward.fill")
+ .font(.system(size: 11))
+ .foregroundColor(Color(hex: "#8E939C"))
+ }
+ .buttonStyle(.plain)
}
+ .padding(.leading, 108)
+ .padding(.top, 6)
}
- Spacer(minLength: 8)
- NowPlayingVolume(volume: controller.volume, accent: red) { controller.setVolume($0) }
}
+ .frame(maxWidth: .infinity, alignment: .topLeading)
+ .padding(.top, 4)
}
}
#endif
diff --git a/NotchBuddy/Sources/App/MusicController.swift b/NotchBuddy/Sources/App/MusicController.swift
index 86d11811..3578e382 100644
--- a/NotchBuddy/Sources/App/MusicController.swift
+++ b/NotchBuddy/Sources/App/MusicController.swift
@@ -7,63 +7,25 @@ import Combine
/// Observes Apple Music state via distributed notifications and provides playback controls.
/// Singleton, @MainActor, GitHub build only.
-/// Nothing runs on a timer: state arrives with Music's notification, the card extrapolates the position.
@MainActor
final class MusicController: ObservableObject {
static let shared = MusicController()
- nonisolated static let bundleId = "com.apple.Music"
-
- enum RepeatMode: String, Sendable { case off, all, one }
@Published var trackTitle: String?
@Published var artist: String?
@Published var album: String?
- @Published private(set) var duration: Double = 0
- /// Position (seconds) at `positionDate`; while playing, the real position runs on from there.
- @Published private(set) var positionAnchor: Double = 0
- @Published private(set) var positionDate = Date()
- @Published private(set) var shuffling = false
- @Published private(set) var repeatMode: RepeatMode = .off
- @Published private(set) var volume: Int = 50
- /// nil when Music can't favorite this track (radio, some streams).
- @Published private(set) var favorited: Bool?
- @Published private(set) var artwork: NSImage?
-
- nonisolated private static let grantedKey = "coucou.musicAutomationGranted"
private var notifTokens: [Any] = []
private var cancellables = Set<AnyCancellable>()
private let queue = DispatchQueue(label: "fr.louisraille.coucou.music")
- private var artworkCache: [String: NSImage] = [:]
- private var artworkCacheOrder: [String] = []
- private var artworkLoadingKey: String?
- private var pendingVolume: Int?
- private var volumeTask: Task<Void, Never>?
private var isPillActive: Bool {
AppState.shared.activeIntegrations.contains("integration_music")
}
- private var automationGranted: Bool {
- UserDefaults.standard.bool(forKey: Self.grantedKey)
- }
-
- /// Same track = same title, artist and album (the notification and AppleScript IDs differ in format).
- private var trackKey: String? {
- guard let trackTitle else { return nil }
- return [trackTitle, artist ?? "", album ?? ""].joined(separator: "\u{1F}")
- }
-
- /// Where playback is now, extrapolated from the last anchor.
- func position(at date: Date) -> Double {
- let elapsed = AppState.shared.musicPlaying ? date.timeIntervalSince(positionDate) : 0
- let p = positionAnchor + max(0, elapsed)
- return duration > 0 ? min(p, duration) : p
- }
-
private init() {
// playerInfo fires whenever Music state changes (play/pause/track change).
- // Extract Sendable values before crossing into @MainActor.
+ // Extract Sendable String? values before crossing into @MainActor.
let tok1 = DistributedNotificationCenter.default().addObserver(
forName: NSNotification.Name("com.apple.Music.playerInfo"),
object: nil,
@@ -74,10 +36,8 @@ final class MusicController: ObservableObject {
let name = info?["Name"] as? String
let artist = info?["Artist"] as? String
let album = info?["Album"] as? String
- let totalTimeMs = (info?["Total Time"] as? NSNumber)?.doubleValue
Task { @MainActor [weak self] in
- self?.handlePlayerInfo(playerState: playerState, name: name, artist: artist,
- album: album, totalTimeMs: totalTimeMs)
+ self?.handlePlayerInfo(playerState: playerState, name: name, artist: artist, album: album)
}
}
notifTokens.append(tok1)
@@ -90,10 +50,12 @@ final class MusicController: ObservableObject {
) { [weak self] notif in
let bundleId = (notif.userInfo?[NSWorkspace.applicationUserInfoKey]
as? NSRunningApplication)?.bundleIdentifier
- guard bundleId == MusicController.bundleId else { return }
+ guard bundleId == "com.apple.Music" else { return }
Task { @MainActor [weak self] in
- guard let self, self.automationGranted else { return }
- self.refresh()
+ guard let self else { return }
+ guard self.isPillActive,
+ UserDefaults.standard.bool(forKey: "coucou.musicAutomationGranted") else { return }
+ self.fetchAndApply()
}
}
notifTokens.append(tok2)
@@ -106,7 +68,7 @@ final class MusicController: ObservableObject {
) { [weak self] notif in
let bundleId = (notif.userInfo?[NSWorkspace.applicationUserInfoKey]
as? NSRunningApplication)?.bundleIdentifier
- guard bundleId == MusicController.bundleId else { return }
+ guard bundleId == "com.apple.Music" else { return }
Task { @MainActor [weak self] in self?.clearState() }
}
notifTokens.append(tok3)
@@ -116,9 +78,9 @@ final class MusicController: ObservableObject {
.sink { [weak self] integrations in
guard let self else { return }
if integrations.contains("integration_music") {
- if self.automationGranted {
- // The publisher fires before the property is set: read once it is
- Task { @MainActor [weak self] in self?.refresh() }
+ if self.isMusicRunning(),
+ UserDefaults.standard.bool(forKey: "coucou.musicAutomationGranted") {
+ self.fetchAndApply()
}
} else {
self.clearState()
@@ -130,7 +92,7 @@ final class MusicController: ObservableObject {
// MARK: - Private helpers
private func isMusicRunning() -> Bool {
- NSWorkspace.shared.runningApplications.contains { $0.bundleIdentifier == Self.bundleId }
+ NSWorkspace.shared.runningApplications.contains { $0.bundleIdentifier == "com.apple.Music" }
}
// MARK: - Metadata cleaners
@@ -170,293 +132,96 @@ final class MusicController: ObservableObject {
return raw
}
- // MARK: - State
-
- private func handlePlayerInfo(playerState: String?, name: String?, artist inputArtist: String?,
- album inputAlbum: String?, totalTimeMs: Double?) {
+ private func handlePlayerInfo(playerState: String?, name: String?, artist inputArtist: String?, album inputAlbum: String?) {
guard isPillActive else { return }
- if playerState == "Stopped" { clearState(); return }
- if let name {
- setTrack(title: name, artist: inputArtist ?? "", album: inputAlbum ?? "",
- duration: (totalTimeMs ?? 0) / 1000)
- }
- setPlaying(playerState == "Playing")
+ let playing = playerState == "Playing"
+ let wasPlaying = AppState.shared.musicPlaying
- // The notification carries no position, shuffle, repeat, volume or artwork: read them
- // when we may, otherwise look the cover up in Apple's public catalog.
- if automationGranted {
- refresh()
- } else if artwork == nil {
- loadArtwork(localData: nil)
- }
- }
+ trackTitle = name.map { Self.shortTitle($0) }.flatMap { $0.isEmpty ? nil : $0 }
+ artist = inputArtist.map { Self.shortArtist($0) }.flatMap { $0.isEmpty ? nil : $0 }
+ album = inputAlbum
- private func setTrack(title: String, artist inputArtist: String, album inputAlbum: String, duration: Double) {
- let oldKey = trackKey
- trackTitle = Self.shortTitle(title).nilIfEmpty
- artist = Self.shortArtist(inputArtist).nilIfEmpty
- album = inputAlbum.nilIfEmpty
- if duration > 0 { self.duration = duration }
- if trackKey != oldKey {
- artwork = trackKey.flatMap { artworkCache[$0] }
- favorited = nil
- }
+ AppState.shared.musicPlaying = playing
syncTaskName()
- }
- private func setPlaying(_ playing: Bool) {
- let wasPlaying = AppState.shared.musicPlaying
- if playing != wasPlaying {
- // Freeze or restart the clock at the current position
- anchor(position(at: Date()))
- }
- AppState.shared.musicPlaying = playing
// Reveal only on transition from not-playing → playing
if playing && !wasPlaying {
NotificationCenter.default.post(name: .musicReveal, object: nil)
}
}
- private func anchor(_ position: Double) {
- positionAnchor = max(0, position)
- positionDate = Date()
- }
-
- private func clearState() {
- trackTitle = nil; artist = nil; album = nil
- duration = 0
- artwork = nil
- favorited = nil
- anchor(0)
- AppState.shared.musicPlaying = false
- syncTaskName()
- }
-
- private func syncTaskName() {
- guard let idx = AppState.shared.tasks.firstIndex(where: { $0.id == "integration_music" }) else { return }
- let title = trackTitle ?? ""
- AppState.shared.tasks[idx].name = title.isEmpty
- ? (PillCatalog.definition(for: "integration_music")?.name ?? "Apple Music")
- : title
- }
-
- // MARK: - Reading Music
-
- /// Reads track, position, shuffle, repeat, volume and favorite. Never launches Music.
- /// The first call is what makes macOS ask for Automation.
- func refresh() {
- guard isPillActive, isMusicRunning() else { return }
+ private func fetchAndApply() {
Task {
let result = await runAppleScript("""
tell application id "com.apple.Music"
set ps to player state as string
- if ps is "stopped" then return {ps}
+ if ps is "stopped" then return {ps, "", "", ""}
try
set tr to current track
set n to name of tr
on error
- return {"stopped"}
+ return {ps, "", "", ""}
end try
set ar to ""
set al to ""
- set du to 0
- set pp to 0
- set fv to "unknown"
try
set ar to artist of tr
end try
try
set al to album of tr
end try
- try
- set du to duration of tr
- end try
- try
- set pp to player position
- end try
- try
- set fv to favorited of tr as string
- end try
- return {ps, n, ar, al, du, pp, shuffle enabled, song repeat as string, sound volume, fv}
- end tell
- """)
- guard case .success(let v) = result, let ps = v.first?.text else { return }
- guard isPillActive else { return }
- if ps == "stopped" || v.count < 10 { clearState(); return }
-
- let oldKey = trackKey
- setTrack(title: v[1].text, artist: v[2].text, album: v[3].text, duration: v[4].number)
- anchor(v[5].number)
- setPlaying(ps == "playing")
- shuffling = v[6].flag
- repeatMode = RepeatMode(rawValue: v[7].text) ?? .off
- if pendingVolume == nil { volume = Int(v[8].number.rounded()) }
- favorited = v[9].text == "true" ? true : v[9].text == "false" ? false : nil
- if artwork == nil || trackKey != oldKey { fetchArtwork() }
- }
- }
-
- // MARK: - Artwork
-
- /// The cover Music has for the track; streamed tracks without one fall back to Apple's catalog.
- private func fetchArtwork() {
- guard let key = trackKey, artworkCache[key] == nil, artworkLoadingKey != key else {
- if let key = trackKey, let cached = artworkCache[key] { artwork = cached }
- return
- }
- Task {
- let result = await runAppleScript("""
- tell application id "com.apple.Music"
- try
- return raw data of artwork 1 of current track
- on error
- return ""
- end try
+ return {ps, n, ar, al}
end tell
""")
- guard trackKey == key else { return }
- if case .success(let v) = result, let data = v.first?.data {
- loadArtwork(localData: data)
- } else {
- loadArtwork(localData: nil)
+ guard case .success(let values) = result, values.count >= 4 else { return }
+ let playing = values[0] == "playing"
+ let wasPlaying = AppState.shared.musicPlaying
+ trackTitle = values[1].isEmpty ? nil : Self.shortTitle(values[1])
+ artist = values[2].isEmpty ? nil : Self.shortArtist(values[2])
+ album = values[3].isEmpty ? nil : values[3]
+ AppState.shared.musicPlaying = playing
+ syncTaskName()
+ if playing && !wasPlaying {
+ NotificationCenter.default.post(name: .musicReveal, object: nil)
}
}
}
- private func loadArtwork(localData: Data?) {
- guard let key = trackKey else { return }
- if let cached = artworkCache[key] { artwork = cached; return }
- if let localData, let image = NSImage(data: localData) {
- cacheArtwork(image, for: key)
- artwork = image
- return
- }
- guard artworkLoadingKey != key else { return }
- artworkLoadingKey = key
- let term = [artist, album ?? trackTitle].compactMap { $0 }.joined(separator: " ")
- Task {
- defer { if artworkLoadingKey == key { artworkLoadingKey = nil } }
- guard let url = await Self.catalogArtworkURL(term: term),
- let (data, response) = try? await URLSession.shared.data(from: url),
- (response as? HTTPURLResponse)?.statusCode == 200,
- let image = NSImage(data: data) else { return }
- cacheArtwork(image, for: key)
- if trackKey == key { artwork = image }
- }
- }
-
- private func cacheArtwork(_ image: NSImage, for key: String) {
- artworkCache[key] = image
- artworkCacheOrder.removeAll { $0 == key }
- artworkCacheOrder.append(key)
- while artworkCacheOrder.count > 12 {
- artworkCache[artworkCacheOrder.removeFirst()] = nil
- }
+ private func clearState() {
+ trackTitle = nil; artist = nil; album = nil
+ AppState.shared.musicPlaying = false
+ syncTaskName()
}
- /// Apple's public iTunes Search API: no account, just "artist album".
- nonisolated private static func catalogArtworkURL(term: String) async -> URL? {
- guard !term.trimmingCharacters(in: .whitespaces).isEmpty else { return nil }
- var comps = URLComponents(string: "https://itunes.apple.com/search")!
- comps.queryItems = [
- URLQueryItem(name: "term", value: term),
- URLQueryItem(name: "entity", value: "album"),
- URLQueryItem(name: "limit", value: "1"),
- ]
- guard let url = comps.url,
- let (data, response) = try? await URLSession.shared.data(from: url),
- (response as? HTTPURLResponse)?.statusCode == 200,
- let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any],
- let first = (json["results"] as? [[String: Any]])?.first,
- let small = first["artworkUrl100"] as? String,
- // Only Apple's image CDN: the URL comes from a web response
- let art = safeWebURL(small.replacingOccurrences(of: "100x100bb", with: "300x300bb")),
- art.scheme == "https",
- art.host?.lowercased().hasSuffix(".mzstatic.com") == true else { return nil }
- return art
+ private func syncTaskName() {
+ guard let idx = AppState.shared.tasks.firstIndex(where: { $0.id == "integration_music" }) else { return }
+ let title = trackTitle ?? ""
+ AppState.shared.tasks[idx].name = title.isEmpty
+ ? (PillCatalog.definition(for: "integration_music")?.name ?? "Apple Music")
+ : title
}
// MARK: - Playback controls
func playPause() {
guard isMusicRunning() else { return }
- setPlaying(!AppState.shared.musicPlaying) // optimistic; Music's notification confirms
- command("playpause")
+ Task { await runAppleScript(#"tell application id "com.apple.Music" to playpause"#) }
}
func nextTrack() {
guard isMusicRunning() else { return }
- command("next track")
+ Task { await runAppleScript(#"tell application id "com.apple.Music" to next track"#) }
}
func previousTrack() {
guard isMusicRunning() else { return }
- command("back track")
- }
-
- func seek(to seconds: Double) {
- guard isMusicRunning(), duration > 0 else { return }
- let target = min(max(0, seconds), max(0, duration - 1))
- anchor(target)
- command("set player position to \(Int(target.rounded()))", refreshAfter: false)
- }
-
- func setShuffling(_ on: Bool) {
- guard isMusicRunning() else { return }
- shuffling = on
- command("set shuffle enabled to \(on)", refreshAfter: false)
- }
-
- /// off → all → one → off, like the Music app.
- func cycleRepeat() {
- guard isMusicRunning() else { return }
- let next: RepeatMode = repeatMode == .off ? .all : repeatMode == .all ? .one : .off
- repeatMode = next
- command("set song repeat to \(next.rawValue)", refreshAfter: false)
- }
-
- func toggleFavorite() {
- guard isMusicRunning(), let current = favorited else { return }
- favorited = !current
- Task {
- let result = await runAppleScript(
- #"tell application id "com.apple.Music" to set favorited of current track to \#(!current)"#)
- // Some tracks can't be favorited: put the heart back
- if case .success = result {} else { favorited = current }
- }
- }
-
- /// Coalesced: a slider drag sends at most one Apple Event every 120 ms.
- func setVolume(_ value: Int) {
- guard isMusicRunning() else { return }
- let v = min(100, max(0, value))
- volume = v
- pendingVolume = v
- guard volumeTask == nil else { return }
- volumeTask = Task {
- while let v = pendingVolume {
- pendingVolume = nil
- await runAppleScript(#"tell application id "com.apple.Music" to set sound volume to \#(v)"#)
- try? await Task.sleep(for: .milliseconds(120))
- }
- volumeTask = nil
- }
- }
-
- private func command(_ verb: String, refreshAfter: Bool = true) {
- Task {
- let result = await runAppleScript(#"tell application id "com.apple.Music" to \#(verb)"#)
- guard refreshAfter, case .success = result else { return }
- // Let Music settle on the new track before reading it back
- try? await Task.sleep(for: .milliseconds(350))
- refresh()
- }
+ Task { await runAppleScript(#"tell application id "com.apple.Music" to back track"#) }
}
func openMusic() {
- if let app = NSWorkspace.shared.runningApplications.first(where: { $0.bundleIdentifier == Self.bundleId }) {
- app.activate()
+ if let app = NSWorkspace.shared.runningApplications.first(where: { $0.bundleIdentifier == "com.apple.Music" }) {
+ app.activate(options: .activateIgnoringOtherApps)
} else {
NSWorkspace.shared.open(URL(fileURLWithPath: "/System/Applications/Music.app"))
}
@@ -470,59 +235,45 @@ final class MusicController: ObservableObject {
// MARK: - AppleScript runner
- /// One item of an AppleScript result, read the ways callers may expect it.
- struct ScriptValue: Sendable {
- let text: String
- let number: Double
- let flag: Bool
- let data: Data?
- }
-
- enum ScriptResult: Sendable { case success([ScriptValue]), denied, error }
+ enum ScriptResult { case success([String]), denied, error }
@discardableResult
private func runAppleScript(_ source: String) async -> ScriptResult {
- let grantedKey = Self.grantedKey
- let result: ScriptResult = await withCheckedContinuation { cont in
+ await withCheckedContinuation { cont in
queue.async {
- guard let script = NSAppleScript(source: source) else {
- cont.resume(returning: .error); return
- }
+ let script = NSAppleScript(source: source)!
var errDict: NSDictionary?
let desc = script.executeAndReturnError(&errDict)
if let errDict {
let code = (errDict[NSAppleScript.errorNumber] as? Int) ?? 0
- cont.resume(returning: code == -1743 ? .denied : .error)
+ if code == -1743 {
+ Task { @MainActor in
+ AppState.shared.musicAutomationDenied = true
+ UserDefaults.standard.set(false, forKey: "coucou.musicAutomationGranted")
+ }
+ cont.resume(returning: .denied)
+ } else {
+ cont.resume(returning: .error)
+ }
return
}
- // Extract values on this queue (NSAppleEventDescriptor isn't Sendable)
- func value(_ d: NSAppleEventDescriptor?) -> ScriptValue {
- let text = d?.stringValue ?? ""
- // Only binary results (artwork) carry data; text comes back through `text`
- let binary = d.map { $0.stringValue == nil && !$0.data.isEmpty } ?? false
- return ScriptValue(text: text, number: d?.doubleValue ?? 0,
- flag: d?.booleanValue ?? false, data: binary ? d?.data : nil)
+ Task { @MainActor in
+ UserDefaults.standard.set(true, forKey: "coucou.musicAutomationGranted")
+ AppState.shared.musicAutomationDenied = false
}
+ // Extract values on this queue before resuming (avoids NSAppleEventDescriptor Sendable issues)
+ var values: [String] = []
let count = desc.numberOfItems
- let values = count > 0 ? (1...count).map { value(desc.atIndex($0)) } : [value(desc)]
+ if count > 0 {
+ for i in 1...count {
+ values.append(desc.atIndex(i)?.stringValue ?? "")
+ }
+ } else {
+ values = [desc.stringValue ?? ""]
+ }
cont.resume(returning: .success(values))
}
}
- switch result {
- case .success:
- UserDefaults.standard.set(true, forKey: grantedKey)
- AppState.shared.musicAutomationDenied = false
- case .denied:
- UserDefaults.standard.set(false, forKey: grantedKey)
- AppState.shared.musicAutomationDenied = true
- case .error:
- break
- }
- return result
}
}
-
-private extension String {
- var nilIfEmpty: String? { isEmpty ? nil : self }
-}
#endif
diff --git a/README.md b/README.md
index 939057c9..5c47ed7a 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ Meet **Mochi**: a soft little squircle with big eyes that pops out of your notch
- 🖥️ **Mochi on the desktop** — drag Mochi out of the island to set him loose on your desktop: he floats as a 120 pt companion, follows your cursor, wears his outfit, reacts to alerts by flying home and flying back, and comes back where you left him on next launch.
- 🪟 **Drag Mochi onto any window** — attach that window as context for Claude *(macOS)*.
- 🔌 **Integrations** — Stripe payments, n8n workflows, GitHub (open PRs, reviews requested, CI status), Vercel deployments, Resend emails, Notion, Cal.com. Each one gets its own little colored Mochi.
-- 🎵 **Apple Music pill** *(macOS, GitHub build)* — add the Apple Music pill in Settings → Active pills: album cover, title and artist, a progress bar you drag to seek, play/pause, previous/next, shuffle, repeat, volume and favorite, right from the notch; Mochi dances while it plays.
+- 🎵 **Apple Music pill** *(macOS, GitHub build)* — add the Apple Music pill in Settings → Active pills to see what's playing and control playback from the notch; Mochi dances while it plays.
- 🎧 **Spotify pill** *(macOS, GitHub build)* — add the Spotify pill in Settings → Active pills: album cover, title and artist, a progress bar you drag to seek, play/pause, previous/next, shuffle, repeat and volume, right from the notch; Mochi dances while it plays.
- 👗 **Dress Mochi up** — right-click him for the wardrobe. He also dresses up for the seasons on his own.
- ⌨️ **Keyboard shortcuts** — open the chat, jump to an alert or a terminal, switch pills, mute, send Mochi to the desktop or open the wardrobe from anywhere; all customizable in Settings → Shortcuts.
diff --git a/docs/privacy.html b/docs/privacy.html
index bbcb4f17..e5118912 100644
--- a/docs/privacy.html
+++ b/docs/privacy.html
@@ -40,7 +40,7 @@
<p>If you install the Claude Code hooks, Claude Code sends session events to Coucou through a local connection on your computer. If you install the Gemini CLI, Antigravity or Codex hooks, those agents send their session events the same way. These events never leave your computer through Coucou. If you install the Plan usage status line, Claude Code also passes the percentage used and the reset times of your plan windows to Coucou through the same local connection; nothing leaves your computer. Before changing any settings file (<code>~/.claude/settings.json</code>, <code>~/.gemini/settings.json</code>, <code>~/.gemini/config/hooks.json</code>, <code>~/.codex/hooks.json</code>), Coucou makes a dated backup and shows you the changes. File edits (the old and new text received from Edit, MultiEdit and Write hooks) are kept in memory for the duration of the session and deleted when the session ends or after one hour of inactivity; they never leave your computer.</p>
<h2>6. Apple Music and Spotify</h2>
-<p>If you activate the Apple Music pill <i>(macOS, GitHub build)</i>, Coucou reads the current track (title, artist, album) from Music on your Mac to display it in the notch, and only sends play, pause, skip, seek, shuffle, repeat, volume or favorite commands to Music when you click. The album cover comes from Music itself; when Music has none for the track, Coucou looks it up in Apple's public iTunes Search API (<code>itunes.apple.com/search</code>) with the artist and album names. No account, key or other data is sent.</p>
+<p>If you activate the Apple Music pill <i>(macOS, GitHub build)</i>, Coucou reads the current track (title, artist, album) from Music on your Mac to display it in the notch, and only sends play, pause or skip commands to Music when you click. Nothing leaves your computer.</p>
<p>If you activate the Spotify pill <i>(macOS, GitHub build)</i>, Coucou reads the current track (title, artist, album, position, shuffle, repeat and volume) from the Spotify app on your Mac, and only sends play, pause, skip, seek, shuffle, repeat or volume commands when you click. To show the album cover, Coucou downloads it from Spotify's image server and, when the Spotify app doesn't give its address, asks Spotify's public <code>open.spotify.com/oembed</code> for it with the track's link. No account, key or other data is sent. <a href="https://www.spotify.com/legal/privacy-policy/">Spotify privacy policy</a>.</p>
<h2>7. Email</h2>
@@ -104,7 +104,7 @@
<p>Si tu installes les hooks Claude Code, Claude Code envoie les événements de session à Coucou par une connexion locale sur ton ordinateur. Si tu installes les hooks Gemini CLI, Antigravity ou Codex, ces agents envoient leurs événements de la même façon. Coucou ne les fait jamais sortir de ton ordinateur. Si tu installes le relais de jauge de forfait (Plan usage), Claude Code transmet aussi à Coucou, par la même connexion locale, les pourcentages utilisés et les heures de remise à zéro de tes fenêtres de forfait ; rien ne quitte ton ordinateur. Avant de modifier un fichier de configuration (<code>~/.claude/settings.json</code>, <code>~/.gemini/settings.json</code>, <code>~/.gemini/config/hooks.json</code>, <code>~/.codex/hooks.json</code>), Coucou en fait une sauvegarde datée et te montre les changements. Les modifications de fichiers (l'ancien et le nouveau texte reçus via les hooks Edit, MultiEdit et Write) sont conservées en mémoire pendant la durée de la session et supprimées à la fin de la session ou après une heure d'inactivité ; elles ne quittent jamais ton ordinateur.</p>
<h2>6. Apple Music et Spotify</h2>
-<p>Si tu actives la pastille Apple Music <i>(macOS, version GitHub)</i>, Coucou lit le morceau en cours (titre, artiste, album) depuis l’app Musique de ton Mac pour l’afficher dans le notch, et n’envoie lecture, pause, morceau suivant, avance, lecture aléatoire, répétition, volume ou favori à Musique que quand tu cliques. La pochette vient de Musique ; quand Musique n’en a pas pour le morceau, Coucou la cherche dans l’API publique iTunes Search d’Apple (<code>itunes.apple.com/search</code>) avec les noms de l’artiste et de l’album. Aucun compte, aucune clé ni autre donnée n’est envoyé.</p>
+<p>Si tu actives la pastille Apple Music <i>(macOS, version GitHub)</i>, Coucou lit le morceau en cours (titre, artiste, album) depuis l’app Musique de ton Mac pour l’afficher dans le notch, et n’envoie lecture, pause ou morceau suivant à Musique que quand tu cliques. Rien ne quitte ton ordinateur.</p>
<p>Si tu actives la pastille Spotify <i>(macOS, version GitHub)</i>, Coucou lit le morceau en cours (titre, artiste, album, position, lecture aléatoire, répétition et volume) depuis l’app Spotify de ton Mac, et n’envoie lecture, pause, morceau suivant, avance, lecture aléatoire, répétition ou volume que quand tu cliques. Pour afficher la pochette, Coucou la télécharge depuis le serveur d’images de Spotify et, quand l’app Spotify n’en donne pas l’adresse, la demande à l’oEmbed public de Spotify (<code>open.spotify.com/oembed</code>) avec le lien du morceau. Aucun compte, aucune clé ni autre donnée n’est envoyé. <a href="https://www.spotify.com/legal/privacy-policy/">Politique de confidentialité de Spotify</a>.</p>
<h2>7. E-mail</h2>