agent: lumotia-rebrand — fix QC blockers for phase 0
Some checks failed
check / cargo check (macos-latest) (push) Has been cancelled
check / cargo check (ubuntu-22.04) (push) Has been cancelled
check / cargo check (windows-latest) (push) Has been cancelled
check / svelte build + lint (push) Has been cancelled

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) <noreply@anthropic.com>
This commit is contained in:
2026-05-13 08:42:22 +01:00
parent 2ca01e7c9d
commit bc2db91520
2 changed files with 3 additions and 1 deletions

View File

@@ -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;
}

View File

@@ -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);