diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index ab54292..929ec72 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "theseus",
- "version": "0.6.4",
+ "version": "0.6.5",
"description": "A private, never-sends personal assistant for Claude Code on macOS: one prioritized list, morning and evening briefings, texts you owe replies, drafts in your voice. Independent project, not affiliated with Anthropic.",
"author": { "name": "Theseus contributors" },
"license": "MIT",
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f56cec1..fbadd29 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# Changelog
+## 0.6.5
+- **Theseus is in the Dock now,** like LeafJuice, with its menu bar icon as well. Right-click the Dock icon and choose Quit, or use Cmd-Q, Theseus > Quit, or the menu bar icon's Quit. Closing the window keeps Theseus running.
+- **Every Quit really quits.** Before, Quit stopped the helper that gives Remote Control a terminal but not the `claude remote-control` it had started, so that kept running, and macOS called Theseus "in use" when you tried to replace it. Some Quits also didn't leave the note that tells the watchdog to leave Theseus closed, so it came back within a minute. Now every Quit leaves that note and stops everything Theseus started, politely first and by force after three seconds. If anything holds Quit up, Theseus exits anyway after eight seconds. Opening Theseus clears the note, so the watchdog looks after it again.
+- Tested: new tests for the note, the Dock icon and stopping a child that ignores hangups and stop requests. In a sandbox with a stand-in for Remote Control, Cmd-Q and the Dock's Quit (sent as macOS sends it) each exited, left the note and left no process behind. A bundled build kept its Dock icon and menus with the window closed. Not tested: clicking the menu bar icon's Quit (it runs the same code as Cmd-Q), and a real Remote Control session.
+
## 0.6.4
- **A normal Mac menu bar while the window is open.** Theseus lives in the menu bar, and until now its window had no menus, so the only way to quit was the menu bar icon. Opening the window now gives Theseus a Dock icon and the usual menus: Theseus (About, Settings…, Hide, Quit with Cmd-Q), Edit and Window. Settings… opens Setup. Closing the window puts Theseus back in the menu bar only. Quit from either place stops Remote Control and keeps Theseus closed until you open it again. Tested on a debug build with an empty workspace: the menus appear, Close Window returns it to the menu bar, and Quit exits and leaves the quit flag. Not tested: Settings… switching to Setup on screen, and Open Theseus from the menu bar icon (the same code path as the first-launch window, which was tested).
diff --git a/apps/desktop/package.json b/apps/desktop/package.json
index f77a8ee..536f6e0 100644
--- a/apps/desktop/package.json
+++ b/apps/desktop/package.json
@@ -1,7 +1,7 @@
{
"name": "theseus-desktop",
"private": true,
- "version": "0.6.4",
+ "version": "0.6.5",
"type": "module",
"description": "Theseus for Mac: hosts the Theseus engine (Remote Control, checks, briefings) with one set of macOS permissions.",
"scripts": {
diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock
index 1cb14ee..197b9b5 100644
--- a/apps/desktop/src-tauri/Cargo.lock
+++ b/apps/desktop/src-tauri/Cargo.lock
@@ -3277,8 +3277,9 @@ dependencies = [
[[package]]
name = "theseus"
-version = "0.6.4"
+version = "0.6.5"
dependencies = [
+ "libc",
"serde",
"serde_json",
"tauri",
diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml
index b2ffe2a..37d8592 100644
--- a/apps/desktop/src-tauri/Cargo.toml
+++ b/apps/desktop/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "theseus"
-version = "0.6.4"
+version = "0.6.5"
description = "Theseus for Mac"
authors = ["Theseus contributors"]
license = "MIT"
@@ -17,3 +17,4 @@ tauri-build = { version = "2", features = [] }
tauri = { version = "2", features = ["tray-icon", "image-png"] }
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
+libc = "0.2"
diff --git a/apps/desktop/src-tauri/Info.plist b/apps/desktop/src-tauri/Info.plist
index 95c1a42..e2e240e 100644
--- a/apps/desktop/src-tauri/Info.plist
+++ b/apps/desktop/src-tauri/Info.plist
@@ -16,7 +16,5 @@
Theseus reads your Notes inbox folder and updates your pinned Today and Master List notes.
NSContactsUsageDescription
Theseus shows names instead of phone numbers for people who are waiting on you.
- LSUIElement
-
diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs
index 83da756..136179e 100644
--- a/apps/desktop/src-tauri/src/lib.rs
+++ b/apps/desktop/src-tauri/src/lib.rs
@@ -196,12 +196,58 @@ fn set(s: &S, f: F) {
fn stop_remote(s: &S) {
if let Ok(mut r) = s.remote.lock() {
if let Some(mut rem) = r.take() {
- let _ = rem.child.kill();
- let _ = rem.child.wait();
+ stop_tree(&mut rem.child);
}
}
}
+/// Every process below `root`, children first found, from one `ps` listing.
+fn descendants(root: u32) -> Vec {
+ let Ok(out) = Command::new("/bin/ps").args(["-A", "-o", "pid=,ppid="]).output() else { return Vec::new() };
+ let pairs: Vec<(i32, i32)> = String::from_utf8_lossy(&out.stdout)
+ .lines()
+ .filter_map(|l| {
+ let mut it = l.split_whitespace().map(|n| n.parse::());
+ Some((it.next()?.ok()?, it.next()?.ok()?))
+ })
+ .collect();
+ let mut found = vec![root as i32];
+ let mut i = 0;
+ while i < found.len() {
+ let parent = found[i];
+ found.extend(pairs.iter().filter(|(_, pp)| *pp == parent).map(|(p, _)| *p));
+ i += 1;
+ }
+ found.remove(0);
+ found
+}
+
+/// Stops a child and everything it started. `script` runs Remote Control in a session of its own, so killing
+/// `script` alone left `claude remote-control` running after Quit (owner's report, 2026-11-15). Asks politely
+/// first, then forces whatever is still there after three seconds.
+fn stop_tree(child: &mut Child) {
+ let alive = |pid: i32| unsafe { libc::kill(pid, 0) == 0 };
+ let mut pids = descendants(child.id());
+ pids.push(child.id() as i32);
+ for &pid in &pids {
+ unsafe { libc::kill(pid, libc::SIGTERM) };
+ }
+ let deadline = Instant::now() + Duration::from_secs(3);
+ while Instant::now() < deadline {
+ let _ = child.try_wait();
+ if !pids.iter().any(|&p| alive(p)) {
+ break;
+ }
+ thread::sleep(Duration::from_millis(100));
+ }
+ for &pid in &pids {
+ if alive(pid) {
+ unsafe { libc::kill(pid, libc::SIGKILL) };
+ }
+ }
+ let _ = child.wait();
+}
+
fn remote_loop(s: S) {
let mut wait_until = Instant::now();
loop {
@@ -1015,26 +1061,53 @@ fn build_menu_bar(app: &AppHandle) -> tauri::Result