Repository navigation
BiVox v0.2.6 — focus resolution overhaul
BiVox v0.2.6 — focus resolution overhaul
Your nuc doctor output finally cracked the last layer: the whole pipeline
works (ASR committed "Раз, два, три, четыре, пять. Вышел зайчик погулять.",
rust worker healthy, editor present on the a11y bus) — but the injector's
auto-resolution returned focused app = '' on BOTH boxes.
Root cause (confirmed by experiment, not guesswork)
On GNOME 50 / GTK4 stacks, client apps frequently never expose
STATE_FOCUSED/STATE_ACTIVE on their frames or widgets — verified locally:
even a freshly-launched gnome-text-editor (WM-given focus) shows
frame[showing] only, grabFocus via AT-SPI errors out, and Shell's
Introspect.GetWindows is access-denied. Focus events do fire on real
transitions, but only while the keyboard focus actually moves — a session
started after the user already switched to the editor sees nothing, because
the event was consumed before the patcher spawned. State-polling is simply
blind on this stack.
What v0.2.6 changes
- Persistent focus watcher (
atspi_inject.py --watch): spawned by core
at boot (whenautostart_patcheris on), supervised & respawned on death.
It captures everyfocus/object:state-changed:focusedEVENT into
$XDG_RUNTIME_DIR/bivox/focus.json(atomic replace,last_editableis
never clobbered by non-edit focus moves). The injector now reads this
fresh record FIRST — so clicking into an editor at ANY time before
Right-Alt makes that editor the target. This is the architecture fix:
events are reliable, states are not. - Guaranteed pin target:
autostart_patcher = "gnome-text-editor"(or
any app name) resolves viafind_app()+find_editable()with NO focus
detection at all — verified working on both stacks. The ambiguity error
message now prints this as the copy-paste fix. --probemode:atspi_inject.py --probedumps the single-pass a11y
scan (frames/states/editable presence), shell's own focus node, and the
watcher file state — one command to diagnose any future resolution issue.- Single-pass scanner (
scan_apps()): depth 35 (gnome-text-editor's
SourceView nests ~27 deep — the old depth-9/600-budget probes literally
could not reach the text widget), one walk per app collecting frames +
editable-presence + focused-edit; ~1.7 s per full scan, reused by all
three resolution paths instead of O(n·m) re-walks. - Injector auto-loop bounded to ≤2 scans / ≤6 s (was: unbounded re-polling
that could hang a session's injection leg for its whole lifetime).
Workaround available TODAY (before upgrading)
Set in /usr/share/bivox/config.toml:
autostart_patcher = "gnome-text-editor"then systemctl --user restart bivox-core. Dictation will append into the
focused gnome-text-editor window regardless of focus detection. (Other apps:
put their a11y name — see bivox-ctl doctor / --probe output.)
Honest status
- Watcher + pin + probe all verified on dev; live keyboard-focus capture
could not be verified here because the dev screen is currently locked
(shell holds modal focus — no client events). The nuc box is the test
ground: after upgrade, click into the editor once, press Right-Alt — the
watcher file makes it stick. If it still misses,--probeoutput will
show exactly which link is cold. - Electron apps remain best-effort (their a11y trees are the problem, not
focus); GNOME Terminal still refuses by design.
Assets
| Asset | Size |
|---|---|
bivox_0.2.6_amd64.deb |
7.9 MB |
bivox-models-ru-en_0.2.6_all.deb |
499 MB |
Suites at tag: M3 13/13 · E2E 8/8 · M1 21/21 · M2 9/9.