Durable persistence means a picked target stays picked even after its pane dies — which is right, since dais-driven panes come and go. Release is the missing complement: how you say you are done with one and hand the digit back to the picker. state/daemon: - state/release-slot: refuses an unknown slot and the LAST remaining slot, and moves :active-slot to the next survivor when the active one goes. load-targets only honors the durable overlay while (get targets active-slot) resolves, so a dangling active slot would silently discard every persisted target on the next daemon start. - target action "release"; persists through transition!'s existing :targets watch, so a release sticks across restarts exactly like a pick does. dais-ctl: target release <slot>, plus slot completion in _dais-ctl. dais-top: x then 1-5, sticky footer prompt, ? entry. It takes a digit rather than acting on the picker's highlighted row because the usual reason to release a slot is that its pane is GONE — and a gone pane has no row in the picker, which only lists live tmux panes. Also fixes the startup banner: it printed (:targets cfg) — config, not the durable overlay the daemon actually runs with — so it misreported every picked or released slot on every restart. Now reads the state atom, sorted, with * marking the active slot. config: drop the retired system:claude.0 slot. ai/gotchas.md records two things this turned up: the :active-slot-must-resolve invariant, and tmux pane_index being positional — closing a pane renumbers those after it, so a stored "s:w.2" silently retargets while still reading alive and green.
3.7 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. 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. :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.