Back to corpus
proposalexperiment writeup candidatescore 18

Cross-App Text Injection Test Plan — SF-1.4

> Documents injection behavior across target applications. > Two methods tested: **AX API direct** (AXUIElementSetAttributeValue) and **CGEvent paste** (⌘V via clipboard).

Full HTML reader

Read the full artifact

Open in new tab

Extracted abstract or opening context

> Documents injection behavior across target applications. > Two methods tested: **AX API direct** (AXUIElementSetAttributeValue) and **CGEvent paste** (⌘V via clipboard). SpeakFlow must inject transcribed text into whatever app the user is focused on. macOS apps fall into distinct rendering categories — each behaves differently with accessibility APIs. | Method | Mechanism | Latency | Reliability | Limitations | |--------|-----------|---------|-------------|-------------| | **AX API Direct** | `AXUIElementSetAttributeValue(el, kAXValueAttribute, text)` | ~1ms | High for native text fields | Fails on non-AX apps, some Electron | | **CGEvent Paste** | Write to `NSPasteboard` → synthesize ⌘V via `CGEvent` | ~50ms | Universal fallback | Clobbers clipboard, timing-sensitive | **App Type:** Electron (Chromium + Node.js) **Text Rendering:** Chromium's Blink engine, CodeMirror/Monaco editor ### AX API Direct - **Status:** ⚠️ Partial - **Behavior:** Electron exposes AX tree, but CodeMirror/Monaco editors use a hidden `<textarea>` for input that does NOT expose `kAXValueAttribute` as settable. The visible editor is a custom canvas/DOM render. - **Focused element:** AX returns `AXWebArea` or `AXTextArea` — but `AXUIElementSetAttributeValue` with `kAXValueAttribute` is silently ignored on the editor area. - **Quirk:** Standard Electron text inputs (settings, search bars) DO support AX value setting.

Promotion decision

What has to happen next

Attach run IDs, datasets, metrics, and reproduction commands.

Why this is not always a full paper yet

Corpus pages are public-safe readers for discovered workspace artifacts. They are not automatically final papers. A corpus item becomes a polished paper only after the editable source, evidence checkpoints, references, figures, render path, and release status are attached through the paper schema.