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.
Swift ai-agentsanthropicantigravityclaudeclaude-codecodexcursordynamic-islandgemini-cliiosiphonlinuxmacosmacos-appmenubar-appnotchopen-sourceswiftswiftuiwindows
fix(linux): offer Claude Desktop pill and desktop launcher (#941)
unknown6241b23565eb
diff --git a/windows/src-tauri/src/platform/linux.rs b/windows/src-tauri/src/platform/linux.rsindex f451eefa..5ed0f4ea 100644--- a/windows/src-tauri/src/platform/linux.rs+++ b/windows/src-tauri/src/platform/linux.rs@@ -261,11 +261,39 @@ pub fn find_on_path(stem: &str) -> Option<PathBuf> {// ── Session windows ("Open terminal") ─────────────────────────────────────────//-// Finding and raising a session's window lives in linux_focus.rs. There is no-// Claude desktop app for Linux.+// Finding and raising a session's window lives in linux_focus.rs.+/// The Claude desktop app on Linux: launched via its desktop entry+/// (installed by Anthropic's official .deb package as claude-desktop.desktop),+/// directly by executable, or via its registered claude:// scheme handler.pub fn open_claude_desktop() -> bool {- false+ open_claude_with(+ || Command::new("gtk-launch").arg("claude-desktop").spawn().is_ok(),+ || {+ let candidates = [+ find_on_path("claude-desktop"),+ Some(PathBuf::from("/usr/bin/claude-desktop")),+ Some(PathBuf::from("/opt/Claude/claude-desktop")),+ Some(PathBuf::from("/opt/Claude/claude")),+ Some(home_dir().join(".local/bin/claude-desktop")),+ ];+ for path in candidates.into_iter().flatten() {+ if path.is_file() && Command::new(path).spawn().is_ok() {+ return true;+ }+ }+ false+ },+ || Command::new("xdg-open").arg("claude://").spawn().is_ok(),+ )+}++fn open_claude_with(+ desktop: impl FnOnce() -> bool,+ binary: impl FnOnce() -> bool,+ protocol: impl FnOnce() -> bool,+) -> bool {+ desktop() || binary() || protocol()}/// Where a CLI such as `codex` or `claude` may be, best first: $PATH, then the@@ -938,3 +966,37 @@ fn apply_rects(gw: &impl IsA<gtk::Widget>, rects: &[(f64, f64, f64, f64)]) {}gdk_window.input_shape_combine_region(®ion, 0, 0);}++#[cfg(test)]+mod claude_launch_tests {+ use super::open_claude_with;+ use std::cell::RefCell;++ #[test]+ fn tries_launchers_in_order_and_stops_after_success() {+ for (desktop, binary, protocol, expected, calls) in [+ (true, true, true, true, vec!["desktop"]),+ (false, true, true, true, vec!["desktop", "binary"]),+ (false, false, true, true, vec!["desktop", "binary", "protocol"]),+ (false, false, false, false, vec!["desktop", "binary", "protocol"]),+ ] {+ let seen = RefCell::new(Vec::new());+ let result = open_claude_with(+ || {+ seen.borrow_mut().push("desktop");+ desktop+ },+ || {+ seen.borrow_mut().push("binary");+ binary+ },+ || {+ seen.borrow_mut().push("protocol");+ protocol+ },+ );+ assert_eq!(result, expected);+ assert_eq!(seen.into_inner(), calls);+ }+ }+}diff --git a/windows/src/core/pills.ts b/windows/src/core/pills.tsindex fa222fef..53f7c7f0 100644--- a/windows/src/core/pills.ts+++ b/windows/src/core/pills.ts@@ -96,10 +96,10 @@ export const PILL_CATALOG: readonly PillDefinition[] = [{ id: "agent_hermes", name: "Hermes", color: "#C084FC", category: "agent",subtitle: N_("Agent"), source: "agent", support: "yes", connect: hooks },// Claude Code sessions run from the Claude desktop app: the relay tags them- // from CLAUDE_CODE_ENTRYPOINT, so there is nothing to install. The app has no- // Linux build.+ // from CLAUDE_CODE_ENTRYPOINT, so there is nothing to install. The app has+ // official builds for Windows and Linux (.deb).{ id: "agent_claude-desktop", name: "Claude Desktop", color: "#D97757", category: "agent",- subtitle: N_("Agent"), source: "agent", support: "windows", connect: none },+ subtitle: N_("Agent"), source: "agent", support: "yes", connect: none },// ── AI for the chat ────────────────────────────────────────────────────────{ id: "ai_anthropic", name: "Anthropic", color: ACCENT.anthropic, category: "ai",subtitle: N_("Chat"), source: "n8n", support: "yes", connect: key("anthropic-api-key") },diff --git a/windows/tests/pills.test.mjs b/windows/tests/pills.test.mjsindex aab49072..67c7dbb2 100644--- a/windows/tests/pills.test.mjs+++ b/windows/tests/pills.test.mjs@@ -94,7 +94,7 @@ test("IDs are unique", () => {assert.equal(new Set(ids).size, ids.length);});-test("this build leaves out what only macOS has, and Claude Desktop on Linux", () => {+test("this build leaves out what only macOS has", () => {const windows = availablePills("windows").map((p) => p.id);const linux = availablePills("linux").map((p) => p.id);for (const id of ["integration_music"]) {@@ -108,11 +108,11 @@ test("this build leaves out what only macOS has, and Claude Desktop on Linux", (assert.ok(linux.includes(id), id);}assert.ok(windows.includes("agent_claude-desktop"));- assert.ok(!linux.includes("agent_claude-desktop"));+ assert.ok(linux.includes("agent_claude-desktop"));// Spotify: MPRIS on Linux, the system media controls on Windows.assert.ok(linux.includes("integration_spotify"));assert.ok(windows.includes("integration_spotify"));- assert.deepEqual(linux, windows.filter((id) => id !== "agent_claude-desktop"));+ assert.deepEqual(linux, windows);});test("Spotify: a service on both systems with nothing to set up", () => {@@ -126,15 +126,15 @@ test("Spotify: a service on both systems with nothing to set up", () => {assert.ok(!mainPillChoices("windows").some((p) => p.id === "integration_spotify"));});-test("Spotify can be declared on both systems; Claude Desktop only on Windows", () => {+test("Spotify and Claude Desktop can be declared on both systems", () => {const d = { mainPill: "integration_claude", activeIntegrations: ["integration_spotify", "integration_n8n"] };assert.deepEqual(sanitizeDeclared(d, "linux").activeIntegrations, ["integration_spotify", "integration_n8n"]);assert.deepEqual(sanitizeDeclared(d, "windows").activeIntegrations, ["integration_spotify", "integration_n8n"]);const empty = { mainPill: "integration_claude", activeIntegrations: [] };assert.deepEqual(toggleDeclared(empty, "integration_spotify", "linux"), ["integration_spotify"]);assert.deepEqual(toggleDeclared(empty, "integration_spotify", "windows"), ["integration_spotify"]);- // Claude Desktop stays Windows only.- assert.equal(toggleDeclared(empty, "agent_claude-desktop", "linux"), null);+ // Claude Desktop is available on both Linux and Windows.+ assert.deepEqual(toggleDeclared(empty, "agent_claude-desktop", "linux"), ["agent_claude-desktop"]);assert.deepEqual(toggleDeclared(empty, "agent_claude-desktop", "windows"), ["agent_claude-desktop"]);});@@ -202,7 +202,7 @@ test("up to four pills next to the main one, never the main one itself", () => {assert.equal(toggleDeclared({ ...d, activeIntegrations: four }, "ai_anthropic", "linux"), null);assert.equal(toggleDeclared(d, "integration_claude", "linux"), null);assert.equal(toggleDeclared(d, "integration_music", "linux"), null);- assert.equal(toggleDeclared(d, "agent_claude-desktop", "linux"), null);+ assert.ok(toggleDeclared(d, "agent_claude-desktop", "linux").includes("agent_claude-desktop"));assert.ok(toggleDeclared(d, "agent_claude-desktop", "windows").includes("agent_claude-desktop"));assert.deepEqual(toggleDeclared(d, "integration_github", "linux"), ["integration_n8n", "integration_stripe"]);// Every chat provider can be declared now that the chat talks to it.