Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

chore: auto-save WIP via Claude stop-hook safety net (2026-07-01 19:16)

Ruben Lütke170acc4d26bd
diff --git a/AGENTS.md b/AGENTS.md
index 808196f8ae..9f905952b8 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -146,6 +146,7 @@ Four tiers: `safe` / `monitor` / `ask` / `block`, priority **blacklist > whiteli
| AP-22 | Configure a tier (router / ack / STT / TTS / worker / critic / fallback) whose primary AND fallback resolve to the SAME provider family, or build a fallback chain from hardcoded provider NAMES | Single-provider brick: one missing key / 429 / 402 / outage takes the whole tier down even when the user has a healthy DIFFERENT provider. Resolve every tier through one key-aware chain that skips the dead/keyless provider, crosses families, and degrades honestly only when NO family is reachable — recoverable in-app |
| AP-23 | Build or TEST a feature only against the maintainer's own config / keys / provider / OS and claim it done | The whole API-Keys section silently bricked for every other downloader and on a headless VPS (credentials couldn't even be SAVED, ENV keys read as "not configured", channels/plugins/OAuth 500'd). "Works on my machine" is the defect — verify the three non-maintainer paths in §3 |
| AP-24 | Call a shared native inference engine (ctranslate2 / faster-whisper, an ONNX / torch session) concurrently from two callers, OR "recover" a hung inference with only a timeout that re-polls the SAME wedged engine | `WhisperModel.transcribe` is NOT thread-safe: the wake poll loop + the VAD probe sharing one provider hung it forever; a hung `to_thread` can't be cancelled, so a timeout only BOUNDS, never RECOVERS. Fix: a non-blocking per-instance inference lock (2nd call → skip) + a `recover()` that rebuilds a FRESH model after N failures (BUG-036) |
+| AP-25 | Run the always-on wake/keyword Whisper on the **GPU** via CTranslate2/faster-whisper, or auto-upgrade a custom-phrase (`stt_match`) wake to `large-v3-turbo/cuda` | On the maintainer's NVIDIA Blackwell GPU (RTX 5070 Ti / sm_120) CTranslate2 `model.transcribe` **HANGS on every inference** (8 s timeout → self-heal drops+rebuilds the model → the cold rebuild hangs again → a vicious cycle that leaves the wake **permanently DEAF**). The same hang also appears on `base`/`cpu` when ctranslate2's auto thread-pool deadlocks against PyTorch's OpenMP in the shared process. Keep the wake on `base`/`cpu` with a FIXED `cpu_threads` (bounds ctranslate2 vs torch); `[stt].wake_high_accuracy` GPU turbo is **OFF by default** and opt-in ONLY on a GPU verified not to hang. Truly instant+accurate custom-word wake needs a trained neural KWS model (openWakeWord `custom_onnx`), NOT transcription (2026-06-30 live-log forensic; see `docs/local-wakeword/WAKE-RELIABILITY-DEEPDIVE.md`) |
---
diff --git a/CLAUDE.md b/CLAUDE.md
index 808196f8ae..9f905952b8 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -146,6 +146,7 @@ Four tiers: `safe` / `monitor` / `ask` / `block`, priority **blacklist > whiteli
| AP-22 | Configure a tier (router / ack / STT / TTS / worker / critic / fallback) whose primary AND fallback resolve to the SAME provider family, or build a fallback chain from hardcoded provider NAMES | Single-provider brick: one missing key / 429 / 402 / outage takes the whole tier down even when the user has a healthy DIFFERENT provider. Resolve every tier through one key-aware chain that skips the dead/keyless provider, crosses families, and degrades honestly only when NO family is reachable — recoverable in-app |
| AP-23 | Build or TEST a feature only against the maintainer's own config / keys / provider / OS and claim it done | The whole API-Keys section silently bricked for every other downloader and on a headless VPS (credentials couldn't even be SAVED, ENV keys read as "not configured", channels/plugins/OAuth 500'd). "Works on my machine" is the defect — verify the three non-maintainer paths in §3 |
| AP-24 | Call a shared native inference engine (ctranslate2 / faster-whisper, an ONNX / torch session) concurrently from two callers, OR "recover" a hung inference with only a timeout that re-polls the SAME wedged engine | `WhisperModel.transcribe` is NOT thread-safe: the wake poll loop + the VAD probe sharing one provider hung it forever; a hung `to_thread` can't be cancelled, so a timeout only BOUNDS, never RECOVERS. Fix: a non-blocking per-instance inference lock (2nd call → skip) + a `recover()` that rebuilds a FRESH model after N failures (BUG-036) |
+| AP-25 | Run the always-on wake/keyword Whisper on the **GPU** via CTranslate2/faster-whisper, or auto-upgrade a custom-phrase (`stt_match`) wake to `large-v3-turbo/cuda` | On the maintainer's NVIDIA Blackwell GPU (RTX 5070 Ti / sm_120) CTranslate2 `model.transcribe` **HANGS on every inference** (8 s timeout → self-heal drops+rebuilds the model → the cold rebuild hangs again → a vicious cycle that leaves the wake **permanently DEAF**). The same hang also appears on `base`/`cpu` when ctranslate2's auto thread-pool deadlocks against PyTorch's OpenMP in the shared process. Keep the wake on `base`/`cpu` with a FIXED `cpu_threads` (bounds ctranslate2 vs torch); `[stt].wake_high_accuracy` GPU turbo is **OFF by default** and opt-in ONLY on a GPU verified not to hang. Truly instant+accurate custom-word wake needs a trained neural KWS model (openWakeWord `custom_onnx`), NOT transcription (2026-06-30 live-log forensic; see `docs/local-wakeword/WAKE-RELIABILITY-DEEPDIVE.md`) |
---
diff --git a/jarvis/ui/web/frontend/src/components/board/ShareDialog.tsx b/jarvis/ui/web/frontend/src/components/board/ShareDialog.tsx
index 5202639697..9781c1f55c 100644
--- a/jarvis/ui/web/frontend/src/components/board/ShareDialog.tsx
+++ b/jarvis/ui/web/frontend/src/components/board/ShareDialog.tsx
@@ -13,6 +13,7 @@ import {
} from "@/lib/shareImage";
import { saveOrDownload } from "@/lib/clipboard";
import { useCapabilities } from "@/hooks/useCapabilities";
+import { useEventStore } from "@/store/events";
import { cn } from "@/lib/utils";
import { useT } from "@/i18n";
@@ -41,7 +42,25 @@ export function ShareDialog({ open, onOpenChange, stats }: Props) {
const t = useT();
const caps = useCapabilities();
const native = caps.data?.native_file_actions ?? false;
+ const pushToast = useEventStore((s) => s.pushToast);
const cardRef = useRef<HTMLDivElement>(null);
+
+ // After a desktop save, surface the same "Show in folder" / "Open" toast the
+ // transcript downloads use, so the share card is reachable the same way.
+ const saveCard = async (): Promise<void> => {
+ const filename = "jarvis-stats.png";
+ const savedPath = await saveOrDownload({
+ filename,
+ blob: await ensureBlob(),
+ native,
+ });
+ if (savedPath) {
+ pushToast("success", `${t("session_detail.saved_to_downloads")} ${savedPath}`, {
+ filePath: savedPath,
+ filename,
+ });
+ }
+ };
const [handle, setHandle] = useShareHandle();
const [status, setStatus] = useState<Status>({ kind: "idle" });
@@ -111,22 +130,14 @@ export function ShareDialog({ open, onOpenChange, stats }: Props) {
if (res === "copied") {
setStatus({ kind: "ok", msgKey: "board_view.share.status_copied" });
} else {
- await saveOrDownload({
- filename: "jarvis-stats.png",
- blob: await ensureBlob(),
- native,
- });
+ await saveCard();
setStatus({ kind: "ok", msgKey: "board_view.share.status_copy_unsupported" });
}
});
const onSave = () =>
run(async () => {
- await saveOrDownload({
- filename: "jarvis-stats.png",
- blob: await ensureBlob(),
- native,
- });
+ await saveCard();
setStatus({ kind: "ok", msgKey: "board_view.share.status_saved" });
});
diff --git a/jarvis/ui/web/frontend/src/components/sessions/SessionDetail.tsx b/jarvis/ui/web/frontend/src/components/sessions/SessionDetail.tsx
index 5061f8925a..819e73267d 100644
--- a/jarvis/ui/web/frontend/src/components/sessions/SessionDetail.tsx
+++ b/jarvis/ui/web/frontend/src/components/sessions/SessionDetail.tsx
@@ -146,6 +146,7 @@ export function SessionDetail({ detail, loading, error }: Props) {
savedPath
? `${t("session_detail.saved_to_downloads")} ${savedPath}`
: `${t("session_detail.downloaded_as")} ${filename}`,
+ savedPath ? { filePath: savedPath, filename } : undefined,
);
} catch (e) {
pushToast(
diff --git a/jarvis/ui/web/frontend/src/components/sessions/TurnCard.tsx b/jarvis/ui/web/frontend/src/components/sessions/TurnCard.tsx
index afafca4220..0684885e99 100644
--- a/jarvis/ui/web/frontend/src/components/sessions/TurnCard.tsx
+++ b/jarvis/ui/web/frontend/src/components/sessions/TurnCard.tsx
@@ -93,6 +93,7 @@ export function TurnCard({ turn, spoken = [] }: Props) {
savedPath
? `${t("turn_card.saved_to_downloads")} ${savedPath}`
: `${t("turn_card.downloaded_as")} ${filename}`,
+ savedPath ? { filePath: savedPath, filename } : undefined,
);
}, [turn, spoken, pushToast, t, native]);