From bc2db9152070a9ee29a595812d068dad076ea966 Mon Sep 17 00:00:00 2001 From: Jake Date: Wed, 13 May 2026 08:42:22 +0100 Subject: [PATCH] =?UTF-8?q?agent:=20lumotia-rebrand=20=E2=80=94=20fix=20QC?= =?UTF-8?q?=20blockers=20for=20phase=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 0 QC found two real blockers in the baseline commits: 1. crates/llm/src/lib.rs:215 — early-break guard was inverted. The guard fired when grammar.is_some() (where grammar already enforces shape, making the check redundant) and was disabled for grammar.is_none() (the content-tags path that actually needs it). Flipped to grammar.is_none() so the JSON-envelope short-circuit fires for free-form JSON generation as the commit message implied. 2. src/lib/pages/FilesPage.svelte — handleExport() success path had no toast, asymmetric with DictationPage which does. Added the toasts import and a toasts.success() call after the native save so both export surfaces give consistent feedback. cargo test -p magnotia-llm --lib: 21 pass. npm run check: 0 errors. Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/llm/src/lib.rs | 2 +- src/lib/pages/FilesPage.svelte | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/llm/src/lib.rs b/crates/llm/src/lib.rs index 65c92ad..067fc7b 100644 --- a/crates/llm/src/lib.rs +++ b/crates/llm/src/lib.rs @@ -212,7 +212,7 @@ impl LlmEngine { generated.push_str(&piece); sampler.accept(next); - if config.grammar.is_some() && json_envelope_complete(&generated) { + if config.grammar.is_none() && json_envelope_complete(&generated) { break; } diff --git a/src/lib/pages/FilesPage.svelte b/src/lib/pages/FilesPage.svelte index 9bc0e07..8d704af 100644 --- a/src/lib/pages/FilesPage.svelte +++ b/src/lib/pages/FilesPage.svelte @@ -9,6 +9,7 @@ import EmptyState from "$lib/components/EmptyState.svelte"; import { exportTranscript } from "$lib/utils/export.js"; import { hasTauriRuntime } from "$lib/utils/runtime"; + import { toasts } from "$lib/stores/toasts.svelte.js"; import { Upload } from 'lucide-svelte'; let fileTranscript = $state(""); @@ -151,6 +152,7 @@ }); if (!path) return; await invoke("write_text_file_cmd", { path, contents: content }); + toasts.success(`Exported ${format.toUpperCase()} transcript`); return; } catch (err) { console.error("file transcript export failed", err);