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.

fix(dictation): a second dictation into the same field starts with a space; log the "feels broken lately" report as BUG-200

rubenluetke10-beepc4ac9231ec68
diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa1630e614..8791a126d3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -92,6 +92,12 @@ versioning per [SemVer](https://semver.org/).
catching up the section says so — "{n} of {m} transcripts read, {x} MB to
go" — and reads again every few seconds instead of once a minute.
(BUG-198)
+- **Dictation: a second dictation into the same field starts with a space.**
+ Inside Jarvis's own window a finished dictation is written at the caret
+ exactly as transcribed, so two dictations a few seconds apart read
+ "…Agentic IDEDas war…". The seam now gets the space a person would have
+ typed — after a word, not after a space, an opening bracket or in an empty
+ field, and on both sides when the caret sits inside a word joint.
- **Dictation: "Agentic IDE, Agentic IDE, Agentic IDE" no longer lands in the
text — from the middle of a dictation either.** Whisper recites the
dictionary's bias prompt over a pause and then carries on with the speech
diff --git a/docs/BUGS.md b/docs/BUGS.md
index 3d3d9e11c2..bde7ba461f 100644
--- a/docs/BUGS.md
+++ b/docs/BUGS.md
@@ -14125,3 +14125,56 @@ publishing the wrong one. The grid was corrected within a second — but the
column count had already left the pane, and on Windows a size the agent has
heard cannot be unheard. Anything that goes to the PTY on the strength of a
measurement has to wait for the thing being measured to exist.
+
+## BUG-200: dictation "feels broken lately" — words misheard, sentences that carry no context (MEDIUM, OBSERVED 2026-08-27, OPEN)
+
+**Report (maintainer, 2026-08-27, dictated in German).** "I have the
+feeling that lately the transcriptions are all over the place and simply
+buggy — some words are not recognized correctly, and completely context-less
+sentences come out." Filed as an observation, not a diagnosis: the shape is
+"worse than it was", and nothing below proves a regression yet.
+
+**What the history shows (2026-08-25 → 27, 166 dictations of 8+ words, all
+`groq-api` / `whisper-large-v3`, polish off for 144 of them, Prompt Mode
+for 20).**
+
+- Misheard names and phrases, verbatim: `Chemica` (Kimi), `DeepSeq`
+ (DeepSeek), `Mlocals Models` (local models), `Idee, das ganze Pulte
+ ausführlich zu verhandeln` <!-- i18n-allow: verbatim transcript -->,
+ `der bebeamtlich ist` <!-- i18n-allow: verbatim transcript -->. None of
+ these is in the STT dictionary, and the dictionary cannot repair a phrase
+ it has never been told about.
+- 18 of the 166 went through the **truncation repair** (`truncation_repairs`
+ ≥ 1): the final window came back with too few tokens for its voiced
+ seconds, was cut at its pauses or halved, and each piece was re-read on
+ its own — short clips with no sentence context, merged back on word
+ overlap. Every "context-less" transcript the maintainer named on this
+ day is one of those 18 (16:38, 09:33, 17:34 with 15.9 s of pause
+ trimmed). BUG-185 (both landings) is the same mechanism's worst output.
+- The dictionary's five words ride along as Groq's decoder bias prompt.
+ A bias prompt steers the decoder toward its own vocabulary and its own
+ language; with the dictionary now holding two overlapping entries
+ ("Agentic IDE" and "Agentic"), the recitation it provokes is documented,
+ and its effect on ordinary words next to it is not measured.
+- `audio_preprocessing:raw_pcm`, `noise_suppression:unavailable`,
+ `automatic_gain_control:unavailable` on every entry: the mic feed reaches
+ Groq unprocessed.
+- The history holds three days; nothing older survives to compare against,
+ so "recently" cannot be checked against a baseline from here.
+
+**Where to look first (in order of how much evidence points there).**
+
+1. The truncation repair's re-read pieces: log each piece's text next to
+ the window's own, and see whether the repair replaces a whole readable
+ window with fragments more often than it rescues a dropped tail. A
+ repair that only wins on token count (`transcript_token_count(merged) >
+ tokens`) wins whenever Whisper recites, hallucinates, or stutters.
+2. An A/B over the same audio (`dictation_audio/*.wav` is kept for
+ `partial` outcomes): Groq with and without the dictionary bias prompt;
+ Groq vs. local `faster-whisper large-v3`.
+3. Prompt Mode / polish: whether the LLM pass is what the maintainer
+ remembers as "it used to read well", and why it is off for most
+ dictations today.
+
+**Related.** BUG-185 (bias-prompt recitation), the composer seam fix of the
+same day (two dictations joined without a space, `lib/dictationTarget.ts`).
diff --git a/jarvis/ui/web/frontend/src/lib/dictationTarget.test.ts b/jarvis/ui/web/frontend/src/lib/dictationTarget.test.ts
index d6db313599..e7683d493a 100644
--- a/jarvis/ui/web/frontend/src/lib/dictationTarget.test.ts
+++ b/jarvis/ui/web/frontend/src/lib/dictationTarget.test.ts
@@ -68,6 +68,43 @@ describe("deliverDictationText", () => {
expect(field.value).toBe("before dictated after");
});
+ it("puts a space between the field's last word and the next dictation", () => {
+ // 2026-08-27: two dictations four seconds apart, the caret still at the
+ // end of the first — the field read "…Agentic IDEDas war zum Beispiel…".
+ const field = mountField("Agentic IDE");
+ field.focus();
+ field.setSelectionRange(field.value.length, field.value.length);
+
+ expect(deliverDictationText("Das war zum Beispiel heute auch so.")).toBe("field"); // i18n-allow: verbatim transcript
+ expect(field.value).toBe("Agentic IDE Das war zum Beispiel heute auch so."); // i18n-allow: verbatim transcript
+ });
+
+ it("adds no space where the seam already has one, or opens a bracket", () => {
+ for (const [value, expected] of [
+ ["", "hello world"],
+ ["hello ", "hello world"],
+ ["hello\n", "hello\nworld"],
+ ["(", "(world"],
+ ['"', '"world'],
+ ] as const) {
+ document.body.replaceChildren();
+ const field = mountField(value);
+ field.focus();
+ field.setSelectionRange(value.length, value.length);
+ expect(deliverDictationText(value ? "world" : "hello world")).toBe("field");
+ expect(field.value).toBe(expected);
+ }
+ });
+
+ it("spaces both sides when the caret sits inside a word joint", () => {
+ const field = mountField("hello world");
+ field.focus();
+ field.setSelectionRange(5, 5);
+
+ expect(deliverDictationText("dear")).toBe("field");
+ expect(field.value).toBe("hello dear world");
+ });
+
it("pastes through the terminal bridge, not into its hidden textarea", () => {
const { host, pasted } = mountTerminal();
(host.firstElementChild as HTMLTextAreaElement).focus();
diff --git a/jarvis/ui/web/frontend/src/lib/dictationTarget.ts b/jarvis/ui/web/frontend/src/lib/dictationTarget.ts
index 3f3368c1e6..39718bd147 100644
--- a/jarvis/ui/web/frontend/src/lib/dictationTarget.ts
+++ b/jarvis/ui/web/frontend/src/lib/dictationTarget.ts
@@ -47,7 +47,7 @@
* module reuses it rather than growing a second one that could drift from it.
*/
-import { captureEditSnapshot, pasteInto } from "./editActions";
+import { captureEditSnapshot, pasteInto, type EditSnapshot } from "./editActions";
/**
* What became of one transcript.
@@ -153,6 +153,45 @@ export function isForThisWindow(
return !composerIsRecording;
}
+/** A character a spoken sentence may follow directly, without a space. */
+const OPENS_A_SEAM = /[\s([{"'`\u00AB\u201A\u201E]/;
+/** Where a word begins or ends — what a space belongs between. */
+const WORD_EDGE = /^[\p{L}\p{N}]/u;
+const WORD_OR_MARK_END = /[\p{L}\p{N}.,!?\u2026]$/u;
+
+/**
+ * `text` with the space a spoken sentence needs at the seam.
+ *
+ * Two dictations four seconds apart land in the same field with the caret
+ * still right after the first, and the insertion primitive writes exactly
+ * what it is given — "…Agentic IDEDas war zum Beispiel…" (2026-08-27). A
+ * person typing the second sentence would have pressed the space bar first;
+ * this presses it for the dictation. Only at a word joint: after a space, an
+ * opening bracket or quote, or in an empty field nothing is added, and a
+ * transcript that starts with punctuation keeps its own start. The same
+ * before a word that follows the caret. Terminals and contenteditable
+ * targets are written as-is — their caret context cannot be read this way.
+ */
+function spacedAtSeam(snapshot: EditSnapshot, text: string): string {
+ const element = snapshot.element;
+ if (snapshot.kind !== "field" || snapshot.selectionStart === null) return text;
+ if (
+ !(element instanceof HTMLTextAreaElement) &&
+ !(element instanceof HTMLInputElement)
+ ) {
+ return text;
+ }
+ const value = element.value;
+ const start = snapshot.selectionStart;
+ const end = snapshot.selectionEnd ?? start;
+ const before = start > 0 ? value.charAt(start - 1) : "";
+ const after = value.charAt(end);
+ let out = text;
+ if (before && !OPENS_A_SEAM.test(before) && WORD_EDGE.test(out)) out = " " + out;
+ if (after && WORD_EDGE.test(after) && WORD_OR_MARK_END.test(out)) out = out + " ";
+ return out;
+}
+
/**
* Write `text` wherever the user was typing. Never throws.
*
@@ -178,7 +217,7 @@ export function deliverDictationText(text: string): DictationDelivery {
const snapshot = captureEditSnapshot(element);
let written = false;
try {
- written = pasteInto(snapshot, text);
+ written = pasteInto(snapshot, spacedAtSeam(snapshot, text));
} catch {
// A refused insertion is not a lost dictation: try the next candidate,
// and let the caller report "none" if none of them takes it.