Three improvements to the cockpit, all about typing into the right window. Target labels: `target list` now reports what is actually running in each tmux target — pane_current_command and pane_current_path — so the header reads `app:claude.0 claude ~/dais` instead of a bare pane spec. One list-panes -a call (daemon/pane-details) serves every slot and doubles as the liveness answer, which is cheaper than the per-slot pane-exists? calls it replaces (those stay as the tmux-down fallback). Rows are indexed under both the window-NAME and window-INDEX spec forms, because a stored target may use either. A :focus target can't be introspected (no kdotool here), so it stays bare. dais-top elides the cwd middle-first and then drops it, and the command after it, as the header runs out of columns — the ear/armed/live block is never the part pushed off screen. Keyboard lock: dais-top is a single-key control surface, so typing into it by mistake flips real state. `k` ignores every key (each swallowed one is acknowledged in the footer); Ctrl-] or F12 always leaves a lock, and while locked any other key just shows the way out. `K` cycles an idle auto-lock (off -> 15 -> 30 -> 60s, persisted next to the theme file) — off by default, and it never fires while an overlay is open. Passthrough: `p` forwards keys to the active target instead of dropping them, so the window you typed into by accident behaves like the pane you meant. Printable runs go as text, the rest as chords (Enter, Tab, S-Tab, arrows, C-<letter>, M-<char>). It refuses a :focus target and falls back to keylock, re-checking per chunk since voice can move the active slot mid-pass: ydotool types into whatever has focus, which during passthrough is dais-top itself — every key would re-enter its own stdin. New `send` op carries it: raw delivery to the active target, router bypassed, exactly one of text or keys, chords still executor-validated so an unknown one is refused rather than typed. Honors dry-run like any other delivery. Deliberately NOT recorded — an event line per keystroke would turn events/*.jsonl into a keylogger transcript. Also exposed as `dais-ctl send [--keys]`, with zsh completion. executor: the bridge needs unbracketed paste (a single keystroke must look like typing, not a paste per character), so tmux-type-plan takes a bracketed? flag; dictation stays bracketed as one deliberate paste, and text still travels on stdin either way. And a latent bug it turned up: send-keys "S-Tab" exits 0 but delivers a PLAIN Tab — shift-tab is its own tmux key name, BTab. That silently broke shift-tab, which is how Claude Code cycles permission modes. ai/ records the tmux traps (BTab, per-pane info needs list-panes -a, the bracketing, the focus feedback loop); tools/README.md documents the keys.
5.6 KiB
Gotchas
fact :: detail. Field-trial knowledge this project paid for — verify against
code/reality before deleting anything here.
pw-record exit code lies :: it exits 1 on SIGINT while still finalizing a valid WAV; success = file exists with body past the 44-byte RIFF header, NEVER the exit code (ear/dais_ear.py _stop_recorder).
parec buffers ~2s without --latency-msec :: chunks then arrive in bursts, VAD processes them in catch-up and speech_start/speech_end timestamps become near-simultaneous lies; keep --latency-msec=50.
bundled Silero is batch-only :: faster_whisper.vad SileroVADModel.call resets h/c per call; StreamingVad drives model.session directly carrying h/c + 64-sample context across chunks; output needs reshape(-1)[0] (shape is (1,), not (1,1)).
whisper hallucinates from near-silence :: "Hello." / "Thank you." with HIGH confidence (no_speech_prob ~0.03 observed) when the audio is a chime or noise burst — confidence gates alone are insufficient.
the daemon can hear itself :: the "Listening" notification chime triggered VAD and transcribed as "Hello!" in trials; startup_mute_ms in the ear AND the suppress-sound notify-send hint both exist for this — do not remove either.
wtype is dead on KWin :: no zwp_virtual_keyboard_manager_v1 (verified 2026-06-10); the focus backend is ydotool/uinput, no compositor protocol involved.
uinput access rides on Steam :: /dev/uinput ACL for the user comes from steam-devices' udev rule (uaccess tag); removing that package silently breaks ydotoold after reboot.
ydotool speaks US-QWERTY :: keycodes map to symbols via the active layout; fi layout garbles : ' " / @ — the user keeps US active for dais; fi support would need clipboard-paste delivery (wl-copy + Ctrl-Shift-V).
tmux display-message cannot validate targets :: it exits 0 and falls back to the current client for unknown targets — pane existence checks must use list-panes -t.
list-panes -t validates the pane but does not filter to it :: the exit code is the real answer (bad index -> "can't find pane: N", exit 1), while the OUTPUT is every pane in the containing window — so -t s:w.0 printing four rows is NOT evidence the check is only window-level. executor/pane-exists? reads the exit code only, which is correct; don't "fix" it after misreading the output.
tmux send-keys "S-Tab" delivers a PLAIN Tab :: shift-tab is its own key NAME (BTab), not a modified Tab, and send-keys exits 0 for the wrong one — so the bug is silent and looks like the app ignoring shift (Claude Code cycles permission modes with shift-tab). executor/chord->tmux special-cases #{"S"}+Tab -> BTab; ydotool needs no special case, its keycodes are literally shift+tab.
per-pane info needs one list-panes -a, not -t :: -t prints the whole containing window (above) and display-message can't validate, so there is no "ask about THIS pane" call — daemon/pane-details makes a single list-panes -a and indexes rows under both spec forms, because a stored target may name the window or index it.
paste-buffer -p brackets even one keystroke :: the keystroke bridge (send op) therefore drops -p — dictation stays bracketed (one deliberate paste), passthrough must look like typing or the target sees a paste per character. Same load-buffer stdin path either way; text still never rides on argv.
passthrough into a :focus target is a feedback loop :: ydotool types into whatever has focus, which during passthrough is dais-top itself — every key would re-enter its own stdin. dais-top refuses the mode and falls back to keylock, and re-checks per chunk because voice can move the active slot mid-pass.
single-line dictation is load-bearing :: Claude Code collapses MULTI-line pastes into "[Pasted text +N lines]"; the router joins transcripts to one line so the text stays visible in the input box.
kglobalaccel has no key-release events :: push-to-talk is impossible via KDE shortcuts; every hotkey is a stateless toggle and the daemon owns the state.
"a" is a filler word :: in the keypress grammar, control/ctrl+letter pairing must run BEFORE filler removal or "press control a" loses its "a".
KDE/systemd exec env has no user PATH :: node comes from fnm (interactive zsh only) and pixi lives in ~/bin — KDE-bound tools are sh+socat with absolute paths; dais-ctl (node) is NOT safely KDE-bindable; config uses /home/k/bin/pixi absolutely.
testing against the live daemon types into the user's focused window :: default target slot is :focus and the systemd daemon runs LIVE; use a private dry-run daemon (see AGENTS.md) or point a slot at a scratch tmux pane first.
whisper model cache is shared :: ~/.cache/huggingface (shared with ../lausu); warm load ~1s, cold load downloads the model.
picked targets shadow config wholesale :: once any target is picked, ~/.local/state/dais/targets.edn overlays BOTH :targets and :active-slot at startup — editing :targets in config/dais.edn has no effect until that file is deleted. Corollary for code: anything REPORTING targets must read the state atom, never (:targets cfg) — the startup banner did the latter and misreported every picked/released slot on restart until v1.2.0.
:active-slot must always resolve :: load-targets only honors the overlay while (get targets active-slot) is truthy, so any transition that REMOVES a slot (state/release-slot) must move :active-slot in the same step — a dangling one silently discards every persisted target on the next start.
tmux pane_index is positional :: closing a pane renumbers the ones after it, so a stored "s:w.2" target silently starts pointing at a DIFFERENT pane (still alive, still green). A renamed window fails loudly instead (✗); the index shift does not.