Conversation
* rebase: on [LIST] commit of the following: [ok-commit] f593a8c Author: Szowesgad <void@div0.space> Date: Tue Jan 27 17:11:17 2026 +0100 Improve E2E env handling and validation scripts Updated .env.example to clarify its role as the E2E ground truth. Added .env.e2e to .gitignore. Enhanced Makefile to auto-generate and use a clean E2E env for E2E and roundtrip tests. Refactored scripts/validate-envs.sh to support new CLI options for env example validation and E2E env emission, improving automation and reliability of environment setup for tests.[ok-commit] commit 1120944 Author: Szowesgad <void@div0.space> Date: Tue Jan 27 17:09:35 2026 +0100 Add initial prompt support for Whisper STT engine Introduces the WHISPER_INITIAL_PROMPT environment variable to guide Whisper transcription with domain vocabulary and formatting hints. Updates decoding parameters, engine logic, and documentation to support and describe this feature. Also adds a new hotkeys contract documentation and minor improvements to .gitignore and UI status messages. commit a77f58c Author: Szowesgad <void@div0.space> Date: Tue Jan 27 16:43:48 2026 +0100 Update VAD defaults and environment registry Changed VAD threshold and silence defaults to be less conservative across documentation, scripts, and examples. Refactored environment variable registry: removed deprecated entries, added new variables for models, embedding, LLM, TTS, quality, and system configuration. Updated code to use CODESCRIBE_VAD_ENABLED for auto_silence logic and removed CODESCRIBE_LOG_STDOUT support. Improved env var validation script to handle more patterns and ignore build system vars.[ok-commit] commit 90b4174 Author: Szowesgad <void@div0.space> Date: Tue Jan 27 15:41:48 2026 +0100 fix(moshi): Cache unavailability to prevent log spam - Add moshi_unavailable flag to RecordingController - Early validate MoshiConfig before trying to create engine - Cache failure state so subsequent hotkey presses don't spam logs - Silent return (Ok) when Moshi unavailable - not an error, just missing models Before: "Moshi model not found" on EVERY Ctrl+Option press After: Single warning, then silent skip Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> commit 23a780a Author: Szowesgad <void@div0.space> Date: Tue Jan 27 14:19:42 2026 +0100 chore: Clean up legacy VAD env var references - Replace CODESCRIBE_VAD_MAX_SILENCE_SEC → CODESCRIBE_VAD_SILENCE_SEC - Replace AUTO_SILENCE → CODESCRIBE_VAD_ENABLED - Fix duplicate CODESCRIBE_VAD_ENABLED in .env.debug.example - Change eprintln spam to tracing::debug in embedded.rs Files updated: - examples/README.md - scripts/download-silero.sh - docs/OVERLAY_STREAMING.md - docs/ADR/2026-01-26-env.md - docs/ADR/2026-01-26-OVERLAY_STREAMING.md - .env.debug.example - core/stt/whisper/embedded.rs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> commit f248e50 Author: Szowesgad <void@div0.space> Date: Tue Jan 27 14:10:29 2026 +0100 docs(env): Add complete LLM_USE_STREAMING and TRANSCRIPT_SEND_MODE docs Added detailed documentation with defaults and options: - LLM_USE_STREAMING: default 1, options 1/true (SSE) vs 0/false (buffered) - TRANSCRIPT_SEND_MODE: streaming vs buffered modes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> commit 95c713d Author: Szowesgad <void@div0.space> Date: Tue Jan 27 13:55:34 2026 +0100 fix(vad): Clean VAD config, fix embedding detection, HOLD mode user control BREAKING CHANGES: - Renamed env vars (old ones deprecated): - AUTO_SILENCE → CODESCRIBE_VAD_ENABLED - CODESCRIBE_VAD_MAX_SILENCE_SEC → CODESCRIBE_VAD_SILENCE_SEC - CODESCRIBE_VAD_SENSITIVITY → removed (use THRESHOLD directly) Core fixes: - Fix cfg!(embed_*) not detecting embedded models in workspace builds Now checks weights.len() > 0 instead of compile-time cfg!() macro - VAD defaults less aggressive: threshold 0.35 (was 0.5), silence 2.5s (was 1.2s) - Whisper params stricter: compression 2.0, no_speech 0.5, logprob -0.5 VAD behavior change: - HOLD mode: NO VAD auto-stop (user controls by releasing key) - TOGGLE mode: VAD active (auto-stop after silence) - If user wants to hold in silence for 45 minutes - that's their choice New files: - docs/ENV_REGISTRY.toml: Central registry of all env vars - scripts/validate-envs.sh: Pre-commit validator for env vars Updated docs: - docs/env.md: New VAD var names and defaults - .env.example, .env.debug.example: Clean config templates Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> commit e65aedb Author: Szowesgad <void@div0.space> Date: Tue Jan 27 12:12:45 2026 +0100 Add comprehensive ADR and user documentation Introduced multiple ADR markdown files covering licensing, installation, team setup, architecture, backlog, feasibility analysis, and Whisper Live streaming. Also added a user guide and related documentation to the docs/ADR directory. Removed obsolete local backend section from .env.debug.example and renamed runner.sh script to tools/runner.sh. commit 76c7574 Author: Szowesgad <void@div0.space> Date: Tue Jan 27 09:37:45 2026 +0100 Improve overlay window input and live transcription handling Introduces a custom NSWindow subclass for overlays to allow borderless windows to receive input. Updates live transcription to not auto-stop on silence and adds a stop_without_saving method to audio recorders, preventing unnecessary WAV file creation. Also improves thread safety in overlay state handling and adds an environment variable to control logging to stdout.[ok-commit] commit b53638c Author: Szowesgad <void@div0.space> Date: Tue Jan 27 07:37:26 2026 +0100 Improve logging and overlay handling, add tracing Adds the tracing-appender dependency and initializes structured logging to both file and stdout in the CLI. Replaces eprintln! with tracing macros for better log management. Fixes overlay blur view initialization in bootstrap and voice chat overlays. Updates assistive loop logic and delta callback routing in RecordingController for more robust session handling.[ok-commit] commit 58037e6 Author: Szowesgad <void@div0.space> Date: Tue Jan 27 05:33:42 2026 +0100 Improve overlay logging and update model embedding logic Added more informative logging to overlay and voice chat show/hide functions for better traceability. Updated hotkey event handling in codescribe daemon to apply settings immediately, reducing race conditions. Revised build.rs to embed Whisper model by default in release builds, with opt-out via CODESCRIBE_NO_EMBED, and clarified logic and warnings for model embedding. commit 66bdad1 Author: Szowesgad <void@div0.space> Date: Tue Jan 27 04:10:28 2026 +0100 Add round-trip pipeline demo and tests Introduces interactive and test-based round-trip (TTS→STT→Embeddings) validation for pipeline integrity. Adds Makefile targets, scripts for Silero VAD model download, HuggingFace cache support for models, and updates documentation for quick start and settings. Improves hotkey handling for conversation mode and refines TTS/STT/embedding integration. commit 68769f2 Author: Szowesgad <void@div0.space> Date: Tue Jan 27 04:12:33 2026 +0100 Add onboarding bootstrap overlay for macOS Introduces a bootstrap onboarding overlay for first-time users on macOS, including UI, handlers, and integration with the tray menu. The overlay guides users through initial setup steps and is triggered on first launch or via the tray menu. Packaging scripts and Makefile updated for improved model bundling and release process, with enhanced environment variable support for signing and notarization.[ok-commit] commit e44ec44 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 23:11:45 2026 +0100 Implement assistive voice chat streaming and UI updates Adds support for streaming user transcription into chat bubbles during assistive sessions, including new helpers for appending and finalizing user message text. Refactors overlay routing, session state, and chat bubble styling for improved clarity and Quantum theme consistency. Introduces an assistive VAD loop for hands-off recording and updates UI color palette and font handling for chat bubbles.[ok-commit] commit 17c7a19 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 19:40:40 2026 +0100 Add VAD sensitivity and ONNX support, improve cache handling Introduces CODESCRIBE_VAD_SENSITIVITY and CODESCRIBE_VAD_SILENCE_SEC as preferred VAD controls, mapping sensitivity to threshold and allowing simple silence override. Adds support for ONNX embedder models, improves HuggingFace cache path resolution, and refines environment variable handling for model embedding and cache directories.[ok-commit] commit 9c053a9 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 18:56:46 2026 +0100 Refactor model embedding and HuggingFace cache detection Model embedding is now opt-in for release builds, requiring explicit environment variables to embed models, E5, or TTS. The HuggingFace cache search now checks all possible cache locations instead of just one, improving robustness in both build.rs and hf_cache.rs. Error handling and warnings for missing models have been streamlined to avoid hard failures and provide clearer instructions.[ok-commit] commit effdffe Author: Szowesgad <void@div0.space> Date: Mon Jan 26 17:39:07 2026 +0100 Support both weights.safetensors and model.safetensors Updated model loading logic to accept either weights.safetensors or model.safetensors files for Whisper models. Refactored cache lookup and model path resolution to handle both file names, improving compatibility with different model distributions.[ok-commit] commit def6c72 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 17:23:52 2026 +0100 Add case-insensitive fallback for HF cache lookup Update `find_hf_snapshot` and `find_snapshot` to handle case-insensitive repository matches when locating Hugging Face cache directories. Also, adjust `download-csm.sh` to use multiple --include flags for clarity and compatibility.[ok-commit] commit c9ba7bf Author: Szowesgad <void@div0.space> Date: Mon Jan 26 17:12:17 2026 +0100 Trim whitespace from CODESCRIBE_EMBED_MODEL env var Updated the build script to trim whitespace from the CODESCRIBE_EMBED_MODEL environment variable before checking if it is empty. This ensures that values with only whitespace are treated as empty.[ok-commit] commit 2658fc0 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 16:47:36 2026 +0100 Switch model loading to HuggingFace cache Refactored model loading logic to use HuggingFace cache via the `hf download` CLI, replacing hardcoded local paths and improving flexibility. Added `core/hf_cache.rs` for cache utilities, updated build scripts and runtime model resolution to support repo overrides, and revised download scripts to use the HuggingFace cache directly. Updated documentation and warnings to reference `hf download` commands.[ok-commit] commit 43e6d78 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 16:04:12 2026 +0100 Switch moshi dependency to crates.io version Updated core/Cargo.toml to use moshi 0.6.4 from crates.io instead of the GitHub repository. Updated Cargo.lock to reflect this change and adjusted related dependencies. [ok-commit] commit 0c7c10c Author: Szowesgad <void@div0.space> Date: Mon Jan 26 15:08:44 2026 +0100 Add word-level emission and backspace support to streaming Implements word-level emission in buffered streaming mode with a configurable max words per tick (CODESCRIBE_EMIT_WORDS_MAX). Adds support for backspace (\u{0008}) deltas in both overlay and chat UI, and ensures deltas are applied with proper redaction. Updates environment examples and documentation to reflect new settings.[ok-commit] commit d10a9a8 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 11:27:41 2026 +0100 Switch embedder from fastembed to offline E5 model Replaces the fastembed dependency with a local/embedded E5 model using Candle and tokenizers for offline text embeddings. Adds support for embedding the E5 model directly into the binary in release builds, with new build.rs logic and a generated embedded.rs module. Updates Makefile and scripts to support E5 model download, and adjusts documentation and config to reflect the new embedding approach. Removes fastembed and related dependencies from Cargo files and codebase.[ok-commit] commit 7d5b9f8 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 08:27:59 2026 +0100 Add streaming tag parser for demuxed LLM output Introduces a new demux module with a StreamingTagParser for parsing flat, non-nested tags such as <speak> and <tool> in streamed LLM output. Updates core/lib.rs to include the new module and switches the moshi dependency in Cargo.toml to use the Kyutai Labs GitHub repository. [ok-commit] # Conflicts: # core/Cargo.toml commit 2ee2b10 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 09:23:54 2026 +0100 Switch moshi to git dependency and update configs Replaced the local path dependency for moshi with a git-based dependency for better portability. Updated .gitignore patterns for logs and codescribe memory files. Improved comments and logic in config loader to set history and debug logging as default-on but still overridable by environment variables. Translated comments in helpers.rs from Polish to English. commit b9e7e98 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 08:06:50 2026 +0100 Set formatting-specific LLM env vars in e2e test Added LLM_FORMATTING_ENDPOINT, LLM_FORMATTING_MODEL, and LLM_FORMATTING_API_KEY environment variables in the e2e_retry_responses test to ensure both generic and formatting-specific configurations are covered. commit c546d5d Author: Szowesgad <void@div0.space> Date: Mon Jan 26 07:55:10 2026 +0100 Refactor formatting and improve code consistency This commit applies consistent formatting across multiple modules, including improved indentation, line breaks, and grouping of imports and re-exports. It also updates the 'ort' dependency feature in core/Cargo.toml and makes minor logic and style improvements in tests and core modules for better readability and maintainability. commit cecfbcd Author: Szowesgad <void@div0.space> Date: Mon Jan 26 06:32:56 2026 +0100 Fix clippy warnings for strict -D warnings compliance - Collapse nested if-let statements (clippy::collapsible_if) - Remove useless .into() on anyhow::Error (clippy::useless_conversion) - Use let-chains for cleaner conditional matching Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> commit 051c99e Author: Szowesgad <void@div0.space> Date: Mon Jan 26 05:50:28 2026 +0100 Add session generation counter to RecordingController Introduces a conversation_generation AtomicU64 to RecordingController to track session generations and prevent cross-session race conditions. The audio loop and playback UI updates now check the session generation to ensure only the current session can update the UI, improving reliability when multiple sessions are started in quick succession. commit 96c5a86 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 05:35:24 2026 +0100 Refine conversation mode UI state and audio handling Standardizes conversation state status messages, adds explicit UI state updates, and improves audio playback to be non-blocking for full-duplex operation. Also ensures proper cleanup and state reset on errors and when stopping conversation mode, and updates drawer entry mode detection for conversation logs. commit cc54f39 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 05:26:26 2026 +0100 Add Moshi full-duplex conversation mode Implements a new full-duplex conversation mode using the Moshi engine, allowing simultaneous microphone input and AI response playback. Adds state management, hotkey handling, and UI updates for conversation mode, including a resampler for arbitrary input rates. Updates core conversation context to track total speaking duration and exposes new state enums and helpers throughout the app. commit db848a9 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 04:54:51 2026 +0100 Integrate Moshi LM and Mimi codec into conversation engine This update loads Moshi LM and Mimi codec models in ConversationEngine, implements audio encode/decode, and runs full inference for user audio input. Configuration paths and parameters are updated for new model formats. Adds E2E tests for initialization, audio processing, and state reset to validate the full conversational pipeline. commit 74f77d8 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 02:36:56 2026 +0100 Unify model and data paths to ~/.codescribe directory Standardized all references from .CodeScribe or project-relative paths to ~/.codescribe for models and lexicon files across code, scripts, and documentation. This change ensures consistent model/data location for easier setup and usage. commit 55e89b2 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 01:58:41 2026 +0100 Standardize model paths to ~/.codescribe/models Updated scripts and Rust code to store all model files under ~/.codescribe/models for consistency. Added download-silero.sh to automate Silero VAD model retrieval. Adjusted default_model_path in silero_ort.rs and updated related scripts to use the new location. commit ac69553 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 01:44:03 2026 +0100 Remove deprecated SILENCE_* config and update VAD tests Eliminates legacy SILENCE_DB and SILENCE_HANG_SEC configuration from code, environment, and documentation. Updates VAD-related tests to use the new speech probability threshold and hang_sec parameters, and adds a comprehensive end-to-end VAD flow test suite. # Conflicts: # tests/e2e_vad_auto_stop.rs # tests/e2e_vad_flow.rs commit 991ace5 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 01:31:52 2026 +0100 Migrate silence detection to Silero VAD config vars Replaces deprecated SILENCE_DB and SILENCE_HANG_SEC with CODESCRIBE_VAD_THRESHOLD and CODESCRIBE_VAD_MAX_SILENCE_SEC throughout the codebase and documentation. Updates default values, environment variable handling, and comments to reflect the new Silero VAD-based configuration. Improves VAD initialization logic for thread safety and reliability. Updates documentation to clarify the deprecation and new configuration approach. � Conflicts: � .env.debug.example � core/config/default_env.txt � core/config/loader.rs commit 5b50465 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 01:22:41 2026 +0100 Refactor VAD config and initialization for Silero Updated VAD environment variables and documentation to use Silero-specific parameters, replacing legacy options. Added clamping for VAD config values to ensure valid ranges. Improved VAD worker initialization to confirm model loading with a timeout and propagate errors. Updated code to initialize VAD with the provided config instead of defaults. commit a797865 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 01:10:33 2026 +0100 Centralize VAD config and update usage across modules Moved VAD configuration to a centralized VadConfig in core/vad/config.rs. Updated streaming_recorder.rs to use the new VadConfig, removed the local VADConfig struct, and adjusted related logic and tests. Updated default_env.txt to reflect new VAD environment variable names and structure. Improved error handling for VAD initialization in recorder.rs. Removed unused import in silero_ort.rs. commit 9a3a811 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 01:05:01 2026 +0100 Refactor Silero VAD to use non-blocking worker and update deps Refactors the Silero VAD implementation to use a non-blocking, fire-and-forget worker thread with atomic probability updates, improving audio callback safety and performance. Updates ndarray-npy to 0.10 with default features disabled to remove unnecessary zip dependency, and removes zip and zopfli from dependencies. Adds max_utterance_sec to VadConfig. Cleans up unused silence_db config propagation in controller and improves resampling logic. commit 029033b Author: Szowesgad <void@div0.space> Date: Mon Jan 26 00:49:27 2026 +0100 Add Moshi conversation and E5 embedder modules Introduces a new conversation module with Moshi full-duplex voice AI, including configuration, context, engine, and turn-taking management. Adds an embedder module using fastembed for E5 text embeddings, with singleton/global access. Replaces WebRTC VAD with Silero VAD (ORT backend), updates dependencies (adds moshi, ort, fastembed, removes webrtc-vad), and refactors audio recorder to use VAD-based speech detection. Removes deprecated RMS-based silence detection and updates related code and tests. commit fecce50 Author: Szowesgad <void@div0.space> Date: Mon Jan 26 00:19:52 2026 +0100 Add TTS and VAD modules with embedded model support Introduces a new text-to-speech (TTS) module using the CSM-1B model with support for embedded model data, audio playback, and WAV export. Adds a neural voice activity detection (VAD) module using WebRTC VAD, replacing the previous RMS-based detection. Updates the streaming recorder to use the new VAD, and exposes public APIs for TTS and VAD. Updates build.rs to support embedding TTS models, and documents the new voice stack. Adds new dependencies: webrtc-vad. # Conflicts: # core/Cargo.toml # core/audio/streaming_recorder.rs # core/lib.rs # core/tts/audio_output.rs # core/tts/engine.rs # core/tts/mod.rs # core/tts/singleton.rs # core/vad/config.rs # core/vad/mod.rs # scripts/download-csm.sh commit 9bec9bc Author: Szowesgad <void@div0.space> Date: Sun Jan 25 22:32:28 2026 +0100 Remove legacy backend config and update cloud STT handling Eliminates legacy backend discovery, deprecated config fields, and AI provider selection. Cloud STT and LLM endpoints are now explicit and canonical in .env, with migration logic for legacy keys. Quality daemon state now tracks availability, and tray/menu UI reflects this. Removes unused Node client and related scripts. Refactors AI formatting to use a unified interface and removes legacy formatting code from CLI.[ok-commit] commit e8ba3ca Author: Szowesgad <void@div0.space> Date: Tue Jan 20 15:51:43 2026 +0100 Restructure project layout and update module paths Moved source files from 'src' and 'codescribe-core' to a new modular structure under 'app' and 'core' directories. Updated Cargo.toml and module imports to reflect the new paths, introduced namespacing for core modules, and added new mod.rs files for better organization. This refactor improves codebase maintainability and clarity.[ok-commit] Refactor voice chat overlay to support chat log and sending Reworked the voice chat overlay to maintain a chat log with user, assistant, and error messages. Added input field, send button, and support for streaming assistant responses. Introduced send callback mechanism and improved UI state management for sending, draft text, and error handling. Updated related controller logic to use new chat overlay API. Add persistent hands-off chat overlay with auto-send toggle Introduces a full-featured chat overlay for hands-off mode, including persistent chat history, user/assistant roles, and an input field with an auto-send toggle. The overlay UI is improved with reversed message flow (newest first), selectable text, and a new tray menu action to show the overlay. Voice Activity Detection (VAD) timeout is set to 5 seconds for hands-off mode, and short silences are ignored. The commit also adds a 'Copy Last to Clipboard' tray action, updates documentation, and includes tests for overlay persistence and auto-send logic. Refactor voice chat UI for split view and separate drafts Introduces a split view layout with distinct left (manual input) and right (voice streaming) panels. Separates manual and voice draft buffers, updates state management, and adjusts UI logic and tests to support the new structure. Also adds placeholder for attachment handling and updates default overlay dimensions for improved chat history visibility. Add voice draft management and UI enhancements Introduces voice draft saving, listing, reading, and deletion in history.rs, with corresponding API exports. Updates the voice chat overlay UI to include a right-side panel for drafts and settings, a collapse button, tab bar, and file attachment support. Also adds context menu for copying the last assistant response and refines layout logic. Removes obsolete files layout_patch.rs and test.txt. Add transcription overlay for non-assistive modes Introduces a new macOS transcription overlay (transcription_overlay.rs) for non-assistive recording modes, featuring a minimal floating window with live transcription, status display, and auto-hide. Refactors controller logic to route transcription deltas and overlay display based on session mode, and updates public API in lib.rs. Also updates dependencies, version to 0.7.3, and README formatting. Refactor UI code to use new ui_helpers module Introduced a new ui_helpers.rs module to encapsulate common Objective-C UI patterns and reduce msg_send! boilerplate. Updated transcription_overlay.rs, ui.rs, and voice_chat_ui.rs to use these helpers for window, view, color, and control management, improving code readability and maintainability. Add chat bubbles and drafts panel to voice chat UI Replaces the single text view with a bubble-based chat rendering using NSStackView, including support for streaming updates and per-message copy buttons. Adds a drafts panel in the right sidecar with a scrollable list of draft files, Edit/Copy actions, and animated drawer collapse/expand. Refactors UI state and helper functions to support these features. Always show transcription overlay and add transfer button Transcription overlay is now always shown for live preview, regardless of session mode, and the chat overlay is only opened intentionally by the user. Added a "Do chatu" button to the transcription overlay to allow transferring the current transcription to the voice chat overlay. Improved overlay state management and window delegate handling in voice chat UI to ensure proper cleanup and prevent use-after-free. Extract controller helpers into new module Splits various utility functions such as session state management, transcription delta routing, and voice chat callbacks into a new `helpers.rs` module. Cleans up `controller.rs` by delegating logic to `helpers` and `types`. Adds new unit tests in `tests.rs` to validate controller behavior. Enable always-on history and audio logging, simplify history handling - Default `history_enabled` and `dump_audio_logs` to `true` to ensure data preservation. - Removed toggles for history saving, audio dumping, and related tray menu options. - Simplified history submenu by unifying options into "Open history folder." - Refactored transcription configuration and helpers to enforce mandatory raw transcript saving. - Removed redundant handlers and menu construction logic for history and audio toggle options. - Addressed formatting consistency in `transcription_overlay.rs` for better readability and maintainability. Remove unused imports, redundant attributes, and improve safety in Objective-C calls - Cleaned up unnecessary `#[allow(unused_imports)]` and `#![allow(dead_code)]` attributes across multiple modules for better code hygiene. - Refactored Objective-C bindings to explicitly mark unsafe functions with comments, clarifying requirements and ensuring proper usage. - Renamed constants to SCREAMING_SNAKE_CASE for consistency with Rust coding standards. - Updated transcription logic to include configurable silence detection thresholds (`silence_db` and `silence_hang_sec`) through environment variables. - Enhanced Voice Activity Detection (VAD) session handling by resetting flags and adding custom callbacks in recorder configuration. - Improved Objective-C interop safety by wrapping `msg_send!` calls in `unsafe` blocks where applicable. - Simplified UI helpers and internals with clear separation of Objective-C safety boundaries in `ui_helpers.rs`. - Removed legacy and unused functions, including obsolete chat log rendering helpers. feat: “Streaming improvements with env vars” [ok-commit] [ok-commit] feat(cli): add streaming transcribe + live mode [ok-commit] chore: add codescribe repo runner [ok-commit] chore: support codex runner [ok-commit] chore: use repo mcp config chore: bump codescribe to version 0.7.5 - Updated `Cargo.toml` and `Cargo.lock` to reflect version change from `0.7.4-dev` to `0.7.5`. - Prepares for release with stable versioning for both `codescribe` and `codescribe-core`. - No functional changes introduced, focusing solely on version progression.[ok-commit] chore: remove unused dependencies from project - Cleaned up `Cargo.toml` and `Cargo.lock` by removing unused dependencies like `cpal`, `symphonia`, `candle-core`, `tokenizers`, `indicatif`, and others. [ok-commit] - Reduced dependency footprint for better maintenance and smaller build artifacts. - Ensured no functional changes to the project while simplifying dependency configuration. chore: cleanup and refactor project structure - Updated `.gitignore` to exclude CodeScribe runtime state files (`.codescribe/state/`). - Replaced the default model in `runner.sh` with `claude-opus-4-5-20251101` for consistency with current AI configurations. - Improved markdown formatting in `BACKLOG.md` and related documentation for better readability and alignment. - Expanded chip compatibility requirements in the guide to include Apple Silicon M5 (`README.md`). [ok-commit] - Removed deprecated Python backend management code (`backend.rs`) to streamline the codebase and reduce technical debt. Increase silence hang threshold and improve transcript post-processing Raised the default silence hang duration from 0.8s to 1.5s in environment, config, and audio recorder. Refactored transcript handling to always apply post-processing (lexicon, cleanup, semantic gate) before output, ensuring all output paths receive clean text. Updated embedder model references from BGEM3 to ParaphraseMLMiniLM. Removed unused files: examples/inspect_keys.rs, src/launchd.rs, and src/libraxis.rs. Added a background quality daemon process to main.rs for continuous self-improvement. [ok-commit] Adjust transcription overlay height with tailing Add in-app draft editing to voice overlay Refactor decision mode logic and add tests Replaces decision mode branching with unconditional state reset after recording finishes, ensuring paste works in all modes. Adds hot-reload support for custom lexicon rules, refactors daemon argument construction for testability, and improves UI event handling with additional safety. Includes comprehensive regression and contract tests for controller and lexicon logic. [ok-commit] Add commit recording button to transcription overlay (macOS) Introduces a 'Zakończ' (commit) button to the transcription overlay UI on macOS, allowing users to stop the current recording and enter decision mode immediately. Adds controller registration and commit request logic, and updates overlay state management to handle the new button's visibility and actions.[ok-commit] Enable test mode for audio-free controller tests Controller logic now skips backend health checks and audio device access when running in test mode, allowing tests to run without audio hardware. Removed #[ignore] attributes from controller tests, and added test-mode guards to voice draft finalization to prevent deadlocks. Added comprehensive tests to quality_loop.rs and introduced a detailed architecture vision document for the quality loop. [ok-commit] Bump version to 0.7.6 Update codescribe and codescribe-core package versions from 0.7.5 to 0.7.6 in Cargo.toml and Cargo.lock for a new release. [ok-commit] Remove completed stream chunk output inventory and task docs Deleted documentation files related to streaming chunk output inventory and implementation tasks for CodeScribe CLI transcription. These files contained requirements, context, and recommendations for improving streaming output in the CLI already implemented. [ok-commit] Refactor transcription to use single-pass engine API Replaces streaming chunked transcription with a single-pass engine call in quality report and IPC server, simplifying the flow and ensuring consistent chunking logic. Adds detailed logging and diagnostics to streaming_recorder, improves overlap deduplication with fuzzy matching in whisper engine, and updates .gitignore for new memory files. Also adds resume logic to quality report to skip already-processed pairs.[ok-commit] Refactor endpoint routing and streaming logic for LLM APIs Replaces domain-based endpoint detection with path-based routing using a new EndpointFormat enum. Streaming is now controlled by the LLM_USE_STREAMING environment variable, defaulting to enabled. Refactors Ollama and Responses API handling for clarity and reliability, and simplifies the API key check logic. Removes unused semgrep_pro_20260119.log file. [ok-commit] Add buffered streaming transcription with VAD Introduces a buffered transcription worker using VAD-based utterance segmentation and a typing-speed emitter for smoother streaming output. Adds VAD configuration, segmenter, and supporting tests. Updates StreamPostProcessor with process_utterance for VAD segments, and refactors chunk processing logic to support both buffered and unbuffered streaming modes. [ok-commit] Refactor voice chat UI and drawer, remove draft API Reworks the voice chat overlay UI to use a tabbed interface with Agent and Drawer tabs, removes the voice draft API and related code, and introduces a new card-based drawer for managing transcriptions. Updates the UI helpers with segmented control and card view helpers, and refactors state management and event handlers to support the new design. The commit also cleans up unused code and streamlines the overlay's public API.[ok-commit] Add clipboard copy and search field helpers to UI Introduces a `copy_to_clipboard` function for copying text to the system clipboard and a `create_search_field` helper for creating NSSearchField UI elements. Also updates E2E tests to set LLM_USE_STREAMING=0 for compatibility with mock server responses.[ok-commit] Add exhaustive env example, docs, and env tests Introduces .env.debug.example with all supported environment variables and safe defaults, a comprehensive Polish documentation (docs/env.md) detailing env usage, precedence, and requirements, and new Rust tests for validating required env vars and precedence logic in codescribe-core.[ok-commit] Clamp overlay window position to visible frame Introduces clamp_overlay_position to ensure overlay windows stay within the visible screen area, updating both transcription and voice chat overlays to use it. Also adds tests for the clamping logic and ensures overlays are brought to the front when shown. Documentation is updated to clarify which environment variables require restart or support hot reloading.[ok-commit] Refactor voice chat UI API and handlers Replaces send_agent_message_impl with send_draft_message_impl for improved draft handling. Adds new API functions: clear_voice_chat_text, filter_drawer, is_auto_send_enabled, and send_voice_chat_draft. Updates handler and API usage to use new function names and logic, and removes update_drawer_filter. Improves clarity and separation of concerns in voice chat overlay message sending and drawer filtering. [ok-commit] Add commit/discard for chat drafts and improve test config Introduces commit/discard action bar for draft user messages in the voice chat overlay, including new handler methods and UI updates. Refactors Makefile to load environment variables for tests and adds support for local LLM endpoints via TEST_USE_LOCAL_LLM. Updates .env.example and docs/env.md for simplified and clarified configuration. Reduces transcription overlay auto-hide delay to 5 seconds and prevents auto-hide when hovered. Updates tests and environment validation to support new behaviors. Bumps version to 0.7.7. [ok-commit] Add stream overlap ratio config and update defaults Introduces the CODESCRIBE_STREAM_OVERLAP_RATIO environment variable for finer control of audio chunk overlap in streaming mode. Updates default environment files and documentation to reflect new and revised configuration options, sets buffered streaming as default, and changes the default Ollama model. Also adds logic to enter decision mode after non-assistive recordings and improves .gitignore. [ok-commit] * Add CODESCRIBE_LOOP_USE_CLOUD_STT env override and docs Introduces the CODESCRIBE_LOOP_USE_CLOUD_STT environment variable to force cloud STT usage in the quality loop without changing app-wide defaults. Updates documentation and environment registry to reflect the new variable, and adds an end-to-end test to validate .env.example against the registry. Also corrects the default for CODESCRIBE_BUFFERED_STREAM in docs. [ok-commit] * Remove legacy VAD auto-stop and related config/flags Eliminates the CODESCRIBE_VAD_ENABLED flag and all code paths, callbacks, and documentation related to VAD-based auto-stop. VAD now only segments utterances (flushes) instead of stopping recordings, and all references to 'auto-stop' are updated to 'utterance boundary' or 'utterance flush'. Removes the e2e_vad_auto_stop.rs test, updates Makefile, config, and documentation to reflect the new segmentation-only behavior.[ok-commit] * Add Silero VAD embedding and refactor streaming VAD logic This commit introduces embedded Silero VAD model support for release builds, refactors the streaming and buffered transcription pipeline to use a unified VAD gating mechanism, and separates lexicon postprocessing for buffered mode. It updates build.rs to embed the VAD model, adds core/vad/embedded.rs, and modifies the VAD loader to prefer embedded bytes. Tests and configuration are updated accordingly.[ok-commit] * Refactor VAD gate with supervisor mode and config options Introduces a new VAD gate architecture with Supervisor mode, supporting pre-roll and speech padding for improved speech boundary detection. Adds `CODESCRIBE_VAD_GATE_MODE` and `CODESCRIBE_VAD_ITER` environment variables for gate [ok-commit]mode selection, updates documentation and environment examples, and refactors the streaming recorder to use the new gate configuration. Legacy VAD tuning variables are now ignored by the live gate, and documentation reflects these changes. * Improve Silero VAD v5 integration and add tests Refactors Silero VAD wrapper to support v5 model API, including unified state tensor, context window, and updated input/output handling. Adds detailed tests for VAD index synchronization and real audio segmentation in streaming_recorder.rs. Enhances logging and clarifies [ok-commit] Supervisor gate mode behavior. * Improve VAD segmentation test for real audio Enhanced the VAD supervisor test to process multiple WAV files, including hardcoded edge cases and recent files. The test now reports segmentation quality, compares speech-only duration to total audio, and checks for hallucination markers in old transcripts. Improved output formatting and added assertions for speech detection. [ok-commit] * Update copyright notice in documentation Replaced the footer in all documentation files from 'Created by M&K (c)2026 VetCoders' to 'Copyright © 2024–2026 VetCoders' for consistency and accuracy. [ok-commit] * Add DoS protection to demux parser and update Whisper params Introduces a maximum buffer size in the demux parser to prevent unbounded memory growth and potential DoS attacks. Updates Whisper decoding parameters to use a 5-gram repetition block for improved quality and expands documentation for the WHISPER_INITIAL_PROMPT environment variable with usage guidance and examples. * Refactor voice chat UX, assistive context, and VAD pipeline (#15) * Improve dedup overlap handling and add sink convenience Enhances dedup overlap logic in `strip_suffix_overlap` to use char boundaries, preventing panics with multi-byte UTF-8 (e.g., diacritics, emoji). Adds tests for these cases. In `chunker.rs`, gate-level pre_roll and speech_pad are now derived from VAD config and environment variables. Adds a `from_callback` convenience constructor to `sinks.rs` for easier external use, with corresponding test.[ok-commit] Refactor pipeline deduplication and delta sink handling “Virtual Commit: 5, 6, 7, 8”: Moves chunk and suffix deduplication logic into core/pipeline/dedup.rs and updates the streaming pipeline to use these unified helpers. Introduces DeltaSink trait and concrete sinks (CallbackSink, CollectorSink) in core/pipeline/sinks.rs, replacing direct Fn(&str) callbacks throughout the codebase. Updates all relevant controller and CLI code to use the new sink adapters. Adds integration and unit tests for deduplication and sink behavior. [ok-commit] Improve streaming VAD config and correction handling Adds a safety net to cap raw_buffer growth in chunker during silence, ensures VAD config respects environment overrides, and always applies postprocessing in streaming_recorder. In streaming, corrections are now guarded to prevent rewriting most of the text, and [ok-commit] last_suffix handling is improved to avoid state corruption when postprocessing filters out hallucinations. Includes new tests for suffix and correction guard logic. * Document CODESCRIBE_VAD_SPEECH_PAD_SEC env variable Added documentation for the new CODESCRIBE_VAD_SPEECH_PAD_SEC environment variable in ENV_REGISTRY.toml and env.md, describing its purpose as speech padding after speech offset and its default behavior. Also updated test module in chunker.rs to use serial_test for relevant tests.[ok-commit] * [ok-commit] feat(ui): bubble overlap fixes + multiline input (ranch Fala 1) Cherry-picked from origin/feat/ux-poc-assistive-context: - e9d63c2 fix(ui): stop overlay bubble overlap and enable scrolling - cc03eee fix(overlay): measure bubble height with NSString boundingRect - de934a3 fix(overlay): render full bubble text - acf3c4c fix(overlay): prevent Copy button overlap and bubble clipping - 2861914 fix(overlay): avoid narrow bubbles for long responses - ef9237c fix(overlay): widen streaming bubbles early - a08d944 fix(overlay): widen streaming bubbles sooner - 71cc1ad feat(overlay): multiline agent input Co-Authored-By: Klaudiusz <the1st@whoai.am> * [ok-commit] feat(ui): overlay stability fixes (ranch Fala 2) Cherry-picked from origin/feat/ux-poc-assistive-context: - aace207 fix(overlay): prevent header controls overlap - 7ccdec5 fix(overlay): keep tabs from overlapping header icons - 0828ea3 fix(ui): keep agent chat content visible - 72ac85f fix(ui): make overlay interactive and drawer usable - bd6eab1 fix(ui): force chat overlay visible for responses - 32364ec fix(ui): stabilize voice chat overlay updates - 19c0c33 fix(overlay): avoid deadlock when toggling favorites - 6bc72e3 fix(ui): avoid deadlock when closing voice overlay Also added: set_tooltip helper function. Co-Authored-By: Klaudiusz <the1st@whoai.am> * [ok-commit] fix(ui): re-show chat overlay on assistive output (ranch b05ad18) Ensure voice chat overlay is shown when setting user/assistant text in the controller. Applies to all assistive and formatting paths. Co-Authored-By: Klaudiusz <the1st@whoai.am> * [ok-commit] fix(overlay): enable Cmd+C/Cmd+V in agent app (ranch Fala 3 partial) Cherry-picked from origin/feat/ux-poc-assistive-context: - 3c4e5f1 fix(overlay): enable Cmd+C/Cmd+V in agent app Skipped 3bd43dc, f848580, 0a79ce2 (depend on selection.rs from excluded 27b8b1b). Co-Authored-By: Klaudiusz <the1st@whoai.am> * [ok-commit] feat(ui): context management + agent input (ranch Fala 4 clean) Cherry-picked from origin/feat/ux-poc-assistive-context: - 597952b fix(voice-chat): render overlay contents - 6693cb9 fix(ux): keep assistive overlay on Agent tab (excl. selection.rs) - d2eae30 fix(overlay): make agent input field editable Co-Authored-By: Klaudiusz <the1st@whoai.am> * feat(ui): context management + copy/paste support (ranch Fala 4b) Cherry-picked UI portions from origin/feat/ux-poc-assistive-context: - 34cffcc fix(voice-chat): show context + reduce dead overlay (UI parts) - 0fd49ba feat(voice-chat): add copy/paste last response (UI parts) Added: set_voice_chat_target_app API, last_target_app state field, copy/paste handler infrastructure. Skipped controller hunks from 34cffcc, 0fd49ba, 7d58432, 1f13d8c (heavy controller restructuring conflicts with DeltaSink/CallbackSink).[ok-commit] Co-Authored-By: Klaudiusz <the1st@whoai.am> * Add assistive context capture for selection in macOS Implements best-effort capture of selected text and frontmost app context for assistive mode on macOS, using Accessibility APIs and optional Cmd+C fallback. Updates RecordingController to store and use this context, modifies clipboard handling to support Cmd+C simulation, and adds new helpers in app/ui for retrieving selected text and its length. This enables richer context-aware AI interactions without polluting the clipboard.[ok-commit] Co-Authored-By: Klaudiusz <the1st@whoai.am> * Improve voice chat UX, safety, and accessibility Adds accessibility labels to UI elements, improves send button logic and labeling, and caps chat message history for performance. Introduces path safety checks for file operations in the voice chat overlay to prevent access outside the transcriptions directory. Refactors locking in message send/commit flows to avoid deadlocks. Updates VAD worker for clean shutdown and improves error handling in audio and model initialization. Adds new environment variables for assistive context and logging,and bumps version to 0.7.10. [ok-commit] * Update test and formatting commands in Makefile Consolidate test commands to use --include-ignored for running all tests, including those previously marked as ignored. Restrict Prettier formatting and checking to tracked files using git ls-files to avoid processing untracked files.[ok-commit] --------- Co-authored-by: Klaudiusz <the1st@whoai.am> --------- Co-authored-by: Klaudiusz <the1st@whoai.am>
* Prepare v0.7.12 release, smart hotkeys combos, VAD & tooling updates
Make macOS packaging configurable and add a DMG build workflow: introduce CODESCRIBE_* Makefile variables (app name, display name, bundle id, entitlements, min macOS, LSUIElement), parameterize Info.plist generation and codesign calls, and wire make targets to a new scripts/build-dmg.sh. Add defaults and NOTARY_PROFILE handling to scripts/notarize.sh.
Refactor UI helpers and voice overlay: move glass/visual effect view creation into shared helpers (create_glass_effect_view) and add more robust layout region/guide lookup, UI color helpers (overlay_text/overlay_hint_text), and tweaks to style_toolbar_icon_button. Update voice chat to use shared helpers, add shortcuts_lines and update_shortcuts_panel to reflect hotkey state, persist help label IDs in overlay state, and switch attach button symbol to a paperclip icon. Gate several UI tests on CODESCRIBE_UI_TESTS and run them serially for stability.
Other: add initial_prompt field to DecodingParams (whisper STT) and set its default to None. Overall changes improve packaging flexibility, signing/notarization flow, UI robustness across macOS versions, and hotkey/help text behavior.
commit ba5c932a05e12562ce711839546c82e50adb454f
Author: Szowesgad <void@div0.space>
Date: Wed Feb 4 23:18:51 2026 +0100
Add .env config generator page
Add docs/config-generator.html — an interactive (Polish) web UI for generating CodeScribe .env files. The page includes sections for Speech-to-Text (local/cloud), AI formatting/assistive, hotkeys, streaming/VAD, and UI/feedback, plus presets, toggles, and secure inputs. A client-side script builds a commented .env (with generation date), supports copy/download/reset actions, and sets sensible defaults to help users create ~/.codescribe/.env.
commit 10c0ee33290df4383ddce74ffa4deb5675d8e263
Author: Szowesgad <void@div0.space>
Date: Wed Feb 4 21:45:27 2026 +0100
Add markdown rendering & unit tests; relax VAD
Add macOS markdown rendering helpers and prefer attributed text when available: markdown_options_with_base_font, markdown_attributed_string, and apply_markdown_to_text_field. Use these to render bubble text (with fallback to plain string) and enable editing attributes when supported. Add multiple unit tests: hotkeys hold-mode behavior (including exclusive mode), UI bootstrap view attachment (macOS), shared UI helpers (layout insets, markdown rendering, SF Symbols button), voice chat display_text and tab updates, and core env path override handling. Also relax e2e VAD flow assertions to require fewer chunks (min 300) to be more CI-tolerant. Minor test scaffolding and safety checks added for macOS API availability and backwards compatibility.
commit 887ebf9bcb200cb8452f3bc0ad58dd30e0556ce0
Author: Szowesgad <void@div0.space>
Date: Wed Feb 4 20:57:30 2026 +0100
Embed Settings view; unify UI tokens & colors
Make Settings UI embeddable and modernize macOS UI helpers. Add attach_settings_view and reset_embedded_bootstrap_state to support embedding Settings inside the overlay (and adjust show_bootstrap_overlay to open the voice chat overlay and show settings). Centralize colors and metrics via ui_tokens and ui_colors, add small tokens (e.g. CORNER_RADIUS_SM, EDGE_PADDING), and replace ad-hoc color calls with semantic color helpers. Update bubble/card rendering and toolbar icon behavior to use the new color helpers and tokens, simplify layout region detection, and provide set_tab_button_active helper to reflect active/inactive tab state. Also add programmatic show_settings_tab and integrate Settings into tab switching logic. Various layout, sizing, and styling tweaks for the settings/bootstrap, keys and audio tabs, and cleanup when hiding the embedded view.
commit b894ab73b8bb461facdf22406045898d553865e3
Author: Szowesgad <void@div0.space>
Date: Wed Feb 4 17:57:07 2026 +0100
Use DoubleOption trigger and fix glass view
Update UI bootstrap to use ToggleTrigger::DoubleOption instead of DoubleCtrl for the preset handling and menu events, adjust hold_exclusive logic and keys popup index for the preset. Fix macOS glass effect view creation by checking class-level selector support (instancesRespondToSelector) before allocating/initializing the view and use that for blending/state checks. Also clean up minor whitespace in several docs files.[ok-commit]
commit 4386938117e36f4c4faf10e4d1031e214ab42b42
Author: Szowesgad <void@div0.space>
Date: Wed Feb 4 17:49:39 2026 +0100
Use dynamic NSColor and SF Symbols for UI
Replace hard-coded RGBA constants with dynamic NSColor helpers and add SF Symbol helpers/styling. Introduces ui_colors functions (sidebar_bg, panel_bg, input_bar_bg, separator) and color_label/secondary helpers, plus set_segment_symbol and style_toolbar_icon_button utilities. Update bootstrap and voice_chat UI to use dynamic colors (light/dark aware), apply SF Symbol images to segmented control and toolbar buttons with text fallbacks, style toolbar buttons consistently, and add placeholder/caret color support for editable text views. Also fix help panel visibility to use the agent flag and adjust tab layout/width calculations. Import/usage sites updated accordingly.
commit a3b9859e9f16544762cf4dee24a52bc315ff9e15
Author: Szowesgad <void@div0.space>
Date: Wed Feb 4 04:31:09 2026 +0100
Improve .env handling, canonicalize paths, bump version
Bump workspace and package version to 0.7.12. Rework Config .env handling: remove automatic creation from templates, only load and migrate legacy keys when a .env exists, and replace the old write_env_file with a safer, comment-preserving implementation that uses safe_path bounded read/write and updates keys in-place (appending new keys). Add path canonicalization for config directory resolution to handle macOS /var → /private/var symlinks. Update tests to canonicalize temp dirs accordingly and remove an obsolete legacy env migration test.
commit a9721ae757b9ed1f0e653898c8d7a095b375d8f3
Author: Szowesgad <void@div0.space>
Date: Tue Feb 3 20:11:34 2026 +0100
Voice chat: add split view and layout helpers
Introduce layout and color helpers and switch the voice chat overlay to a split view layout. Added ui_colors, sidebar width tokens, NSEdgeInsets and layout_insets_for_view (plus helper functions) in shared helpers; replaced safe-inset usage with layout_insets_for_view. Implement an NSSplitViewController-based sidebar/content arrangement in voice_chat, wire up split items/containers into overlay state, remove the old content_backdrop, and adjust input resizing to use the content container size and padding. Also update .prettierignore to exclude additional cache/AI files. These changes improve layout correctness across different AppKit layout guide APIs and enable a resizable sidebar for the overlay.
commit f2678e05c520d9e3ba4242afae1304f52faa1b74
Author: Szowesgad <void@div0.space>
Date: Tue Feb 3 18:51:17 2026 +0100
Add left-option toggle & hold-exclusive setting
Introduce a new ToggleTrigger variant (DoubleLeftOption) and add a hold-exclusive mode to control whether Shift/Cmd act as mode modifiers. Update hotkey atomic mappings and logic, adjust toggle detection to consider left-only toggles, and make exclusive-mode behavior affect hold-mode computation.
UI & UX updates: revamp the Keys tab (new preset handling, renamed labels, hands-off toggle dropdown, hold-exclusive checkbox), wire new action handlers (onHoldExclusiveChanged, onToggleTriggerChanged), and update tray menu labels and events to reflect the new trigger. Add helper functions to manage popup/checkbox UI state and a glass-effect view helper for voice chat overlays.
Config & migration: persist the new TOGGLE_TRIGGER and HOLD_EXCLUSIVE settings, migrate legacy HOTKEY_DOUBLE_TAP_LEFT/HOTKEY_DOUBLE_TAP_RIGHT into TOGGLE_TRIGGER, and ensure daemon/tray event handling and tests reflect the new fields.
Tests: adjust and add end-to-end tests for toggle_trigger and hold_exclusive persistence and for all toggle variants.
Overall: this change adds support for a left-option-only toggle mode, a toggle-independent hold-exclusive flag, UI controls for presets and modes, and migration/persistence for the new settings.[ok-commit]
commit 45c782d87377f951a9b4676ea84f06f862f8b156
Author: Szowesgad <void@div0.space>
Date: Tue Feb 3 17:50:30 2026 +0100
[ok-commit] chore: ignore local artifacts for prettier
commit 39e9618386cfccaa9ea14c87dc349f75aebaa3e8
Author: Szowesgad <void@div0.space>
Date: Tue Feb 3 17:13:03 2026 +0100
[ok-commit] chore: format docs and drop lab assets
commit d2777f6a500c3714b4cdfe80eda7ea54ca577c65
Author: Szowesgad <void@div0.space>
Date: Tue Feb 3 16:59:30 2026 +0100
[ok-commit] feat(ui): polish overlay UX and status sync
commit 27b9153a128845471d3ab40c49a8a319fffbdd66
Author: Szowesgad <void@div0.space>
Date: Tue Feb 3 11:33:20 2026 +0100
Respect hold_mods in compute_hold_mode
Change compute_hold_mode to take HoldMods and consider the base hold combo when computing the HoldMode. Previously Shift/Cmd always acted as mode modifiers, which could interfere with bare Ctrl holds (breaking normal terminal shortcuts). Now the function returns Raw for HoldMods::Ctrl, CtrlShift, and CtrlCmd, and only allows Shift/Cmd to select Selection/Chat modes for CtrlAlt (Ctrl+Option) combos. Update the call site to pass hold_mods.
commit f8f4db1a662861e33b4e4f7fef3e1ff71bad273e
Author: Szowesgad <void@div0.space>
Date: Tue Feb 3 02:11:29 2026 +0100
Add interim utterance emits and test keychain stub
Introduce periodic interim emits for long Utterance mode: add interim_limit to SpeechMode::Utterance, configurable via CODESCRIBE_UTTERANCE_INTERIM_SEC, and emit interim Utterance events to keep downstream processing responsive. Adjust emission logic to emit interim chunks and trim buffers accordingly.
Make macOS hold-mode behavior clearer: ensure EXCLUSIVE_MODE does not suppress the Shift/Cmd mode layer.
Make keychain operations test-friendly: detect test env (CODESCRIBE_DATA_DIR) and skip real macOS Keychain calls by stubbing save/load via environment variables and skipping population during tests.
Update tests: adapt e2e_config_persistence to expect settings.json persistence for HOLD_MODS and ignore unused tmp variable. These changes improve robustness for long continuous speech, allow local testing without touching the OS keychain, and fix hold-mode handling on macOS.
commit 02ebb59f58c841fbd09dfd551e44626ddb106adc
Author: Szowesgad <void@div0.space>
Date: Tue Feb 3 01:26:19 2026 +0100
Use CODESCRIBE_DATA_DIR for settings_dir
Respect CODESCRIBE_DATA_DIR when resolving the settings directory (for test isolation); otherwise fall back to the previous data directory behavior. Update doc comment accordingly. Adjust e2e tests to assert that hotkey and buffered-stream values are set in the process environment and persisted via UserSettings::load() (settings.json) instead of directly inspecting a .env file.
commit fc2b7aa5ac601309cf371533519d51760728adae
Author: Szowesgad <void@div0.space>
Date: Tue Feb 3 01:21:58 2026 +0100
Add LLM, delay, beep & volume UI + env persistence
Add UI fields and Objective-C action handlers for LLM configuration (endpoint, model, API key), keys tab delay slider, and audio controls (beep on start, sound volume). Handlers persist changes into environment variables (and Keychain for API key). Import new UI helpers (text/secure inputs and slider) and wire selectors in the action handler class. Also refactor several config modules (keychain, loader, migrate, settings) to use Rust let-chain conditionals to simplify nested ifs and make env/keychain population and migration logic more concise.
commit 7bfee4e5a568f041512debdaebc739834b9170bc
Author: Szowesgad <void@div0.space>
Date: Tue Feb 3 01:08:19 2026 +0100
Add tiered config, keychain & settings UI helpers
Introduce a tiered configuration system: user-facing settings moved to settings.json, API keys stored in macOS Keychain, and power-user overrides retained in ~/.codescribe/.env. Adds core/config/{settings.rs, keychain.rs, migrate.rs} and exposes UserSettings; updates loader to run a one-time migration, populate env from Keychain, apply user settings (lower priority than .env), and to route save operations to Keychain, settings.json, or .env based on key type. Also add macOS UI helpers (create_text_input, create_secure_text_input, create_slider) in app/ui/shared/helpers.rs and add security-framework to core/Cargo.toml.
commit 75d5e3eece2b2d5e434eb1d8a1e1f8e74a3b390a
Author: Szowesgad <void@div0.space>
Date: Mon Feb 2 16:32:07 2026 +0100
refactor(core): wire pipeline modules into streaming_recorder + fix UI jank
streaming_recorder.rs: 2261→734 LOC thin orchestrator delegating to
pipeline/{streaming,contracts,sinks,dedup}. DeltaSink trait replaces raw
callbacks across controller, overlay, voice_chat, CLI.
Badge window: position hysteresis (skip setFrameOrigin when cursor < 2px).
Voice chat: throttle layout passes to 50ms during streaming deltas.
Co-Authored-By: Klaudiusz <the1st@whoai.am>
commit fa5820e160219f507b3def40959ac751951672b0
Author: Szowesgad <void@div0.space>
Date: Sun Feb 1 11:21:13 2026 +0100
Add settings window with tabs and persistence
Introduces a new multi-tab Settings window with Setup, Keys, and Audio tabs, each with their own controls and persistence logic. Refactors the bootstrap overlay to a settings dialog, adds tab switching, and implements handlers for updating configuration via the UI. Updates the tray menu to reflect the new settings location and promotes hotkey controls. Adjusts audio streaming defaults. Adds end-to-end tests for settings persistence and bootstrap lifecycle.
commit 8f88e9376d0e5427da6acf35a70ae1f3c0363e2a
Author: Szowesgad <void@div0.space>
Date: Sun Feb 1 09:17:51 2026 +0100
Add onboarding bootstrap overlay for macOS
Introduces a native onboarding overlay window for macOS, guiding users through microphone testing, overlay display, and hotkey usage. Adds UI components, handlers, and tray menu integration for quick access. Updates overlay and voice chat handlers for improved user flow, and enhances Makefile test logging. Updates documentation for the streaming pipeline and VAD, and sets Silero VAD to use buffered streaming by default.
commit 8090f223b7c215b79f9d7727ad83c4162cecabd3
Author: Szowesgad <void@div0.space>
Date: Sun Feb 1 00:49:02 2026 +0100
Add E2E pipeline tests and improve notification handling
Introduces comprehensive end-to-end tests for the audio transcription pipeline, including canonical test assets and human reference transcriptions. Updates macOS notification logic to gracefully handle missing app bundles, preventing crashes and logging warnings instead. Refactors Silero VAD model embedding to require the model file in the repository and adds support for CODESCRIBE_MODEL_PATH override in build configuration.
commit 24768e40d16c56287f488c32d3cf2c48820cbd96
Merge: 59be29e 81409e1
Author: Szowesgad <void@div0.space>
Date: Sat Jan 31 22:46:42 2026 +0100
Merge branch 'fix/hotkeys-tray-hold-presets' into feat/production-ready
Add double-Ctrl hands-off toggle and Quick Notes save-only mode
Introduces a new 'double Ctrl' hands-off toggle (RAW mode) for hotkeys, including full UI integration and configuration management. Adds a 'save-only' option for Quick Notes, allowing users to save notes without auto-pasting. Refactors notification delivery to use a new macOS notifications module, updates tests and hotkey event handling, and enhances the tray menu with more granular hotkey and notes controls.
commit 81409e1eb7865056b801066d23385ca8923990e5
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 22:31:29 2026 +0100
docs: add DEWAR session notes (2026-01-31)
commit 07325863d8d6f95f7700801b6b33a0106bb67b3a
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 22:23:30 2026 +0100
fix(macos): send notifications from CodeScribe
commit 59be29e68ffa467ee53a375f9096613d7366fc3c
Author: Szowesgad <void@div0.space>
Date: Sat Jan 31 22:16:29 2026 +0100
Extract audio chunker and streaming pipeline modules
Introduces `core/audio/chunker.rs` for VAD-gated audio segmentation and `core/pipeline/streaming.rs` for streaming transcription orchestration, both decoupled from the main recorder logic. Updates `core/build.rs` to embed Whisper and Silero VAD models by default in release builds, with improved environment variable handling and documentation. Adds module wiring and test scaffolding in `core/audio/mod.rs` and `core/pipeline/mod.rs`, and provides initial tests for the new chunker.
commit b9bf1b0bd001fd8efbf5634a1d58a7de09af332c
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 22:10:50 2026 +0100
feat(tray): copy hotkeys cheatsheet
commit 37350aa43068d48815727ab276761f2eac1c6e0a
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 21:25:21 2026 +0100
fix(hotkeys): clarify combos and sanitize preset
commit 9054103e7894379033fec0a40d73359b443e6193
Author: Szowesgad <void@div0.space>
Date: Sat Jan 31 21:11:05 2026 +0100
Add pipeline contracts, deduplication, and sinks modules
Introduces core/pipeline/contracts.rs for shared pipeline data types and traits, core/pipeline/dedup.rs for chunk and suffix deduplication logic, and core/pipeline/sinks.rs for DeltaSink adapters. Updates pipeline mod.rs to include new modules. Improves VAD config environment variable handling, enhances demux parser with DoS protection, and refines tests for VAD and SSE streaming. Bumps version to 0.7.11.
commit fa70ec02389fd29c50f64927264a2a321df3a242
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 20:50:09 2026 +0100
fix(ui): avoid badge window use-after-free
commit 4406c24d992774f20cf64a080634193030aebac7
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 20:39:18 2026 +0100
fix(tray): apply hotkey changes immediately
commit 60d5e64b7bb9156aa8e072b448a6add482f1e8b0
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 20:17:19 2026 +0100
fix(tray): make hotkey presets consistent
commit 275359de9260358fa770dcbd827ae7f13c9d7588
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 19:12:31 2026 +0100
fix(hotkeys): make double-ctrl ignore ctrl+shortcuts
commit e97c7f44f955fd1899130cdcd92c15809c19303b
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 19:06:47 2026 +0100
fix(vad): don't auto-stop toggle before speech
commit ec195fff8d3d6cfae97f3f1d2680b0f052ad77b4
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 19:01:20 2026 +0100
fix(hotkeys): allow raw toggle to stop hold recording
commit 8645c4d67a39961ccaeb52664417f724d437c8a3
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 18:48:47 2026 +0100
Add double-Ctrl raw toggle & Quick Notes save-only
Introduce a RAW "double Ctrl" hands-off toggle and an optional Quick Notes "save-only" mode.
Key changes:
- New ToggleTrigger::DoubleCtrl and parsing/serialization support; updated default env and config loader to include QUICK_NOTES_SAVE_ONLY.
- Added quick_notes_save_only config field and default value; updated codepaths to respect save-only (prevent auto-paste when enabled).
- Hotkey plumbing: HotkeyInput gains force_raw flag; IPC, event dispatch and bin/codescribe mapping set force_raw appropriately.
- macOS hotkey logic extended to detect quick Ctrl taps (TAP_MAX_MS) and emit a new HotkeyEvent::ToggleRaw, with careful gating to avoid interfering with Option-based toggles.
- RecordingController logging and mode handling updated to use force_raw; Quick Notes handling updated to optionally disable auto-paste based on config.
- Tray UI: add menu item and handler for toggling Quick Notes save-only and for enabling/disabling the double-Ctrl dictation toggle; update menu IDs and runtime menu state structs and events.
- Tests updated to include force_raw in hotkey test inputs and to cover new toggle parsing.
These changes add a RAW, non-assistive toggle gesture and allow Quick Notes to operate as save-only, improving control over dictation/pasting behavior and offering a dedicated raw toggle that avoids Option-related permission regressions.
commit 78cf655414e094b7f3236ca4f70afa12942fa351
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 16:18:51 2026 +0100
Add Quick Notes feature (save-only dictation)
Introduce a Quick Notes feature that appends finalized transcripts into daily Markdown notes instead of auto-pasting. Adds core/state/notes.rs with persistence helpers (notes_dir, today_note_path, append_quick_note) and tests; exports helpers from core::state. Add quick_notes_enabled config field, loader support, and default_env entry (QUICK_NOTES_ENABLED). Integrate UI: tray Notes submenu (toggle, open folder, open today's note), menu item state, and handlers that persist the setting and trigger events. RecordingController now saves quick notes when enabled (captures frontmost app, writes a timestamped bullet, shows macOS notification) and prevents auto-paste. Update bin to apply tray events to config. Small UX and error logging included.
commit 29292911f3dacb607c36523d4dfa1c230e4db988
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 15:31:24 2026 +0100
fix(attachments): find Homebrew tools from GUI
- Resolve tools from /opt/homebrew/bin for Finder-launched apps\n- Allow overriding tool paths via CODESCRIBE_TOOL_* env vars\n- Avoid brittle --version checks
commit 3acfd3fb9381c34502c56292363a82cda2424e08
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 14:28:52 2026 +0100
feat(assistive): increase selection context limit
- Raise default ASSISTIVE_CONTEXT_MAX_CHARS to 20000\n- Truncate by chars (safe for UTF-8/Polish)\n- Set default PDF OCR language to pol+eng
commit cfb017ff31c39bbb177e21ef9fc577e5f304c2ff
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 14:18:35 2026 +0100
feat(attachments): PDF QuickLook OCR fallback
- Add QuickLook (qlmanage) + tesseract fallback when pdftotext is unavailable\n- Auto-pick OCR language when CODESCRIBE_ATTACH_PDF_OCR_LANG is unset\n- Keep prompt size bounded via existing caps
commit e26f0e628ded5daf6329dcbcc3580a71920ed932
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 14:10:23 2026 +0100
feat(attachments): extract PDF text via tools
- Extract PDF text with pdftotext; OCR fallback via ocrmypdf/tesseract\n- Limit PDF pages and chars to keep prompts stable\n- Improve tab label width to avoid truncation
commit 85a25c863bc3748718eee582aea2de7d56f5a25b
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 13:09:57 2026 +0100
feat(overlay): one-window transcription tab
- Add Transkrypcja tab to unified overlay\n- Route raw dictation deltas to the unified overlay\n- Preserve existing overlay if already open; auto-hide only when we opened it\n- Replace live preview with final transcript after processing
commit a1206a2ab80ac1bbbdd56c3f203cb92e49e8a3e3
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 12:42:44 2026 +0100
fix(hotkeys): keep assistive toggle off by default
- Reset hotkeys now disables Right Option toggle to avoid accidental mode switches
- Default env sets TOGGLE_TRIGGER=none (opt-in from tray)
commit 220558f36fc7661bb83de2461110888cf5667c6e
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 10:44:19 2026 +0100
feat(tray): add input monitoring reset action
- Add Diagnostics menu item to reset ListenEvent (Input Monitoring) via tccutil
- Open the correct System Settings pane and show a notification with next steps
commit fbd252a011f634fad1722990e9604097f2990596
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 10:15:24 2026 +0100
chore(dev): improve install signing and defaults
- Always codesign the installed .app (ad-hoc fallback) to bind Info.plist and stabilize bundle identifier
- Print a short codesign summary after install for quick TCC debugging
- Update default_env.txt to prefer live preview defaults and set WHISPER_LANGUAGE=pl
commit c4fe366dd65d07fd2a55bce04cf132dc0e2942cc
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 09:34:43 2026 +0100
feat(tray): add permissions shortcuts and richer diagnostics
- Add Diagnostics menu links to Accessibility/Input Monitoring settings
- Extend copied diagnostics with app bundle flag, safe config hints, codesign summary, and running process list
- Helps debug TCC resets and stray CLI/daemon processes
commit c5cb7c47f5f2999428f9952023ad544fb02914ab
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 08:10:58 2026 +0100
fix(overlay): enable live preview by default
- Make CODESCRIBE_BUFFERED_STREAM opt-in (default 0) to match docs
- Restores live chunked deltas during hold recordings
commit ee160578020515524ae144c03b6dc84f34d39ac6
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 08:03:30 2026 +0100
fix(vad): unify recorder thresholds with VadConfig
- Use VadConfig as single source of truth for recorder speech threshold and hang time
- Keeps VAD knobs consistent across streaming segmentation and auto-stop
commit 97da35ccbcdd32b76ac0b5b5a74cf59e0837a554
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 06:15:33 2026 +0100
fix(stt): stabilize transcripts via final-pass
- Prefer final-pass local transcription from WAV for paste/save (toggle: CODESCRIBE_LOCAL_STT_FINAL_PASS)
- Use env-driven VAD config for streaming segmentation so tray presets actually apply
- Skip Whisper/model scans in unit tests to avoid slow/hanging runs
commit 288af6ecc620507c040c02a47c32a11129dd99ab
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 05:33:51 2026 +0100
fix(vad): disable auto-stop in hold mode
commit d2dd0f78685acc19129faa8163f9708bd207cb6c
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 05:30:35 2026 +0100
fix(vad): do not auto-finish hold recordings
commit b42bed1f9dcb43bf35c301909a3eba2bac475f7a
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 05:23:51 2026 +0100
fix(daemon): disable quality loop autostart
commit 75bfc1a5bb31e0bc1155243e73d6feeed308cf00
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 04:54:31 2026 +0100
feat(tray): add VAD presets
commit 2130e08560b4bac9a56282da0e37c6065314d92c
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 04:11:35 2026 +0100
fix(core): keep VAD integration building
commit 2264a3464ca237638661a68ea5d13f47f44c5836
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Sat Jan 31 04:11:31 2026 +0100
feat(tray): install Silero VAD model
commit 600557406cab6c795aee3c67849937b24d5b003c
Author: Szowesgad <void@div0.space>
Date: Wed Jan 28 22:31:02 2026 +0100
Improve Silero VAD v5 integration and add tests
Refactors Silero VAD wrapper to support v5 model API, including unified state tensor, context window, and updated input/output handling. Adds detailed tests for VAD index synchronization and real audio segmentation in streaming_recorder.rs. Enhances logging and clarifies [ok-commit]
Supervisor gate mode behavior.
commit 0b96241cc667aea364d6ec4303ec4a1b763a51c4
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Fri Jan 30 21:18:47 2026 +0100
feat(overlay): send image attachments as vision input
- Treat non-UTF8 image files as vision attachments
- Append image paths to a machine-parsable attachment block
- Extend Responses API input content to support input_image
- Encode images as data URLs with size limits (max 4, 8MB each)
- Update overlay UX POC docs
commit 582ed86d7f2fba0f12e0633f2856811311443a12
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Fri Jan 30 20:54:33 2026 +0100
fix(overlay): avoid crash when sending attachments
- Dispatch attachment sends back to main thread before calling send callback\n- Prevent tokio runtime panics from background threads (release abort)
commit 7a5b12783a78e795d251cbc57ba525c8c36ac420
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Fri Jan 30 19:06:37 2026 +0100
feat(overlay): attach files to agent context
- Add paperclip button next to Send for attaching files\n- Use NSOpenPanel to pick multiple files and track per-thread attachments\n- Inline UTF-8 text attachments into the next Agent send (size-capped, once per set)\n- Clear attachments on new thread/reset and document the behavior
commit 302d10e7f37ac52c5e8394520e4c9bc1b4798f63
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 15:51:10 2026 +0100
docs(overlay): add POC overlay UX guide
- Document Agent/Drawer overlay behavior and icons
- Describe chat export (Copy/Save Markdown) and favorites
- Clarify Drawer Edit -> TextEdit behavior and common gotcha
- Link the new guide from docs/guide/README.md
commit 8d0050c940542772dde02ee940c50b188842437c
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 14:45:34 2026 +0100
feat(overlay): start Agent input compact
- Reduce initial Agent input bar height
- Keep auto-grow behavior via resize_agent_input_locked
commit 5fff4b643511937a03ab1fa89439f02f31f68dba
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 14:10:17 2026 +0100
chore(tray): simplify menu into Tools + Advanced
- Replace top-level Advanced with Tools submenu
- Put prompts and diagnostics up front
- Move Hotkeys under Tools → Advanced
- Update tray menu tests
commit ebec53b0e922dbd59827c6a517df7caa96b659e6
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 13:49:52 2026 +0100
fix(drawer): hide overlay briefly on Edit
- Hide overlay on Drawer Edit to avoid covering TextEdit
- Restore overlay after 750ms only if CodeScribe is active
- Avoid sending ObjC pointers across threads
commit f48f4c2688bacb76db5ef3f12324d8380cfe7fd5
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 13:16:00 2026 +0100
fix(drawer): open Edit via NSWorkspace TextEdit
- Try NSWorkspace openFile:withApplication(TextEdit) before shell open
- Keep /usr/bin/open fallbacks and best-effort activation
commit 1b2790c2281bfb85724397537e1dfb284fba09ff
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 13:07:14 2026 +0100
fix(drawer): ensure Edit opens the clicked file
- Prefer /usr/bin/open -a TextEdit <path> before falling back to -e
- Add existence check and warn when path is missing
- Keep best-effort activation via NSRunningApplication
commit e70efaf9e3eebc23968cad1872344b8397416ac7
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 12:47:00 2026 +0100
fix(drawer): activate TextEdit after Edit
- Replace osascript activation with NSRunningApplication best-effort focus
- Add /usr/bin/open -a TextEdit fallback to surface the editor
- Avoid relying on Automation permissions prompts
- Keeps existing /usr/bin/open -e behaviour
commit 0f2de731e10c8fa2e1301af1d859e396bc83d1b1
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 12:28:21 2026 +0100
fix(drawer): make Edit visibly open TextEdit
- Run /usr/bin/open -e and log exit codes for diagnostics.
- Activate TextEdit via osascript to avoid 'opened on another Space' confusion.
commit 8c5ae2266986c2ce13ff8b1c122a28db2007fd2e
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 12:13:38 2026 +0100
fix(drawer): force open -e and log clicks
- Prefer /usr/bin/open (-e/-t) before NSWorkspace for Drawer Edit.
- Log Drawer Edit clicks for debugging.
- Ensure open_file_in_editor returns false on failure.
commit 1ae62b62d29812128954cda973b375a8542718ce
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 11:59:33 2026 +0100
fix(drawer): make Edit open reliably
- Use /usr/bin/open -e/-t fallbacks and check exit status.
- If Edit still fails, reveal file in Finder and log a warning.
commit 76e4231bb6feda571989bcb6dc3a0aa548dbe191
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 11:39:33 2026 +0100
fix(overlay): restore agent scroll + fix drawer edit
- Use fittingSize for Agent document height and retile scroll view.
- Avoid stale arrangedSubviews sizing that disables scrolling.
- Use /usr/bin/open fallback for Drawer Edit in app bundle env.
commit a7ea68c24ca131835fe243deb7913892106d362f
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 11:28:15 2026 +0100
fix(overlay): make agent scroll + drawer edit robust
- Forward scrollWheel from bubble backgrounds to enclosing NSScrollView.
- Use CodeScribeBubbleContainerView for bubble views.
- Add macOS fallback for Drawer Edit.
- Remove unused flipped view class.
commit a8edda3809234d051f83ca4e6e43afdb492392a7
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 10:57:48 2026 +0100
fix(overlay): re-enable scrolling + prevent drawer overlap
- Don’t clamp Agent document height during input resize (restores scroll).
- Move Drawer preview up to avoid overlapping the action buttons.
- Keeps existing bubble scrollWheel forwarding behavior.
commit f2d0b109cea2db52866318152dd3ecd6e300a6dd
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 10:36:39 2026 +0100
fix(overlay): restore scrolling + drawer stability
- Drawer uses standard NSStackView; Agent stays flipped.
- Bubble text forwards scrollWheel to enclosing scroll view.
- Drawer Edit uses file:// URL fallback for NSWorkspace.
- Improves long-message navigation and reduces overlay glitches.
commit cb466516b716ac4640e702a0f9e5a2458ac5d453
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 08:59:32 2026 +0100
fix(overlay): flip bubbles for stable chat layout
- Render bubble/container views in a flipped coordinate space
- Anchor message text to top, Copy button to bottom
- Reposition Copy button during streaming resize
- Prevent 'growing upward' + overlap artifacts
commit 6a149fa57a4eac2fabc89467d6ae5be58f10a26d
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 08:03:43 2026 +0100
fix(overlay): flip stack view + constrain bubble width
- Use a flipped NSStackView as the scroll document view
- Add leading/trailing constraints for arranged subviews to prevent overlaps
- Improves scrolling + stops bubbles from stacking on top of each other
commit 533d4b4cf6d90f18c650b9ec93731e73ec5ead88
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 07:46:19 2026 +0100
fix(overlay): restore agent scroll range
- Stop document views from being height-resizable (fixes tiny scroll range)
- Measure agent width from clip view bounds for stable wrapping
- Sync document view size + scroll-to-bottom using bottom rect
- Force stack layout after streaming height updates
commit bb569439dc90fa3cf603731d27e4e584c9a995c5
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 07:04:51 2026 +0100
fix(overlay): streaming bubble width + restore scrolling
- Force full-width bubble for initial streaming placeholder
- Restore scrollbars (autohide overlay style)
- Size bubbles from current window width
- Avoid clamp during live resize to prevent flicker
commit 8d8eec7e4a985fce1ca327e3f682ebc69b2564cc
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 06:02:20 2026 +0100
fix(overlay): keep window visible across spaces
- Clamp overlay window on move/resize to visible frame
- Reflow agent layout after live resize
- Reapply CanJoinAllSpaces behavior on reuse
commit 38e2c2dc9bfc59be62ae88a5e0f9e47bf0886e78
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 05:36:32 2026 +0100
chore(lint): satisfy clippy and reduce prettier noise
- Collapse nested ifs per clippy
- Remove redundant spawn_blocking closures
- Ignore .venv/.loctree in Prettier checks
commit 6eac5b271c81df5e3408b8ff60eeab83f6e9e9b8
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 05:36:15 2026 +0100
fix(overlay): stable scroll on long chats
- Size bubbles to current overlay width
- Avoid document view height growing with window
- Cap overlay resize to screen visible frame
commit 06c10a7c14ba65870fec32bfd872712960b0bfa8
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 05:12:17 2026 +0100
fix(overlay): bubble wrap renders immediately
- Measure bubble text height via NSTextField cellSizeForBounds
- Fix 2nd-line appearing only after click
- Keep streaming resize path consistent
commit 7dac1c03f7eb1ddee6bcf6d40e7c5c52a4207407
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 04:48:28 2026 +0100
feat(overlay): resizable window + hide scrollbars
- Make overlay window resizable with sane min size
- Add autoresizing masks for header, lists, and input
- Hide scrollbars while keeping scroll via trackpad/wheel
- Keep layout stable when resizing
commit 77f6bc7afa1c01d62fc8e1d2dea3a993213b7fe2
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 04:31:55 2026 +0100
fix(overlay): reduce header button clutter
- Replace paste/copy/new-thread icons with a single '…' menu\n- Free space so Drawer/Agent tabs can render without truncation\n- Keep actions accessible via menu (New thread, Copy/Paste last)
commit e0e39adf7e2bdfb6303c8eca231bc396a284c2fa
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 04:13:00 2026 +0100
fix(overlay): compact input + loosen header
- Start Agent input bar compact; auto-grow based on draft length\n- Hook NSTextView textDidChange to resize input + agent scroll frame\n- Right-align header buttons and widen tab control (avoid 'Dr.../A...' truncation)
commit 1945039c650fec1c5614c097d1b7266505d5166d
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 03:32:17 2026 +0100
feat(overlay): export chat markdown
- Add Export button in overlay header\n- Export menu: All/Assistant-only → Copy/Save (Markdown)\n- Save writes .md into transcriptions folder so it appears in Drawer\n- Keep single-button UX (Export → scope → action)
commit c0485020dcfe377090f897602f046b8a5b395a08
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 03:15:27 2026 +0100
refactor(tray): simplify hotkeys controls
- Remove legacy hold/toggle matrices from tray UI\n- Keep only Reset hotkeys + single assistive toggle switch\n- Preserve deterministic daemon hotkey sync via menu events\n- Reduce cognitive load in Advanced… > Hotkeys
commit 437af3d84d90816440cdb8a442679238b2aa1e7f
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 03:00:58 2026 +0100
refactor(tray): simplify menu + add Advanced
- Move Hotkeys/Prompts/Diagnostics into Advanced… submenu\n- Promote copy-last to top-level for quick access\n- Add small explanatory notes inside submenus\n- Rename Shortcuts -> Hotkeys for clarity
commit 71cc1ad5ab80021b2ff440888b9e2a95281415e7
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 02:50:56 2026 +0100
feat(overlay): multiline agent input
- Replace single-line NSTextField with scrollable NSTextView input\n- Increase input bar height for easier editing/pasting long prompts\n- Adjust Agent scroll frame to avoid overlap with input\n- Wire send/clear/tab focus to new text view
commit a08d944be28ded3c6f6014f2fd86a022623ffdd3
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 02:32:36 2026 +0100
fix(overlay): widen streaming bubbles sooner
- Lower wrap threshold during streaming to avoid narrow initial bubbles
- Detect streaming via trailing ellipsis in resize path
commit ef9237cec972d1e85b793b8a5600c8452373edce
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 02:10:45 2026 +0100
fix(overlay): widen streaming bubbles early
- Allow bubble width to expand during streaming updates
- Avoid one-line clipping until click/layout
- Prevent full-width overflow by keeping side margins
commit 2861914a235c9a3de0f1c903e36f149ce6071b57
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 02:01:11 2026 +0100
fix(overlay): avoid narrow bubbles for long responses
- Treat long messages as wrap-prone and use full bubble width
- Prevent one-word-per-line rendering in Agent chat
commit acf3c4c1524e04a68c08c8034290a6d2640ab012
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 01:53:51 2026 +0100
fix(overlay): prevent Copy button overlap and bubble clipping
- Reserve bottom padding for Copy button so it never covers text
- Update stack view height constraints during streaming deltas
- Keep latest streaming bubble scrolled into view
commit 3c4e5f1f7a221afb8dabe0c146aa87ccbe4ac847
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Thu Jan 29 01:30:37 2026 +0100
fix(overlay): enable Cmd+C/Cmd+V in agent app
- Install a minimal AppKit main menu with Edit key equivalents
- Restores copy/paste shortcuts for overlay text selection and input
commit d2eae30a7593d8e2b89430b2e22ec60f0ed5c6d0
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 23:46:56 2026 +0100
fix(overlay): make agent input field editable
- Explicitly enable editable/selectable NSTextField for Agent input
- Focus input when switching to Agent in an already-key window
commit f845ebb6fe5f4ce3cdcff33c7e8a19ec54cf0503
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 22:30:21 2026 +0100
chore(prompts): refine default assistive prompt
- Clarify chat vs selection behavior based on selected text presence
- Enforce no clipboard/hidden context and no hallucinations
- Add explicit input template for consistency
commit f848580845c7cafca0906af4ad76166f70e8d140
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 22:04:45 2026 +0100
fix(selection): disable Cmd+C fallback by default
- Default ASSISTIVE_CONTEXT_COPY_FALLBACK to off to avoid touching clipboard
- Keep AXSelectedText as the primary selection source
- Prevent clipboard content from being treated as selection context
commit de934a386913d01d9f36dacc822268445f3be3fe
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 04:35:20 2026 +0100
fix(overlay): render full bubble text
- Use correct NSFont attribute key for boundingRect measurement\n- Recompute height using final bubble width\n- Expand multi-line messages to full width to avoid truncation
commit cc03eeeb95a2312edf7917329e6fb564886790f9
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 04:04:52 2026 +0100
fix(overlay): measure bubble height with NSString boundingRect
- Replace heuristic line estimation to avoid clipped long messages\n- Use font-aware boundingRectWithSize for wrapping/newlines\n- Keeps bubble sizing consistent with NSStackView height constraints
commit 3bd43dcef859443572200c70bebe65c1c47d3973
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 03:52:45 2026 +0100
fix(selection): don't block AXSelectedText when range length is 0
- Prefer AXSelectedText even if AXSelectedTextRange reports 0\n- Keep Cmd+C fallback disabled when range length is known-empty\n- Improves selection mode reliability across apps
commit 7ccdec5cc5e1a99b17a4e2952de72621dcad1b89
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 03:44:36 2026 +0100
fix(overlay): keep tabs from overlapping header icons
- Remove minimum tab width to avoid overlap on 450px overlays\n- Keeps Drawer/Agent clickable next to favorites
commit aace20735498f2b27310606f6be6c7915db8076e
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 03:39:13 2026 +0100
fix(overlay): prevent header controls overlap
- Compute tab control width from window size\n- Reduce title label width to keep spacing stable\n- Avoid heart icon covering Agent tab on 450px overlays
commit 19c0c33ddd2fd9948bea5aa42c315aeb1ef149eb
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 03:32:37 2026 +0100
fix(overlay): avoid deadlock when toggling favorites
- Split tab switching into a locked helper\n- Reuse helper from Drawer favorites toggle\n- Prevent main-thread self-deadlock on mutex
commit 58bffe659788d369d0e3fa5d9e3206989eeb4d54
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 03:15:20 2026 +0100
feat(tray): simplify shortcuts menu
- Rename tray submenu to Shortcuts and add a clear mapping hint\n- Add Reset shortcuts action (sets safe defaults)\n- Keep toggle triggers but label them clearly\n- Hide confusing exclusive/hold variants from the menu UI\n- Run rustfmt on touched files
commit 22e3baf2cde87f286138d828a864dcf76b1eb3a4
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 00:32:40 2026 +0100
feat(ui): persist and filter drawer favorites
- Persist Drawer favorites to ~/.codescribe/voice_chat_favorites.json
- Add header toggle (♡/♥) to show favorites only
- Apply favorites state when loading drawer entries
commit 149c966d4665c3b863bfe47fa293c9fe9f6b86e6
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 00:25:22 2026 +0100
chore(ui): add overlay tooltips
- Add tooltips for overlay header icons (paste/copy/new thread/close)
- Add tooltip for Drawer/Agent tab switch
commit 44c253eac874466177892e41e683b535eddfabb9
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Wed Jan 28 00:08:55 2026 +0100
chore(ui): simplify overlay controls
- Remove non-functional Type/Mode controls from Drawer
- Remove unused settings button from header
- Expand Drawer search field for a cleaner layout
commit e9d63c2f23e1d7c213230e264b5b16786e430220
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 23:26:58 2026 +0100
fix(ui): stop overlay bubble overlap and enable scrolling
- Add Auto Layout height constraints for NSStackView arranged subviews
- Enable multiline wrapping for bubble text labels
- Scroll to last bubble via scrollRectToVisible to avoid empty scroll area
commit 72ac85fac3bbde3184d7938925c83d29a90d1fa7
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 23:19:09 2026 +0100
fix(ui): make overlay interactive and drawer usable
- Allow the overlay window to become key/main so Agent input is typeable
- Keep Drawer scroll document size in sync so history cards render reliably
- Avoid relying on manual double-click relayout to see content
commit 0828ea3f31c597fd7ea10b50b83a86fa5bc86558
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 23:07:58 2026 +0100
fix(ui): keep agent chat content visible
- Resize agent stack document view to fit arranged subviews
- Scroll to bottom deterministically to avoid showing empty area
- Prevents messages from appearing briefly and then disappearing
commit 32364ec3f495485233416e20c8b60aec319d6f93
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 22:40:52 2026 +0100
fix(ui): stabilize voice chat overlay updates
- Properly remove NSStackView arranged subviews to prevent layout/memory churn
- Update streaming chat text in-place to avoid rebuilding views on every delta
- Reduces risk of hard freezes when using Ctrl+Shift chat mode
commit b05ad184facef18d60df29b24110e1de4a9c43fd
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 22:14:19 2026 +0100
fix(ui): re-show chat overlay on assistive output
- Ensure voice chat overlay is shown when setting user/assistant text
commit 1f13d8c84c60deb3f7181d6cbb3eac0ce2a8195d
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 22:02:19 2026 +0100
fix(ux): latch assistive mode for recording
- Ignore Raw hold updates during assistive sessions
- Prevent chat overlay from blinking/disappearing
commit bd6eab14b62c1307aa37b2479b83320a5d60bbc0
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 21:55:44 2026 +0100
fix(ui): force chat overlay visible for responses
- Always switch to Agent tab when adding chat deltas
- Bring overlay window to front on updates
commit 6693cb9b2663ad7f62dd3a1f9c41322ae0adef44
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 21:40:22 2026 +0100
fix(ux): keep assistive overlay on Agent tab
- Preserve desired tab when creating voice overlay
- Enable safe Cmd+C fallback for selection capture
- Add window_hide helper for future hide/reuse
commit 343f5c722741034a310af550368c54f19e4a5485
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 20:50:43 2026 +0100
fix(ui): stabilize hold badge window lifecycle
commit 6bc72e31ee79da52037bc0583c783c78cf8bc791
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 20:27:35 2026 +0100
fix(ui): avoid deadlock when closing voice overlay
commit 32b425020b189dd794d53c4a27151534e55b9f85
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 20:17:14 2026 +0100
fix(hotkeys): prevent hold thrash on Shift/Cmd
commit 7689087b0b9c99855e269a51ac36164e240ca23b
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 19:16:57 2026 +0100
chore(git): ignore local tool artifacts
commit aaa2508c5f6f84b6fb7501fd586fd9c5d4b5aa15
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 19:16:30 2026 +0100
feat(ux): split chat vs selection AI modes
commit 7d5843242f2616c91bed16b11543ea025784c820
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 17:23:03 2026 +0100
fix(ux): always show AI chat in overlay
- Show voice chat overlay for AI formatting, not only assistive
- Capture frontmost app for paste target even in non-assistive runs
- Allow shift-upgrade to still capture selection context
commit a81536edb43776fb72760e855597fe2e178b83df
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 08:19:21 2026 +0100
fix(stt): strip trailing :D artifacts
- Strip common Whisper ':D' bursts at utterance end (default ON)
- Avoid AXSelectedText false positives when selection length is 0
- Guard clipboard fallback against leakage
commit 0a79ce2764b830ba5b64087512948dd3040457d0
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 08:04:53 2026 +0100
fix(assistive): prevent clipboard leakage
- Skip Cmd+C fallback when selection length is 0
- Make Cmd+C fallback opt-in via ASSISTIVE_CONTEXT_COPY_FALLBACK=1
- Treat unchanged clipboard as no-selection to avoid leaking arbitrary clipboard contents
commit 34cffcc3e128d7383798bcd7a39cbb662be26eee
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 07:52:26 2026 +0100
fix(voice-chat): show context + reduce dead overlay
- Show ctx/app + selected length in overlay header
- Update overlay state even if window not realized yet
- Make assistive selection capture less flaky (AXSelectedText first, configurable Cmd+C delay)
commit 2819275ab86a496c796b3fa2f10c26fdd7cb3e18
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 07:41:02 2026 +0100
feat(ux): assistive selection context + tray tools
- Prefer AXSelectedText for assistive selection context (clipboard fallback)
- Align assistive input with INSTRUKCJA_UŻYTKOWNIKA / ZAZNACZONY_TEKST contract
- Simplify tray: Hotkeys + Tools (prompts/diagnostics/quality)
- Add tray actions to open prompt files/folder
commit 597952b2cb8c8dc7c52c9912e283ba12d1ba194e
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 06:52:46 2026 +0100
fix(voice-chat): render overlay contents
- Use 0,0 origin for blur view frame
- On reuse, reset alpha and blur view sizing
commit f1b56646910b08de3d0714253dfe3ddcb041dc14
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 06:47:48 2026 +0100
fix(ui): show overlays in fullscreen spaces
- Add FullScreenAuxiliary to overlay collection behavior
- Ensure chat/transcription overlays appear over fullscreen apps
commit 6e0e2b5cbea528c36e410c5c1a7a6ff8d3b14a09
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 06:18:12 2026 +0100
chore(build): make codesign failures visible
- Skip codesign only when identity is '-'
- Print codesign identity and surface errors
- Prevent silent ad-hoc installs when signing is expected
commit 0fd49ba0324f6e9561bb421ead28aaaa8290d337
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 05:58:53 2026 +0100
feat(voice-chat): add copy/paste last response
- Add Copy/Paste buttons to voice chat overlay header
- Store last target app and re-activate before paste
- Wire target app capture from assistive start paths
commit 5cab99f9bf230a6d78544cd3455593c07f462e45
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 05:50:47 2026 +0100
fix(ui): don't steal focus for overlays
- Remove makeKeyAndOrderFront to avoid hijacking active app
- Keep overlays floating via orderFrontRegardless
- Prevent pasting into overlay instead of foreground app
commit 27b8b1bca2b065c32f4f8383fe220c26431135d3
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 05:50:35 2026 +0100
feat(assistive): add selection context and safe output policy
- Capture selected text + frontmost app before overlay shows
- Use captured context to build assistive LLM input
- Disable auto-paste for AI/assistive; keep auto-paste for RAW
- Skip OS audio/paste pipeline in unit tests to avoid hangs
commit a698c80b5be285df13f6f42a7e64b9d2f9b625f3
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 04:40:35 2026 +0100
fix(tray): apply hotkey config changes immediately
- Apply SetHoldMods/SetToggleTrigger from menu event payload
- Avoid race where env write lags Config::load()
- Improves reliability of toggles without restart
commit 6e312938d4717ade38672406d9762e1a9a1aca61
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 03:32:05 2026 +0100
fix(macos): harden hotkeys + add diagnostics
- Request and preflight Accessibility + Input Monitoring permissions
- Avoid Ctrl+Shift implicitly flipping into assistive mode
- Log to ~/.codescribe/logs/codescribe.log for easier debugging
- Add tray action to copy runtime diagnostics to clipboard
- Bundle CLI helpers in app bundle to avoid PATH mismatches
commit d2e8a3c041ac95016913fea6aae2b3ff94875bf0
Author: m-szymanska <m.szymanska@libraxis.ai>
Date: Tue Jan 27 03:31:52 2026 +0100
docs: add repository guidelines
- Add concise contributor guide in AGENTS.md
- Document project structure and key commands
- Clarify coding style, testing, PR expectations
- Stop ignoring AGENTS.md in .gitignore
commit 1f9d14dcd2f8aec0a5845a7d0045084d751ffd69
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 23:11:45 2026 +0100
Implement assistive voice chat streaming and UI updates
Adds support for streaming user transcription into chat bubbles during assistive sessions, including new helpers for appending and finalizing user message text. Refactors overlay routing, session state, and chat bubble styling for improved clarity and Quantum theme consistency. Introduces an assistive VAD loop for hands-off recording and updates UI color palette and font handling for chat bubbles.[ok-commit]
commit c9d1952e0c6d4d983bc52d42f4e8e02067324f89
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 19:40:40 2026 +0100
Add VAD sensitivity and ONNX support, improve cache handling
Introduces CODESCRIBE_VAD_SENSITIVITY and CODESCRIBE_VAD_SILENCE_SEC as preferred VAD controls, mapping sensitivity to threshold and allowing simple silence override. Adds support for ONNX embedder models, improves HuggingFace cache path resolution, and refines environment variable handling for model embedding and cache directories.[ok-commit]
commit c62a5a5b2fd90583611a15347ab8b23f64f8f88c
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 18:56:46 2026 +0100
Refactor model embedding and HuggingFace cache detection
Model embedding is now opt-in for release builds, requiring explicit environment variables to embed models, E5, or TTS. The HuggingFace cache search now checks all possible cache locations instead of just one, improving robustness in both build.rs and hf_cache.rs. Error handling and warnings for missing models have been streamlined to avoid hard failures and provide clearer instructions.[ok-commit]
commit 903895d669a96aed64d77f84945362bb4f043b0a
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 17:39:07 2026 +0100
Support both weights.safetensors and model.safetensors
Updated model loading logic to accept either weights.safetensors or model.safetensors files for Whisper models. Refactored cache lookup and model path resolution to handle both file names, improving compatibility with different model distributions.[ok-commit]
commit bb58069cfe9602730ee26efc00b4c8423eee87a0
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 17:23:52 2026 +0100
Add case-insensitive fallback for HF cache lookup
Update `find_hf_snapshot` and `find_snapshot` to handle case-insensitive repository matches when locating Hugging Face cache directories. Also, adjust `download-csm.sh` to use multiple --include flags for clarity and compatibility.[ok-commit]
commit e2ea26132dd2fb9cfbb6132266ed083b20509dad
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 17:12:17 2026 +0100
Trim whitespace from CODESCRIBE_EMBED_MODEL env var
Updated the build script to trim whitespace from the CODESCRIBE_EMBED_MODEL environment variable before checking if it is empty. This ensures that values with only whitespace are treated as empty.[ok-commit]
commit b1faf377ed7049fe845f1a49ac146754ae251ec5
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 16:47:36 2026 +0100
Switch model loading to HuggingFace cache
Refactored model loading logic to use HuggingFace cache via the `hf download` CLI, replacing hardcoded local paths and improving flexibility. Added `core/hf_cache.rs` for cache utilities, updated build scripts and runtime model resolution to support repo overrides, and revised download scripts to use the HuggingFace cache directly. Updated documentation and warnings to reference `hf download` commands.[ok-commit]
commit 082fc2ab9eff93d16b1fa98f30d6d1ad1bd24dde
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 16:04:12 2026 +0100
Switch moshi dependency to crates.io version
Updated core/Cargo.toml to use moshi 0.6.4 from crates.io instead of the GitHub repository. Updated Cargo.lock to reflect this change and adjusted related dependencies. [ok-commit]
commit 78acbdaf15c127fa6a3163ca287fcd5e83c140ee
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 15:08:44 2026 +0100
Add word-level emission and backspace support to streaming
Implements word-level emission in buffered streaming mode with a configurable max words per tick (CODESCRIBE_EMIT_WORDS_MAX). Adds support for backspace (\u{0008}) deltas in both overlay and chat UI, and ensures deltas are applied with proper redaction. Updates environment examples and documentation to reflect new settings.[ok-commit]
commit ac2bd39d25e2f46f0b470869b5c27e54b62426b9
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 11:27:41 2026 +0100
Switch embedder from fastembed to offline E5 model
Replaces the fastembed dependency with a local/embedded E5 model using Candle and tokenizers for offline text embeddings. Adds support for embedding the E5 model directly into the binary in release builds, with new build.rs logic and a generated embedded.rs module. Updates Makefile and scripts to support E5 model download, and adjusts documentation and config to reflect the new embedding approach. Removes fastembed and related dependencies from Cargo files and codebase.[ok-commit]
commit 5b6f9298ef6e473a60ed2cc245c0d459c0f415bf
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 08:27:59 2026 +0100
Add streaming tag parser for demuxed LLM output
Introduces a new demux module with a StreamingTagParser for parsing flat, non-nested tags such as <speak> and <tool> in streamed LLM output. Updates core/lib.rs to include the new module and switches the moshi dependency in Cargo.toml to use the Kyutai Labs GitHub repository. [ok-commit]
# Conflicts:
# core/Cargo.toml
commit d7b02ab15155519c6c8c36b0b8d54c2c1f43b8ff
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 09:23:54 2026 +0100
Switch moshi to git dependency and update configs
Replaced the local path dependency for moshi with a git-based dependency for better portability. Updated .gitignore patterns for logs and codescribe memory files. Improved comments and logic in config loader to set history and debug logging as default-on but still overridable by environment variables. Translated comments in helpers.rs from Polish to English.
commit 3878fe4f54e45177ff5ebe035216ff0b45da9787
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 08:06:50 2026 +0100
Set formatting-specific LLM env vars in e2e test
Added LLM_FORMATTING_ENDPOINT, LLM_FORMATTING_MODEL, and LLM_FORMATTING_API_KEY environment variables in the e2e_retry_responses test to ensure both generic and formatting-specific configurations are covered.
commit 2d4ad444c9b79593ffcb131008d9dd286a87b5d9
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 07:55:10 2026 +0100
Refactor formatting and improve code consistency
This commit applies consistent formatting across multiple modules, including improved indentation, line breaks, and grouping of imports and re-exports. It also updates the 'ort' dependency feature in core/Cargo.toml and makes minor logic and style improvements in tests and core modules for better readability and maintainability.
commit 97923c7416543424501ac401ad046c2ee8693b8b
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 07:40:04 2026 +0100
Add conceptual architecture for speech-to-speech agent
Introduces a detailed design document for a full-duplex speech-to-speech AI agent with SSE tag-based output routing. Covers system architecture, demuxer streaming parser, component breakdowns, technology stack, implementation phases, and example data flows.
commit 3506513f6e1ace790be788517710733d2f1ca613
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 07:15:08 2026 +0100
Bump version to 0.7.8
Update Cargo.toml and Cargo.lock to set the codescribe and codescribe-core package versions to 0.7.8.
commit f3bc434c712b1c9aa35e3a199fba555f3beba7e9
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 06:32:56 2026 +0100
Fix clippy warnings for strict -D warnings compliance
- Collapse nested if-let statements (clippy::collapsible_if)
- Remove useless .into() on anyhow::Error (clippy::useless_conversion)
- Use let-chains for cleaner conditional matching
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
commit 1c64c7339c33c1d2e9b847119fce46734fe7dddf
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 05:50:28 2026 +0100
Add session generation counter to RecordingController
Introduces a conversation_generation AtomicU64 to RecordingController to track session generations and prevent cross-session race conditions. The audio loop and playback UI updates now check the session generation to ensure only the current session can update the UI, improving reliability when multiple sessions are started in quick succession.
commit e67ea1acac500f1a1f5b3dbf96afe6fc28c59cd7
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 05:35:24 2026 +0100
Refine conversation mode UI state and audio handling
Standardizes conversation state status messages, adds explicit UI state updates, and improves audio playback to be non-blocking for full-duplex operation. Also ensures proper cleanup and state reset on errors and when stopping conversation mode, and updates drawer entry mode detection for conversation logs.
commit 6595bfc86b8243430c19a113f5c3effad7134b9d
Author: Szowesgad <void@div0.space>
Date: Mon Jan 26 05:26:26 2026 +0100
Add Moshi full-duplex conversation mode
Implements a new full-duplex conversation mode using the Moshi engine, allowing simultaneous microphone input and AI response playback. Adds state management, hotkey handling, and UI updates for conversation mode, including a resampler for arbitrary input rates. Updates core conversation context to track total speaking duration and exposes new state enums and helpers throughout the app.
commit 0…
* Add Fn hold-mod, adjust hotkeys & settings UI Introduce Fn (Globe) as a first-class hold modifier and update hotkey behaviour and defaults. Key changes: - Hotkeys/macOS: add HoldMods::Fn mapping and support in event processing, compute_hold_force_ai, propagate a force_ai flag on Hold/HoldUpdate events, reduce double-tap interval, and tweak hold-delay logic to avoid shortcut hijacking. Update tests accordingly. - Defaults: switch .env.example to use HOLD_MODS=fn, TOGGLE_TRIGGER=double_option, and enable CODESCRIBE_BUFFERED_STREAM by default. - Presets & tray: update presets, tray menu labels and reset behaviour to recommend Fn + double-option and wire menu handlers for the new Fn option. - Controller: make toggle-assistive capture selection context when available, carry force_ai through to control force_raw_mode/force_ai state, and default local STT final pass to enabled. - Settings UI: add window delegate to manage lifecycle, make settings window non-transparent and keep it alive on close, add LLM & assistive API fields plus a Save button that persists API settings to config, tweak layout/fonts (monospace helper), focus ring and corner radius polish. - Badge loop: avoid blocking the main thread by using try_lock and skipping ticks when state is busy; only update UI on main thread when still valid. These changes aim to avoid interfering with common Ctrl shortcuts (by using Fn as recommended), improve assistive selection capture and formatting control, and make the settings UI more robust and user-friendly.[ok-commit] * Fix UI fonts, markdown handling, and layout; bump version Bump package version to 0.7.14 (Cargo.toml) and update Cargo.lock. Use the body-size monospace font for several API input fields in the settings UI. Fix markdown attributed string initialization by converting NSString to NSData (UTF-8) before calling initWithMarkdown:. Tidy voice chat UI: apply EDGE_PADDING to footer search field layout, remove unused imports, and mark shortcuts_lines as allow(dead_code). Simplify on_save_api_settings by removing an unsafe block and drop unnecessary mut on Config::load().[ok-commit] * Use MiniLM embedder; simplify hotkeys menu Two coordinated changeset areas: 1) Hotkeys / tray UI refactor - Introduces refresh_hotkeys_menu_from_config() and uses Config as the single source of truth for hotkeys state. - Replaces multiple per-option Hold menu check items with a concise summary line and a single toggle summary; updates runtime menu updates to refresh from Config. - Removes per-hold-menu item IDs/fields and related UI update helpers, simplifying state handling and avoiding duplicated logic. - Exposes refresh_hotkeys_menu_from_config via crate::tray for use from settings changes. [ok-commit] 2) Embedder migration and build updates - Switch default embedded embedder from E5 to MiniLM (paraphrase-multilingual-MiniLM-L12-v2), updating build.rs to embed MiniLM by default and emit cfg=embed_embedder when present. - Rename constants/paths/types to reflect generic embedder (EmbeddedModel, embed_embedder cfg) and set EMBEDDING_DIM to 384. - Update embedder engine to expect the new model (repos, default names), remove query/passage prefixes from inputs, ensure tensors converted to f32/CPU before extraction, and adjust error messages accordingly. - Update examples/tests and diagnostic strings to reference the generic embedder instead of E5. Rationale: reduce hotkeys menu complexity by centralizing UI updates and adopt a smaller multilingual MiniLM embedder for default embedded distributions to reduce binary size and simplify embedding logic. * Add toggle-mode utterance silence & callbacks Introduce per-toggle silence handling and utterance callbacks to support continuous toggle recordings that send utterances on silence without stopping the session. Key changes: - Config & env: add TOGGLE_SILENCE_SEC with default (5.0), loader/settings/types/defaults updates, clamping, and docs registry entry. - Recording controller: switch toggle mode to continuous (no auto-stop), start buffered recording, install utterance callback and per-utterance silence, implement handle_toggle_utterance and stop_toggle_recording to process utterances and gracefully stop/reset state. - Streaming recorder & pipeline: add utterance_callback and utterance_silence_sec fields, pass callbacks into buffered transcription worker, wire emission of final/ongoing utterances to the callback, and allow session creation with custom max silence. - Audio chunker: expose helpers to create utterance sessions with interim and silence parameters. - IPC, permissions, UI strings: persist TOGGLE_SILENCE_SEC to env, include in diagnostics, and update tray/voice chat hotkey descriptions and hold-mode mapping fixes. Overall effect: toggle recordings can now remain live while sending intermediate utterances triggered by configurable silence durations, improving continuous toggle/assistive workflows. [ok-commit] * Add configurable double-tap interval for hotkeys Introduce a configurable DOUBLE_TAP_INTERVAL_MS (default 200ms, clamped 100–450ms) for hotkey toggle detection. Changes include: add new config field and default, load/save from env, clamp validation, IPC persistence, permissions diagnostics entry, docs and .env.example updates, CLI/bin sync, and a new atomic getter/setter in hotkeys with tests. Also add a UI slider + value label and handler to adjust the interval at runtime.[ok-commit] * Add embedder download and ensure-models Add scripts and Makefile hooks to ensure required models are available before building/installation. New scripts: scripts/download-embedder.sh (downloads MiniLM embedder via hf CLI) and scripts/ensure-models.sh (checks HF cache paths for Whisper and embedder snapshots and invokes downloads if missing). Update scripts/download-model.sh to allow CODESCRIBE_EMBED_MODEL overrides including local paths and to fall back to a default repo. Update Makefile to add download-embedder and ensure-models targets and to call ensure-models during install, install-no-embed and bundle. Also add a build-time summary warning in core/build.rs that logs embedding status for Whisper, Silero, embedder and TTS.[ok-commit] * Support append-mode voice chat and header refactor Add append-mode support for voice chat by introducing toggle_user_has_text and toggle_assistant_has_text flags in RecordingController and plumbing an append_mode + separator flags through the transcript pipeline. When append_mode is enabled, user/assistant text is appended (with optional \"\n\n\" separators and streaming-prefix handling) and state flags are updated; session end now finalizes pending messages and resets flags. Add finalize_voice_chat_user_message/finalize_voice_chat_assistant_message APIs and internal state-only finalizers so messages can be marked finished without changing text. UI tweaks: change default LLM endpoint/model placeholder text to libraxis/programmer, make tray dock click open the Settings window, and refactor the voice chat overlay header by creating a header_controls container view and moving header buttons/status into it. Small adjustments to ensure header_controls is added to the blur view so header stays on top.[ok-commit] * Use create_glass_effect_view for glass effects Replace manual NSVisualEffectView allocation and property setup with the create_glass_effect_view helper across bootstrap and voice_chat UI code. Simplify glass effect support check to a single Class::get presence test and clean up unused objc2_app_kit imports. This centralizes glass/blur view creation, removes duplicated setup code, and tidies imports.[ok-commit] * Settings UI, Fn hotkeys, batch config save Add settings window + Keychain-backed API keys and switch default hotkeys to Fn-first with configurable double-tap Option behavior. Implement batch config writes (Config::save_to_env_many) to save .env, settings.json and Keychain entries in one pass and update bootstrap to use the batch API. Fix streaming suffix slicing to be UTF-8 safe and adjust AppKit glass handling (container view, WithinWindow blending, runtime method checks) and overlay header layering. Update docs/README/INSTALLATION to reflect MiniLM embedder, model caching for make install-app, hotkey contract, defaults and config tiers, and add changelog entry for v0.7.14.[ok-commit] * Improve streaming delta updates and defaults Refactor voice chat streaming delta handling to support targeted in-place updates and deferred layout scheduling: add pending_delta_index to state, introduce resolve_delta_index and try_update_message_view_in_place(index), and switch streaming delta/apply paths to use get_or_create_streaming_message_index / last_message_index so messages are created or resolved robustly. Update finalize_user/assistant to create missing messages and preserve mode/timestamp. Adjust controller fallback logic for streaming vs local STT and tighten logging. Adjust config behavior: default use_local_stt to true, parse and normalize USE_LOCAL_STT from ~/.codescribe/.env (allowing explicit disable), ignore runtime environment USE_LOCAL_STT with a warning, and apply the resolved value after loading env. Tweak streaming/postprocessing heuristics: lower embedding similarity threshold and raise novelty threshold, skip embedding for overly long text to avoid truncation bias, and reduce streaming chunk duration from 15s→3s and overlap from 25%→20%. Minor docs: normalize table formatting in BACKLOG, HOTKEYS_CONTRACT, and TEAM_SETUP. These changes improve UI responsiveness and robustness for streaming transcripts, make STT configuration safer for end users, and refine streaming segmentation and semantic gating behavior.[ok-commit] * Add settings keychain UI and window aliases Expose Settings-window aliases and onboarding helpers, and add keychain status/clear controls for API keys in the Settings (bootstrap) UI. Changes include: re-exported hide/show/schedule/should functions for settings in lib.rs; added keychain helpers (check, status text/color, update, clear) and status labels for LLM and Assistive API keys; wired Clear buttons and new action handlers (onClearLlmKey, onClearAssistiveKey) in the Objective-C action handler; update UI layout to show status labels and clear buttons; ensure env/config fallbacks for endpoint/model fields; clear fields and refresh status after saves; reset new state fields when closing. Also updated a tray enum comment to reflect opening Settings. This improves visibility and management of stored API keys in the macOS settings window.[ok-commit]
* Refactor glass effect, markdown, and streaming fixes Introduce create_glass_effect_view_with to control blending and state (with a compatibility wrapper) and update voice chat UI to use the new API. Improve markdown handling by preserving single newlines (convert to Markdown hard breaks outside fenced code blocks) and apply it before creating attributed strings; also set line break mode and wrapping for bubble text cells. Adjust voice chat layout: add input_gap, use it when resizing agent scroll view, fix header_controls frame/init and autoresizing mask, and ensure header_controls is added to the correct parent. In the streaming pipeline make suffix handling safe (avoid panics on slicing) and fix redacted-delta generation to correctly handle multi-byte/UTF-8 characters by computing byte indices; add byte_index_at_char helper and a test covering diacritics. [ok-commit] * UI: Enter-to-send, highlights, layout & audio refactor Add agent Enter-to-send preference and UI: new config/default/loader (agent_enter_sends), checkbox in settings, handler, and logic to honor Enter/Shift/Cmd behavior in the text input. Add a Keyboard Shortcuts menu item and dialog. Improve bubble rendering by capping content height and wrapping overflowing text in an NSScrollView; increase footer inset. Add search-term highlighting for drawer previews and an empty-state CTA in the chat view. Apply UI tweaks to the voice chat overlay (traffic-light space, tab sizing, split divider style) and a pulsing listening indicator. Refactor audio/pipeline behavior: introduce UtteranceFinal event and clarify Utterance semantics; add hardcoded_utterance_gate_config and env overrides for utterance silence. Rework streaming and buffered transcription workers to decouple audio ingestion from inference by queueing work items, spawning background transcription tasks, and handling backpressure (drop counters + warnings). Add helper spawn_* transcription functions, UtteranceWorkItem struct, and related tests (EnvGuard, utterance silence behavior). Misc small fixes and test updates to account for new SpeechEvent variants.[ok-commit] * Split settings UI glass & simplify tray menus Refactor settings UI to use a split glass structure: create separate sidebar and content visual-effect panes, move title/subtitle into content pane, adjust layouts/frames, add sidebar tab icons, alignment and rounded selection styling, and tighten header sizing. Add markdown pre-processing to preserve single newlines for rendered markdown. Improve NSSplitView handling in voice chat (use splitView property and guard setDividerStyle). Simplify tray/menu code by removing VAD preset and many hotkeys toggle items, related TrayMenuEvent variants and menu IDs, and associated handler logic and periodic updates — the tray menu is streamlined and redundant event dispatches removed. Small cleanups: adjust fonts, corner radii, and notification call site.[ok-commit] * Adjust settings spacing and add focus ring constants Increase vertical spacing in the settings UI (increase y offsets after clear_assist_btn and save_btn) to improve layout. Add explicit focus ring constants (NS_FOCUS_RING_TYPE_DEFAULT, NS_FOCUS_RING_TYPE_NONE, NS_FOCUS_RING_TYPE_EXTERIOR) to app/ui/shared/helpers.rs and remove the previous duplicate/incorrect declarations, consolidating the focus-ring definitions.[ok-commit] * Remove stray dash in hotkeys cheatsheet Fix formatting in handle_copy_hotkeys_cheatsheet by removing an extraneous '-' line from the formatted "CodeScribe hotkeys" string. This prevents an empty bullet/dash from appearing in the copied cheatsheet output.[ok-commit] * Improve overlay UI behavior and visuals Make the Settings window fixed-size and disable fullscreen/zoom to avoid AppKit fullscreen snapshot crashes; add NSWindowButton import and expose a resizable flag on create_floating_window. Reduce various UI background alpha values to 0.5 for more consistent translucency and expand key-status label widths while removing adjacent Clear buttons. Defer programmatic tab switches until the overlay is created (pending_tab), avoid redundant active-tab updates, and only populate the Agent view when transitioning into it to keep the CTA visible. Fix search highlight ranges by computing UTF-16 locations/lengths and guarding out-of-bounds matches. Add a Help/shortcuts toolbar button, set split-view divider color when supported, and track the help button in the overlay state.[ok-commit] * UI refinements, markdown & search highlight fixes Bump workspace/package version to 0.7.15 and apply multiple UI and text-handling improvements: increase alpha values for several macOS UI colors; simplify overlay window style mask and glass effect creation, and adjust header/title/tab layout to avoid truncation; stop preprocessing markdown (remove markdown_preserve_single_newlines) and enable interpretedSyntax = inlineOnlyPreservingWhitespace so single newlines are preserved while keeping inline formatting; remove bubble height capping and scroll-wrapping so bubbles use the measured height; make search-term highlighting Unicode-safe by matching on char boundaries and converting to UTF-16 offsets for NSRange; prefer split controller view property when sizing split view. Cargo.lock updated accordingly.[ok-commit] * Rewire VAD preset to formatting level Replace the VAD preset setting with a new Formatting level across UI and config. UI changes: rename labels and handler (on_vad_preset_changed → on_formatting_level_changed), update popup options to Raw/Medium/Creative, pre-select from FORMATTING_LEVEL env and save selection to FORMATTING_LEVEL. Config changes: rename settings field to formatting_level and migrate/load keys accordingly. Remove the hotkeys cheatsheet/hotkeys submenu and related menu IDs/handlers from the tray. Refactor visual-effect/glass handling: add a safe NSVisualEffectView subclass stub to avoid Tahoe layoutRegionGuides crashes, consolidate glass effect creation helpers (create_glass_effect_view_with/create_glass_effect_view), and update overlay/voice_chat to use the safer helpers. Misc: adjust UI tokens (footer height/insets/content gap) and simplify some ObjC respondsToSelector guards for split/sidebar toggling.[ok-commit] * Move dictation preview to ephemeral overlay Replace the Transcription tab in the voice chat overlay with a separate ephemeral transcription overlay for live dictation. Routing and controller logic now direct streaming deltas to transcription_overlay (route_transcription_delta and docs). The voice chat UI API, handlers, state and layout were cleaned up: transcription-specific views, tab/button, state fields and helper functions (append_transcription_delta, set_transcription_text, clear_transcription_text, show_transcription_tab, etc.) were removed and reworked to use the new overlay APIs (show_transcription_overlay, enter_recording_mode, set_transcription_text via crate::). Adjusted tab cluster layout and re-export lists accordingly. Also updated controller shutdown/stop paths to use enter_decision_mode/schedule_auto_hide for non-quick-notes flows and preserved quick-notes-only behavior. Docs were updated to reflect the single Floating Overlay target for non-assistive dictation streaming.[ok-commit] * Normalize markdown fonts and refine bubble text Add NSRange and normalize_attributed_string_fonts to ensure Markdown-produced attributed strings use the base font family while preserving bold/italic traits and point sizes. Hook the normalization into markdown_attributed_string so attributed results are safe to set on NSTextField. Restrict Markdown rendering to non-streaming Assistant/System bubbles and update create_bubble_view/update_bubble_text signatures to accept role and error state. Update text color logic to handle streaming and error states per role. Also update voice_chat API to pass the bubble role and error flag when updating message views.[ok-commit] * Add attachment model and UI chip support Introduce a first-class Attachment model and on-disk AttachmentStore (core/attachment.rs) and refactor the voice chat UI to use it. Replace the old attached_files Vec<PathBuf> with attachments: Vec<Attachment> and add attachment_chip_strip state and rendering to show compact attachment chips above the input bar. Add handlers for drag/drop, file picker, paste-as-attachment (images and file URLs), and connector-driven attachments (GitHub and URL fetch), including QuickLook preview, reveal, and copy-path actions. Ensure attachment fingerprinting and commit timing are handled correctly (commit fingerprint only after confirming a send handler), and update layout/resizing to account for the chip strip. Also wire connector parsing/fetching and persistence for fetched/clipboard content via AttachmentStore.[ok-commit] * Improve VAD, recorder drops and send flow Multiple reliability and UX fixes across voice, VAD, and streaming: - ui/voice_chat: Check SEND_CALLBACK before mutating overlay state to avoid phantom messages; simplify handler capture and ensure attachments/handler logic commits fingerprint only after handler confirmed. - core/audio/chunker: Add max_speech_prob tracking, handle VAD predict errors (assume speech on error), implement flush fallback to emit audio when VAD never triggers Start but speech-like signal was seen; add test helpers and a unit test covering the fallback path; reduce default interim timeout to 3s. - core/audio/streaming_recorder: Track dropped audio chunks (AtomicU64), warn periodically when callback drops chunks due to backpressure, reset counter on start and report drops on stop. - core/pipeline: Skip initial buffering delay for the first emission so users get instant visual feedback on the first chunk. - core/vad/silero_ort: Safely access model outputs/state (avoid panics on missing tensors) and handle predict errors with a warning fallback. - docs: Update streaming env descriptions and default interim values to reflect behavior changes. These changes improve robustness in face of model/runtime errors, surface backpressure issues, and refine UI behavior for a better user experience.[ok-commit] * Use param structs to reduce long arg lists Introduce grouped parameter structs to shorten long function signatures and update call sites. - Add TranscriptPipelineParams (app/controller/types.rs) and refactor process_transcript_text_pipeline to accept/destructure it; update all callers in app/controller/mod.rs accordingly. This avoids a very large argument list and clarifies parameter intent. - Add BufferedWorkerConfig (core/pipeline/streaming.rs) and change buffered_transcription_worker to accept it; update callers in core/audio/streaming_recorder.rs and transcribe_buffered_samples to construct the config. - In core/audio/chunker.rs extract FALLBACK_PROB constant, use it in logic, and remove duplicated const/test-only accessors. - Remove an unused #[allow(dead_code)] attribute from shortcuts_lines in app/ui/voice_chat/mod.rs. These changes are primarily to address clippy warnings about too many arguments and to make call sites clearer and more maintainable.[ok-commit] * Clean up comments and docs in VAD and recorder Remove redundant and outdated comments across core/vad/silero_ort.rs and core/audio/streaming_recorder.rs. This strips an obsolete note about calculate_rms_db, tidies several Silero VAD doc comments (resampler, resample, set_input_sample_rate, threshold, init, is_initialized, is_speech), and adjusts a test docstring. No functional code changes.[ok-commit] * Introduce event-based transcription pipeline Add a unified, event-driven transcription pipeline and presentation layer. - Core: introduce EngineEvent enum and EventSink trait (semantic engine events) and DropKind; re-export these from core::pipeline. - Streaming: implement transcription_session which emits EngineEvent instances, publish SessionConfig, and add start_event_session + event_sink support to StreamingRecorder; maintain legacy workers but mark deprecated. - Presentation: add app::presentation module with PresentationEmitter (bridges EngineEvent -> BufferedEmitter) and app-side ControllerEventRouter to route events to UI/overlay. - Adapters: add DeltaSinkAdapter to bridge EventSink -> legacy DeltaSink and CollectorEventSink for tests. - Make BufferedEmitter and its tick loop public so PresentationEmitter can drive typing animation. - App changes: wire optional experimental pipeline behind CODESCRIBE_EVENT_PIPELINE env var (env examples and docs updated) and add presentation module export in app/lib.rs. - Tests: add unit tests for EngineEvent, DropKind, DeltaSinkAdapter, and CollectorEventSink; miscellaneous refactors and logging. This enables a cleaner separation between engine semantics and presentation (typing/delta logic), while preserving backward compatibility via adapters and a feature flag (CODESCRIBE_EVENT_PIPELINE=1) for gradual rollout.[ok-commit] * Compute incremental preview deltas and track corrections Use transcript diffs to send minimal BACKSPACE-encoded preview updates and avoid re-sending full preview text. Add last_preview Mutex<String> to ControllerEventRouter and PresentationEmitter to compute deltas: ControllerEventRouter uses TranscriptDelta::from_diff to append/update overlays, and PresentationEmitter computes a new suffix to push incremental segments for the typing animation. On Correction events both components reset last_preview to the corrected text. Update the streaming pipeline to count corrections_applied and to set accumulated_text to the corrected text when a correction is emitted. Also remove the commented CODESCRIBE_EVENT_PIPELINE lines from .env.example. These changes reduce redundant updates, keep preview diffs consistent after corrections, and surface correction metrics.[ok-commit] * Allow Preview to stream directly into user bubble Add support for streaming Preview updates directly into the voice-chat user bubble to avoid duplicate writes and preserve streaming state. [ok-commit]Introduce skip_user_bubble on TranscriptPipelineParams and thread it through RecordingController so the commit path can optionally skip rewriting the user bubble. On Correction events, compute a TranscriptDelta from last_preview and append the delta in assistive mode instead of replacing the full text. When skip_user_bubble is true, finalize the voice-chat user message (stop streaming) without re-writing text and mark the controller as having user text. Also reset last_preview on UtteranceFinal in both controller helpers and the presentation emitter so previews start fresh after utterance boundaries. * Emit VAD boundary prob & VadFallback Add session-level VAD telemetry and propagate it through the pipeline. - core/audio/chunker.rs: add SpeechSession fields (last_boundary_prob, session_start, last_flush_fallback) and getters (boundary_prob, session_elapsed_ms, was_flush_fallback, peak_speech_prob). Track boundary probability at VAD Start/End and mark when flush() used the fallback path. - core/pipeline/streaming.rs: use session.boundary_prob() and session.session_elapsed_ms() to populate EngineEvent::VadStart/VadEnd timestamps and speech_prob; emit EngineEvent::VadFallback when flush used the degraded fallback path and ensure VadStart is emitted if the first speech comes from flush. - core/pipeline/contracts.rs: expand EngineEvent docs to define Preview/Correction/UtteranceFinal semantics (utterance-local semantics and sink responsibilities). - docs/OVERLAY_STREAMING.md: update flowchart and architecture docs to reflect the unified transcription_session pipeline, StreamPostProcessor, VadFallback behavior, event semantics, and updated file/component list. Purpose: provide richer VAD diagnostics (probability + wall-clock ts), surface degraded flush cases as explicit events, and document the event contracts so sinks can correctly handle previews, corrections, and final utterances.[ok-commit] * Suppress stale corrections, add FilteredEmpty drop Ignore stale Correction events that arrive after an UtteranceFinal has cleared state (checks for empty last_preview/accumulated_text) to prevent phantom text in subsequent utterances. Introduce DropKind::FilteredEmpty and map streaming postprocess None -> FilteredEmpty to distinguish empty results from semantic-gate drops. Update transcription pipeline to track utterance audio duration and emit start_ts/end_ts, reset and clarify Phase 2 correction accumulation so corrections spawned after finalization are suppressed, and reset correction buffers on utterance boundaries. Add an optional event-based pipeline (CODESCRIBE_EVENT_PIPELINE) that uses ControllerEventRouter and starts event sessions. Update docs and env defaults: VAD pre-roll to 0.064s, VAD gate default to supervisor, streaming chunk to 3s, and overlay docs to reference Silero VAD v6 and updated paths.[ok-commit] * Skip user bubble and log double-tap Set skip_user_bubble to true in RecordingController since the delta_callback already streams into the bubble, avoiding duplicate user bubbles. Also add an info-level trace when a macOS double-tap is detected in hotkeys to aid debugging and telemetry.[ok-commit] * Rename VAD stop→start; add zoom & filtered_empty metric Rename VAD callbacks/flags from "vad_stop" to "vad_start" across controller, presentation, streaming recorder, and pipeline code to reflect VAD start detection. Add a new filtered_empty_drops counter and include it in EngineEvent, pipeline accounting, and session logging. Introduce chat zoom support: persist chat_zoom in UserSettings, restore on overlay open, add Cmd+= / Cmd+- / Cmd+0 key equivalents to adjust/reset zoom with debounced save, and expose zoom_level in overlay state. UI tweaks: make bubble font size configurable, use that font size when creating bubble views, cap overlay/content max widths to 1000px and screen height, set a thin split divider with separator color, and compute bubble font size based on zoom. Misc: update various variable names/usages and logging to reflect the new metric and naming.[ok-commit] * Update ControllerEventRouter to use transcript buffer Add a transcript buffer and finalized_prefix to ControllerEventRouter so previews and finalized utterances update StreamingRecorder's transcript buffer (so stop() returns accumulated text). Implement with_transcript_buffer builder, update EventSink handling to write previews and accumulate finalized text (using mutexes and try_lock), and invoke utterance callbacks with trimmed payloads. Wire the recorder's transcript_buffer_handle into routers in RecordingController, and expose transcript_buffer_handle() on StreamingRecorder to return a cloned Arc handle. [ok-commit]
* Improve pipeline, UI, connectors, attachments Multiple coordinated improvements across the event pipeline, UI, connectors and attachment handling: - PresentationEmitter: serialize all BufferedEmitter mutations via an ordered mpsc channel (PushSegment/PushCorrection/Finish) to eliminate tokio::spawn ordering races; ensure ordered finish and wait for worker/tick loops. - Event wiring: add RoutingDeltaSink and wire PresentationEmitter into the controller event pipeline (set_assistive_session moved earlier) so deltas route consistently to the proper overlay; convert toggle/utterance callbacks to use PresentationEmitter. - Transcription pipeline: track last_raw_text for final events, avoid emitting VadEnd when no final utterance was produced, and abort stale correction tasks to avoid leaks and suffix corruption. - UI fixes: safer ObjC memory balance (release attributed strings), create stable monospace font (JetBrainsMono fallback) to avoid font degradation, guard split view divider calls with respondsToSelector, ensure AppKit calls run on main thread (use Queue::main) and avoid holding overlay locks during AppKit operations, plus minor pointer-safety fixes for action handler. - Voice chat overlay API: commit attachment fingerprints under the same lock to avoid races when sending; minor thread/handler safety changes. - Attachments: add MAX_ATTACHMENT_BYTES (50MB) and warnings for oversized files, provide is_oversized(), safer clipboard filename sanitization, move-old-files-to-trash fallback during cleanup, improve sanitize_filename to strip leading dots; add unit tests for chip_label and sanitize_filename. - Connectors: introduce a shared HTTP client (shared_client) for pooling and consistent config; GitHub connector now percent-encodes path and params, streams responses with size checks, logs limited debug body and uses shared client; web connector gains SSRF protections (block private/internal hosts, redirect revalidation), streams response chunks with size checks, and adds tests covering SSRF and HTML edge cases. - Misc: small migrations (DOUBLE_TAP_INTERVAL_MS), additional pipeline/pipeline-contract tests for unicode/emoji deltas. These changes address ordering/race conditions, resource safety, UI stability, size/security limits for remote fetches, and add tests to prevent regressions. [ok-commit] * feat: Add ONNX STT adapter; refactor tray & changelog Introduce an experimental ONNX Whisper adapter and wiring to let the app select an active STT engine via CODESCRIBE_STT_ENGINE=onnx. Add onnx_adapter::transcribe_long, engine init, mel pad/trim to fixed 3000 frames, 30s chunking with 5s overlap, CPU/CoreML EP selection, and quantization override via CODESCRIBE_ONNX_QUANT. Add core/stt helpers (init_active_engine, transcribe_long) and route quality report and transcription calls through the active engine. UI/tray cleanup: remove legacy tray-based AI formatting toggle, make status glyph getter private, and simplify exported menu API to reflect moving settings into the Settings window. Update CHANGELOG with notes about tray/menu/settings and the ONNX engine. Misc: improve some internal logging and a test assertion formatting tweak.[ok-commit] Add ONNX STT routing and macOS Tahoe fix Inject macOS workaround and unify STT engine routing. - macOS: add ensure_layout_region_guides_exists to inject a stub layoutRegionGuides method into NSVisualEffectView (Tahoe beta workaround) and call it early in tray init to avoid AppKit crashes. - STT routing: change get_adapter() to return Result and automatically init ONNX on first use; add engine-level router helpers (transcribe_chunk, try_transcribe_long) so pipeline can call a unified API regardless of engine. - Pipeline: switch chunk/utterance transcription to use the new stt router functions instead of locking engine internals directly. - ONNX adapter: major refactor and robustness improvements — dynamic token resolution from tokenizer.json, proper no-speech softmax check, suppress-blank tokens, no-repeat n-gram blocking, min-tokens-before-EOT, full-sequence decoding (no KV cache), Once-based init with cached error, safe config loading, exposed transcribe_chunk / try_transcribe_long, and final deduplication of repeated output. Added integration/utility tests. - Whisper exports: expose dedup_repetitions for reuse. These changes make ONNX behavior closer to the candle engine, improve error handling and startup, and add a targeted macOS fix to prevent missing-selector crashes.[ok-commit] Add ONNX Whisper adapter (CoreML EP) Introduce an ONNX-based Whisper STT adapter and wiring to select it at runtime. Adds core/stt/onnx_adapter.rs which implements an OnnxWhisperAdapter (TranscriptionAdapter) backed by a global ENGINE singleton, exposes init() to load ONNX encoder/decoder sessions (preferring CoreML EP), tokenizer, and mel filters, and provides chunked transcription, greedy decoding, mel-filter computation/loading, and helpers for model resolution (env override / HF cache). Register the new module in core/stt/mod.rs and add a get_adapter() that selects the ONNX adapter when CODESCRIBE_STT_ENGINE="onnx" (defaults to the existing WhisperSingletonAdapter). Also enable ort's CoreML feature in core/Cargo.toml. Tests for mel filters and language tokens are included. Note: callers must call onnx_adapter::init() before using the adapter. [ok-commit] * [ok-commit] fix(review): address PR #20 critical and security feedback * [ok-commit] fix: resolve critical PR20 review findings * [ok-commit] fix: apply timeout and cleanup policy decisions * [ok-commit] feat(settings): add voice lab and tune robust transcription defaults * Validate Voice Lab inputs; tweak Whisper params Add robust validation and parsing for Voice Lab fields and use an environment snapshot when building the UI. Introduces helper parsers (parse_ranged_f32/u64/usize), voice_lab_value_from_snapshot, and validate_voice_lab_value with per-key rules. Update UI: collect env snapshot, use it for initial checkbox/text values, change subtitle wording to reference config, add an apply hint label, and enforce validated values on change (persisting only validated values and updating the field UI). Add unit tests covering numeric validation and empty-value policy. Also adjust default Whisper DecodingParams to be slightly more conservative: increase no_speech_threshold to 0.72 and lower compression_ratio_threshold to 2.2 (with comments explaining rationale).[ok-commit] * Validate Voice Lab inputs; tweak Whisper params Add robust validation and parsing for Voice Lab fields and use an environment snapshot when building the UI. Introduces helper parsers (parse_ranged_f32/u64/usize), voice_lab_value_from_snapshot, and validate_voice_lab_value with per-key rules. Update UI: collect env snapshot, use it for initial checkbox/text values, change subtitle wording to reference config, add an apply hint label, and enforce validated values on change (persisting only validated values and updating the field UI). Add unit tests covering numeric validation and empty-value policy. Also adjust default Whisper DecodingParams to be slightly more conservative: increase no_speech_threshold to 0.72 and lower compression_ratio_threshold to 2.2 (with comments explaining rationale).[ok-commit]
* fix(vad): bury VadWorker singleton, replace with local AccumulatingVad VadWorker had three fatal bugs that killed live transcription after ~1.2s: - Initial probability 1.0 (not 0.0) bypassed seen_speech gate on first frame - No sample accumulation: 1024@44100Hz → 371@16kHz < 512 CHUNK_SIZE → predict() always returned 0.0 - Fire-and-forget stale AtomicU32 values Replaced with local-instance architecture: - AccumulatingVad: SileroVad + Resampler + proper chunk accumulation (init prob 0.0) - RecorderVad: dedicated thread for cpal Fn callback compatibility - ConversationEngine: local AccumulatingVad for Moshi flow Removed ~250 LOC of global singleton (OnceLock, Mutex, mpsc channel, VadMessage enum). Added ~100 LOC of correct local-instance code. Rewrote e2e_vad_flow tests (21 tests) for AccumulatingVad API. VibeCrafted with AI Agents (c)2026 VetCoders Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add Silero VAD extraction and use in CLI Introduce a Silero VAD pre-filter (vad::extract_speech) and expose VadExtractStats from core/vad. The VAD extractor runs over 500ms windows, returns concatenated speech-only samples and stats (speech_pct, windows, sparkline), and falls back to the original audio if the model is unavailable or filters everything. Update bin/codescribe to always load audio, run the VAD pre-filter, print VAD stats, and use the speech-only samples for language detection, streaming transcription, and non-streaming transcription. Export extract_speech and VadExtractStats from the public vad_api. * feat(ui): add Engine tab to settings; fix VAD test assertions Engine tab (5th sidebar tab) shows read-only runtime status: STT engine (candle/onnx), Whisper model, Silero VAD, TTS, Embedder. Green/orange dot indicators, monospace values, env hint. Fix 3 VAD tests: synthetic sinusoids don't trigger Silero (neural network recognises formant structure, not pure tones). Changed assertions from prob>0.1 to valid range [0,1] — real audio tests already cover speech detection accuracy (18/18 pass). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(engine): add Engine tab data source tests 6 tests verifying Engine tab can read runtime status: - STT engine env var (candle default, onnx switch) - Whisper embedded status API - Silero VAD availability (embedded or user path) - Embedder API existence (lazy init) - TTS embedded status API Co-Authored-By: Klaudiusz <the1st@whoai.am> * Promote env vars to settings, trim Voice Lab Move many previously .env-only configuration keys into user settings and wire up loader/migration logic so settings.json becomes the source of truth. Added new UserSettings fields for LLM formatting, local STT, STT endpoint, transcript/send/audio controls, quick notes, history/start-at-login flags, and several "Voice Lab survivor" UX knobs (buffer_delay_ms, typing_cps, emit_words_max, buffered_interim_sec, whisper_model, backend_max_upload_mb). Updated Config::load and migration code to read/write these values, promote them to runtime env vars when appropriate, and handle parsing/setters for strings, u64, f32 and booleans. Simplified the UI Voice Lab field list (reduced from 22 to 7), tweaked labels/descriptions (e.g. interim cadence), and removed various experimental/debug Voice Lab options. Co-Authored-By: Klaudiusz <the1st@whoai.am> * Use f32 for typing_cps and require Silero VAD Convert CODESCRIBE_TYPING_CPS to f32 across the codebase so fractional typing CPS values are supported (settings, loader parsing, and migrate). Add an end-to-end test to verify decimal persistence. Make the local Silero VAD required (non-optional) in ConversationEngine: fail-fast on init, call feed() directly for speech probability, and reset the VAD on conversation reset. Fix UI bootstrap to use owned Strings (avoid Box::leak) and pass string references to add_row. These changes ensure correct numeric handling for typing CPS and enforce the presence of the Silero VAD for conversation mode.[ok-commit] * Manage RecorderVad thread and shutdown Track and cleanly shut down the VAD worker thread owned by RecorderVad. The tx sender is now an Option and a thread JoinHandle is stored so Drop can close the channel and join the thread (warning on panic). Call sites were updated to safely clone the optional tx, and Recorder::stop() now clears recorder_vad to ensure deterministic worker shutdown. This prevents dangling threads and ensures orderly shutdown of the VAD worker.[ok-commit] * (#22) Feat: Settings and pipelines overhaul * Add macOS onboarding and permission handling Introduce a first-run onboarding wizard for macOS and extend permission utilities and hotkey configuration. Adds a new ui::onboarding module (should_show_onboarding, show_onboarding_wizard) that guides users through language, API key, hotkey mode and required macOS permissions (Microphone, Accessibility, Input Monitoring, Screen Recording, Full Disk Access) with UI, polling for Full Disk Access, keychain persistence for LLM API key, and modal flow control. Update permissions.rs to query microphone via AVCaptureDevice, add screen-recording (CGPreflight/Request) and full-disk-access checks and request helpers, and provide a deeplink opener for Privacy settings. Add a HoldMods::None value and wire it through hotkeys (storage, getters/setters, logic paths and UI selection) to support toggle-only hotkey mode; update bootstrap to show the new "Disabled (toggle only)" option. Wire onboarding into app/ui exports and module declarations. Minor test and synchronization fixes (mutex around hold mode tests) and various UI wiring to persist chosen hotkey modes and settings. * Persist onboarding progress, add sidebar & locking Store and resume onboarding step index to a progress file and clear it when finished. Add a session lock file (with PID liveness check) to prevent duplicate wizard instances and ensure the lock is released. Implement sidebar UI with per-step labels/markers, adjust layout to center content, fix label alignment, and save progress on step advance/retreat. Also change daemon startup to check permissions instead of triggering request_all_permissions() to avoid prompting on launch. * Add macOS screen capture & refactor onboarding Add ObjC block support and NSScreenCapture usage: add the block crate dependency and include a Screen Capture usage string in the app bundle Info.plist. Implement synchronous microphone request flow on macOS using AVCaptureDevice::requestAccessForMediaType with an ObjC completion block and channel timeout. Make privacy settings opener public in the permissions module and update callers to use it. Refactor onboarding code to replace lazy_static/Once with std sync LazyLock/OnceLock, return &'static Class from class builders, mark the window as closable, and properly release Objective-C objects when the onboarding window closes. * Persist promoted IPC settings; UI & config fixes Persist certain promoted IPC settings into UserSettings instead of only updating env vars (adds is_promoted_ipc_setting and persist_promoted_setting). Refactor bootstrap UI to use named TAB_* constants and TAB_COUNT, update tab handlers and related tests/validation keys. Load FORMATTING_LEVEL from settings into the environment when absent and only set CODESCRIBE_BUFFERED_STREAM if the setting is present. Migrate TOGGLE_SILENCE_SEC from env into settings if available. Improve VAD robustness by logging a warning on AccumulatingVad init failure and reduce initial speech buffer reservation. Update e2e tests to validate embedded model availability by checking get_embedded_data() and model total_size() for Whisper and TTS. @gemini-code-assist review * Persist promoted settings; macOS permission fixes Multiple changes to improve settings persistence, macOS permission handling, onboarding, VAD behavior, and config safety. Highlights: - IPC: Track and persist promoted IPC settings into UserSettings (expanded mapping) and log keys on save failure. - Onboarding/UI: Persist user choices (language, AI formatting, hotkey mode) directly to UserSettings with error logging; safer lock handling; release window refs and reset UI state on close; refactor hotkey mode to write settings once and set runtime state/env vars. - macOS permissions: Revamped microphone request flow to dispatch request on main thread, use bounded polling with timeouts, and robustly handle callback channel results; improved full-disk & screen-recording status reporting and messaging. - CLI (bin/codescribe): Add --no-vad flag to skip Silero VAD; use Cow to avoid copying when skipping VAD. - Recorder/VAD: Increase audio channel buffer from 8 to 128 and tighten atomic memory ordering (Acquire/Release) to avoid races. - Config loader: Add safe_set_env validation to reject empty/oversized values and replace unsafe direct env writes in multiple places. - UI tweaks: Show filenames instead of full paths in engine UI. - Steps/constants: Simplify STEP_FLOW sizing and compute TOTAL_STEPS from array length. - Docs: Add environment registry entries for new STT/ONNX-related variables. Overall these changes improve reliability, reduce hangs on macOS permission prompts, make onboarding persistence more robust, and harden config/env handling. * Introduce AI retry policy, timeouts, and UI refinements Add a configurable AI retry/timeout policy and tighten AI HTTP client timeouts; refactor ai_formatting to use a RetryPolicy, per-attempt and inter-chunk timeouts, and a unified call_provider_once helper, and add env defaults and docs. Update tests to exercise retry and SSE inter-chunk timeout behavior. Improve macOS assistive selection handling by preferring Cmd+C fallback for certain browsers and passing frontmost app info. Add Tahoe-compatible glass effect detection and style handling, use glass/visual effect views where available, and adjust UI visuals (alpha, borders, window style). Make onboarding window larger and restyle titlebar/content, persist onboarding step before requesting permissions, and reposition/resize many onboarding elements. Enhance voice chat overlay with drag-and-drop support, file-url pasteboard fallback, and visual tweaks. Update .env.example and ENV_REGISTRY with new AI-related env vars and defaults. * Adjust onboarding UI layout & mic permission flow Update onboarding UI layout and summary sizing, and make microphone permission requests non-blocking. - app/ui/onboarding/mod.rs: - Tweaked description label frame (height/position) and summary view sizing by introducing SUMMARY_WIDTH/SUMMARY_HEIGHT constants. - Use computed positioning (center-based) and constants for summary layout; introduce summary_line_height and summary_top for clearer per-line positioning. - Adjusted summary label heights and summary_config origin. - Make microphone permission requests asynchronous: spawn a thread to call request_permission for Microphone, update onboarding state on the main queue, render the current step immediately to keep the UI responsive, and potentially schedule auto-advance if granted. - tests/e2e_retry_responses.rs: - Removed unused mockito::Matcher import and make mocks match the concrete POST path "/v1/responses" instead of Matcher::Any to ensure deterministic request matching in tests. These changes improve UI alignment and responsiveness when the system permission prompt is shown, and make tests more specific and reliable. * Promote settings, keychain secrets, Ollama timeout Centralize promoted env keys into a single PROMOTED_SETTINGS_KEYS list and add is_promoted_key; use that in Config loader and IPC persist logic to route GUI-managed settings to settings.json. Persist_config now avoids storing secrets in plaintext .env: secret keys (LLM_API_KEY, STT_API_KEY) are saved/removed via the keychain and .env is updated (set/remove) accordingly using a new EnvUpdate enum and persist_secret_setting helper. Add a dedicated CODESCRIBE_AI_OLLAMA_ATTEMPT_TIMEOUT_MS env var and wire an Ollama-specific per-attempt timeout into the AI retry policy/formatting logic. UI tweaks: ensure onboarding lock is always released via a Drop guard and handle panics from the onboarding modal; make colour alphas adaptive to glass effect and adjust scroll edge alpha; minor drag handler comment. Update docs and examples to document the new Ollama timeout env var and other registry entries, and expand promoted settings parsing to cover many additional keys and types.[ok-commit] * ui: migrate glass effect to typed objc2 and stabilize markdown bubble fonts * ui: unify settings and chat overlay glass hierarchy * ui: introduce unified top toolbar layout for settings * assistive: fallback to chat when selection context is missing * ui: refine chat input pill and fix settings titlebar duplication * Adjust macOS voice chat UI and window styling Reapply FullSizeContentView after window init to avoid AppKit falling back to separate titlebar/content regions (prevents a duplicate-looking top bar). In the voice chat overlay: align the input bar flush with the footer edge, remove heavy drop shadow in favor of a border-only look to match native NSSearchField, slightly tweak text area vertical positioning and height, and set the text container inset for better vertical centering. These tweaks improve visual parity with native macOS controls and fix a duplicated titlebar artifact. * Fix chat SSE streaming and hotkey/runtime regressions * Enforce streaming; refine hotkeys and overlays Make streaming mandatory for LLM formatting and update tests to use SSE fixtures. Harden macOS Option-tap detection by tracking the option side (left/right) and rejecting mismatched or non-keycode releases. Stop re-applying hotkey atomics on IPC config reload (UI sets them synchronously) and consolidate env writes when updating multiple hotkey settings. Add a concurrency guard for bootstrap overlay creation and defer vertical scroller enabling until document height is known. Introduce a header-record CTA (and wire it to the header button) and display keyboard shortcuts inline in the voice chat UI instead of a modal alert. These changes reduce races, improve UX consistency, and tighten gesture handling. * Fix overlay/tab behavior and response ID Keep UI overlay and assistive session state in sync and improve LLM streaming handling. - app/controller/mod.rs: ensure assistive session flag is cleared via set_assistive_session(false) when a recording finishes. - app/ui/voice_chat/api.rs & handlers.rs: centralize Settings-tab routing through update_active_tab_impl, hide chat overlay before showing bootstrap/settings to avoid stacked/ghost windows, avoid spawning the overlay if already visible, focus agent tab on show, and ignore shortcut actions when overlay is hidden. - core/llm/ai_formatting.rs: capture response_id earlier from stream metadata (chunk.response) to handle providers that emit it before completion, stop relying on completed chunk to set the id, and log/warn if the SSE finishes without a response_id (preserving previous id when available). These changes prevent duplicate windows/ghost overlays and make response ID tracking more robust across varying stream chunk orders. * Broadcast engine events and timestamped transcripts Introduce IPC event broadcasting and segment-level transcripts across the pipeline. Add IpcEvent/IpcEventPayload/EngineEventWire types and an IpcBroadcastSink that sends sanitized EngineEvent objects (with RFC3339 timestamps) over a tokio::broadcast channel. RecordingController now owns an event_broadcast channel, exposes subscribe_events, and sends StateChange events when state transitions occur. IPC server handles Subscribe/Unsubscribe at connection level and streams Event responses to subscribers. Implement FanoutEventSink to forward events to multiple sinks and wire it in so presentation + IPC sinks both receive engine events. Propagate segment metadata end-to-end: introduce RawTranscript/TranscriptSegment support and thread it through transcription workers, adapters, and engines. ONNX and Whisper adapters/engines now produce RawTranscript (text + segments), add whisper timestamps parsing helpers (core/stt/whisper/timestamps.rs) to extract segment timestamps from tokenizer timestamp tokens, and add relevant decoding params (emit_timestamps). Export transcribe_with_segments in core/lib. Small tests added for FanoutEventSink and updated event/drop kinds serialization. These changes enable external subscribers to receive real-time engine events and state changes and provide segment-level timing for transcripts. @gemini review @codex review * Recover stale recorder, improve IPC & timestamps Handle stale recorder state and tighten event pipeline semantics. Controller: add test helper publish_ipc_event_for_test, recover_stale_recorder_if_idle, a serial lock for start/stop, and retry logic for "Recording is already in progress" races; transition states earlier to avoid IDLE/active races. Audio: expose Recorder::is_active, StreamingRecorder::is_recording, and self-heal a stale is_recording flag on start. Pipeline: accumulate and adjust segment timestamps across interim slices so UtteranceFinal emits correct segments. Whisper timestamps: ignore unclosed trailing tokens and add unit tests. IPC & config: add IPC event-stream docs and server tests, add core/ipc types tests to ensure raw_text is not leaked and payloads are tagged, and skip saving settings when unchanged to avoid unnecessary writes. * Support AI reasoning channel and UI messages Introduce explicit reasoning channel support in the AI formatting pipeline and surface reasoning summaries in the UI. - core/llm/ai_formatting.rs: Add ProviderOutput with assistant_text and reasoning_text, StreamChannels type, AiReasoningCallback, and a new format_text_with_status_channels API (format_text_with_status kept as a wrapper). Parse provider outputs into separate assistant and reasoning channels (including SSE streaming handling and Ollama/Responses API paths) and propagate reasoning_text through the result. - app/controller/helpers.rs & app/controller/mod.rs: Call the new channels-based API and display reasoning summaries in the voice chat/overlay as system messages when present. - docs/ADR/2026-02-15-CODESCRIBE_RUNTIME_IN_VISTA.md: Add an ADR describing CodeScribe + Vista integration boundaries and migration plan. These changes enable streaming and delivery of separate reasoning summaries from LLM providers to the frontend while preserving existing assistant text behavior. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Klaudiusz <the1st@whoai.am>
Introduce ActionQualityProbe and wire stream postprocess stats into controller logging; add debug tracing for Preview/Correction/UtteranceFinal events. Refactor the transcription overlay: replace plain text field with a scrollable text view, add header/status layout, canonical status labels, layout metrics/throttling, and smarter resize/scroll logic. Add a decision-mode action contract (raw_text + last_pass_text) and update Copy/Augment/Save handlers to use it (with clipboard error handling and handoff to voice chat). Update many UI constants and tests to cover probe and layout behavior.
Stop emitting and retaining degraded "flush fallback" audio when the VAD never fires Start. Removed the FALLBACK_PROB constant, the last_flush_fallback flag and its accessors, and the logic that retained extra raw audio or emitted a VadFallback event on flush. Instead, flush() now drops silently when no segment was started. max_speech_prob semantics were tightened (it now represents peak since the last completed segment and is cleared on successful segment emission), and raw buffer trimming was simplified. Updated pipeline streaming code to stop emitting VadFallback and removed redundant counter increments (comments note they're counted elsewhere). Tests were adjusted to expect drop-on-flush and a new regression test ensures completed segments reset peak state. The EngineEvent doc was updated to mark VadFallback as a legacy/disabled event for wire compatibility.
Renames UI labels from "chat overlay" to "agent" (bootstrap, tray, tests) and adjusts overlay behavior so action buttons remain visible in decision mode. Improves voice chat controller UX by changing local STT final-pass env var semantics (CODESCRIBE_LOCAL_STT_FINAL_PASS now defaults to disabled and matches truthy values), adding streamed reasoning/response callbacks and incremental status updates (Finalizing/Reasoning/Answering/AI Response percentages). Onboarding: adds requested_permissions tracking and recheck flow for Full Disk Access, refactors permission mapping and status text/instruction logic to surface clearer messages (e.g. Recheck/Ready states) and to show contextual instructions. Saves progress before invoking TCC and starts polling when rechecking FDE. Shared helpers: adds markdown table detection and uses full markdown parsing when table syntax is present to avoid rendering issues; includes tests. Minor overlay and UI tweaks to improve clarity and user experience.
Add robust handling for hold/toggle recorder start/stop races and centralize hotkey/runtime config. Introduces a monotonic hold_start_generation to invalidate stale delayed hold-start tasks, clearer preflight/cleanup helpers (clear_recorder_callbacks, ensure_recorder_ready_for_start, reset_session_after_start_failure), and tighter serialization around recorder recovery. Unify runtime pipeline to always use the event-based path and add dedicated configuration of event sinks for hold vs toggle flows. Hotkeys module: encode/decode enums, expose a HotkeyRuntimeConfig, apply_hotkey_config, hold-start delay APIs and a new HotkeyDetector to better detect taps/flags changes and gestures. IPC now applies hotkey config via apply_hotkey_config. Add unit/tests covering transcription action contract resolution, rapid hold/toggle race scenarios and session reset behavior.
Introduce a NoSpeech EngineEvent and propagate handling across UI and recording sinks to clear preview state when no speech is detected. Improve VAD behavior: extract_speech now returns empty for no-speech or VAD-unavailable cases, keeps only contextually relevant trailing fragments, and exposes telemetry; SpeechSession tracks VAD predict/unavailable error stats and exposes take_vad_error_stats. Emit warnings/events when VAD degrades. Integrate an STT scheduler to serialize/track live/commit/refine requests (replace raw spawn handles with scheduler task handles) and add graceful shutdown/submit error handling. Harden Whisper engine: skip empty audio, apply compression dedup, compute avg logprob, and add a combined quality gate to drop low-quality transcripts. CLI and file transcribe paths skip/no-op when no speech. Add tests for the new behaviors and a few logging/debug improvements.
Add session-level telemetry capture and a SessionTelemetrySink to record NoSpeech and Stats events (shared via Arc<Mutex>). Integrate telemetry into RecordingController: snapshot/reset helpers, per-session storage, and include the sink in recorder event fanout. Introduce start_transition_in_flight flag (AtomicBool) and AtomicFlagGuard to prevent idle-recovery races during session start. Implement quality-gate evaluation and commit-trigger propagation through new TranscriptProcessOutcome/ProcessRecordingOutcome types; wire commit decisions into UI/decision-mode behavior. Update StreamingRecorder to use event_sink API, add a Live CLI event sink, enable core offline_eval feature, tweak hotkey manager and tray shutdown handling, adjust settings UI opacity, and add unit tests for telemetry, quality gate, and delta-first guards.
Decouple audio ingestion and inference by replacing single in-flight STT handle with a FuturesOrdered inference pipeline, configurable concurrency, and Pending/Utterance work item separation to avoid VAD backpressure and reduce dropped utterances. Implement robust overlap/dedup logic: add normalized/fuzzy word-overlap detection with bounded word edit distance, fallbacks for suffix stripping, and tests for punctuation/typo cases. Ensure PresentationEmitter drains before dropping event sink in StreamingRecorder stop/finish (3s grace loop) to avoid losing queued transcript text. Disable Whisper timestamp emission by default pending A/B WER validation. Add related tests and telemetry/warning adjustments.[ok-commit]
… utterance gating - Updated hallucination filtering mechanism to include language-specific patterns and short utterance gates based on confidence thresholds. - Refactored `is_hallucination` to handle additional Polish-specific hallucinations and introduced new constants (`MIN_UTTERANCE_SEC`, `SHORT_UTTERANCE_LOW_CONFIDENCE`, `MAX_WORDS_PER_SEC`). - Added utility functions to compute word rate and identify Polish language detection for enhanced filtering. - Integrated short utterance and word-rate anomaly gates into the transcription flow to drop low-confidence or anomalous segments early. - Updated pending utterances logic to include speech probability metadata for better gating in transcription logic. - Introduced tests for hallucination detection, word rate validation, and short utterance gating to improve reliability. - Streamlined event processing by adding appropriate reasons for dropping segments into `EngineEvent::Drop`. - Ensured hallucination filters propagate through different stages of transcription (`postprocess`, event handling, and buffer workers) for pipeline consistency. Minor: - Refined assistive mode behavior in voice chat overlays to respect explicit utterance boundaries. - Reduced toggle complexity in overlay interactions to simplify codepath. - Updated project documentation by removing deprecated `AGENTS.md`.
Track partial-pass/refinement runs and per-event Silero VAD speech samples across the pipeline. Added new telemetry counters to SessionEngineStats, EngineEventWire, and EngineEvent (partial_runs_total, trigger_*_count, partial_*_count) and propagate them to emitters/tests. core/audio/chunker now records Silero-positive VAD sample counts per emitted speech event and exposes take_event_speech_vad_samples. core/pipeline/streaming implements partial-pass trigger logic (utterance/speech/watchdog), enqueue/backpressure behavior for pending utterances, scheduling/coalescing/dropping of refine submissions, and emits partial telemetry. core/pipeline/dedup refactored fuzzy-overlap parameters into OverlapParams with a live-mode stripping function and related tests. Added logging and tests exercising the new behavior.[ok-commit]
Log additional partial_* counters in RecordingController NoSpeech telemetry for better session diagnostics. Remove TIMELINE_REPORT.md. Apply formatting and table fixes across ADR and overlay docs, adjust example numeric formatting in ipc-event-stream, and make minor whitespace updates in CHANGELOG for clarity.[ok-commit]
Refine Supervisor VAD flush behavior and stabilize partial-pass scheduling. Add supervisor_emit_range to safely compute emit windows (preserve preroll when nothing new), fix bookkeeping of pending speech VAD samples, and adjust flush/emit logic to avoid re-emitting already-sent audio. Improve VAD index/drift tests and add a variety of unit and async tests covering busy flush, preroll emission, pending-utterance queue policies, and partial-pass coalescing under scheduler pressure. In the streaming pipeline, snapshot last_suffix at utterance boundaries and introduce window_text/window_rev to make stale-correction guards survive FINAL boundaries. Also stop retry loops on non-retryable cloud errors and add deterministic mock tests for cloud transcription and opt-in test helpers for E2E STT.[ok-commit]
Ensure panel junctions render cleanly by adjusting corner radii and masked corners. In app/ui/bootstrap/mod.rs, set cornerRadius=0 and masksToBounds on the topbar, sidebar, and content layers so inner sections stay flush with the root window rounding. In app/ui/voice_chat/mod.rs, add two missing masked-corner constants and update masked corners for the header, sidebar, and content layers to preserve only the intended outer edges. These changes prevent overlapping rounded arcs at panel intersections and improve visual consistency.[ok-commit]
app: Introduce PreviewUpdate and preview_update to compute whether an incoming preview is a noop, an appended segment, or a correction. Route divergent previews as PushCorrection to avoid garbled overlay text and only push incremental suffixes for prefix growth. Add unit tests for the preview diffing logic. bin: In live transcription, create a per-session transcript log file (~/.codescribe/logs/live_TIMESTAMP.log), auto-open it in Console.app, and disable recorder auto_silence so the session runs until Ctrl+C. Wrap the CLI event sink with LiveLogEventSink to append UtteranceFinal lines to the log, write a session footer on shutdown, and print the saved transcript path.[ok-commit]
Update workspace and package versions from 0.7.17 to 0.7.18 in Cargo.toml and refresh Cargo.lock to match (including codescribe and codescribe-core). Prepares the crate for the 0.7.18 release. [ok-commit]
In scheduler_worker, capture the request lane and run batch VAD for requests on the Commit lane. If VAD yields no speech, return an empty RawTranscript early; otherwise pass the speech-only buffer to the blocking infer call. Non-commit lanes continue to use the original samples. Adds logging for empty results and speech/total stats to reduce noisy/silent inputs to the STT model.
Introduce a unified "setup" sentinel and flow (should_show_setup) that migrates legacy onboarding/bootstrap sentinels and drives the Settings/Setup tab. Add Permission UI in the setup view (labels, action buttons, polling, handlers to request/open system settings) and wire new ObjC action methods to handle permission actions and opening System Settings. Update tray menu to show a dynamic "Complete Setup..." item and remove it once setup is complete, and add a helper to focus the Settings setup tab. Refactor onboarding lifecycle/window behavior (non-modal flow, close handling), expose permission helpers (permission_status, open_permission_settings, request_permission), and update tests to reflect setup semantics. Also add several unit/integration tests in core/pipeline/streaming, adjust STT scheduler VAD handling to skip Silero VAD for very small buffers, and update daemon startup to not trigger onboarding prompts on launch.[ok-commit]
Release the held `state` lock in attach_settings_view by calling `drop(state)` before invoking permission-related functions. This prevents a potential deadlock when refresh_permission_indicators() and start_permission_polling() run while the lock is still held.[ok-commit]
Introduce timestamp-based overlap deduplication and enforce VAD prefiltering for final commits. Added strip_segment_overlap (with a small epsilon tolerance) and integrated it into the streaming pipeline via a new last_segment_end_ts cursor and segment-aware postprocess APIs. Scheduler: add a CommitPrefilterFn, always apply VAD-prefilter on the Commit lane (default_commit_prefilter), and update worker to skip inference when prefilter returns empty. Enabled timestamp emission by default in Whisper decoding params and added corresponding tests. Also replaced skip-return guards in audio tests with explicit assertions and added VAD/e2e tests to validate silent-callback behaviour and scheduler/commit prefilter behaviour.[ok-commit]
Introduce a new User tab to the bootstrap settings and add an "Ultra Quality" toggle for a slow final STT pass. Add TAB_USER and increase TAB_COUNT; wire up onTabUser and onUltraQualityToggled in the Objective-C action handler. Move quality/autotune controls out of the Setup layout into a dedicated User view (build_user_tab), update state to track ultra_quality_checkbox, and centralize checkbox row creation with ToggleRowSpec and add_toggle_row to reduce duplication. Also include minor UI text/layout tweaks, reorder imports, switch to TAB_COUNT-based arrays, and small threading/style cleanups.[ok-commit]
Introduce a new SHOW_DOCK_ICON preference with end-to-end support: persist it to environment variables, load it from env/promoted user settings, and map it into Config. Add a checkbox in the user preferences UI and an Objective-C action handler that saves the setting and applies it at runtime. Implement apply_dock_icon_visibility on macOS to toggle NSApplication activation policy (Regular vs Accessory) and set the dock icon image when appropriate; provide a no-op on non-macOS. Export apply_dock_icon_visibility via app/lib, call it on startup, and add tests for config env override and dock policy mapping. Behavior is best-effort because some launch modes may refuse activation policy changes; such cases are logged but not fatal.[ok-commit]
Add a toolbar delegate and a "Show Agent" toolbar item; wire NSToolbar into the settings window and handle its action. Introduce layout constants and helpers (setup_content_height, autosize_tab_document_view, wrap_tab_content_in_scroll_view) to autosize tab documents and wrap tab content in NSScrollView so large tabs are scrollable. Replace the old topbar with a single root glass panel and explicit sidebar/content containers, reorganize subviews into these containers, and convert per-tab views to scrollable document views. Replace ad-hoc NSColor usage with new ui_colors helpers (secondary_label, control_bg_tint, accent, accent_tint, status_granted/denied/warning) and use ui_tokens for sizing and corner radii to standardize styling. Other tweaks: adjust window title/subtitle, disable toolbar customization, refine spacing and sizing constants, and simplify sidebar tab button styling. These changes improve layout robustness, visual consistency, and support overflow content in the settings UI.[ok-commit]
Define NSTOOLBAR_FLEXIBLE_SPACE_ITEM_IDENTIFIER and use ns_string(...) when adding the flexible-space toolbar identifier instead of calling NSToolbarItem::flexibleSpaceItemIdentifier. This matches AppKit's API (the flexible-space identifier is a global constant, not a class selector) and removes an unnecessary NSToolbarItem class lookup. Also adjusted import ordering for the TAB_* identifiers.[ok-commit]
Introduce an Apple SpeechAnalyzer STT backend and a Swift bridge, plus various UI glass-effect improvements. Added core/stt/apple_stt (Rust adapter) and a Swift bridge executable (codescribe-stt-bridge.swift) with README; wired selection via CODESCRIBE_STT_ENGINE (apple|onnx|candle) and graceful fallback to Candle/Whisper. Update core/stt to route to Apple or ONNX engines and initialize appropriately. Implemented bridge spawn/probe, temp WAV helper, timeout handling, and platform/version checks. UI changes: group glass panes into a container, add helpers set_glass_effect_content_view / set_glass_container_content_view, create_glass_effect_container_view, and new button_style::GLASS; updated bootstrap, overlay, and voice_chat to mount content into glass contentViews and use GLASS button style in places. Other changes: quality_report selects assets by engine, added serial attribute to two tests, optimization of glass runtime checks (OnceLock) and additional runtime logging/probing. Overall enables on-device Apple STT support and improves liquid glass integration in the UI.[ok-commit]
Introduce a categorical silence gate and VAD-first buffering to avoid Whisper hallucinations on silence, and merge lexicon mispronunciations from extras. - core/pipeline/streaming.rs: added [ok-commit]DEFAULT_INTERIM_VAD_ACCUMULATE_SEC and MIN_SPEECH_RATIO_FOR_INFERENCE constants; implemented should_drop_silence_chunk to gate interim chunks by Silero speech ratio; added interim VAD accumulation buffer and logic to run vad::extract_speech on accumulated audio before enqueueing inference work; ensure final emissions always bypass the gate; added interim_vad_accumulate_samples helper and unit tests for the silence gate; updated pending-utterance enqueue/flush logic and logging/events for backpressure and drops. - core/pipeline/stream_postprocess.rs: added LexiconExtras struct and merged mispronunciations from entry.extras into the rule-loading path (handles legacy format differences); added unit tests verifying extras handling and overall lexicon size expectation. - core/audio/streaming_recorder.rs: added an integration-style test (test_silence_gate_on_data_assets) to exercise the silence gate on local data_assets WAV files and report dropped/kept chunks. These changes aim to reduce false positive transcriptions on silent/interim audio by using Silero as a binary classifier and delaying inference until speech is confirmed, plus fix lexicon parsing for entries that store mispronunciations under extras.
Clean up legacy environment flags and docs, add a per-thread Silero VAD cache, and small CLI/build adjustments. Changes: - Removed legacy env fallbacks and flags from code, examples, docs and env registry (e.g. CODESCRIBE_UTTERANCE_*, CODESCRIBE_VAD_ITER, CODESCRIBE_APP_DIR, CODESCRIBE_NO_EMBED_WHISPER, CODESCRIBE_EMBED_E5, CODESCRIBE_EVENT_PIPELINE, CODESCRIBE_ENV_TEMPLATE, LOG_STDOUT, etc.). Tests were updated to reflect the removed env keys. - core/vad: introduced a thread-local cache for AccumulatingVad (take_extract_vad/return_extract_vad) to avoid reloading the ONNX model on every extract_speech() call; cache invalidates on sample-rate change. - core/audio/chunker.rs: removed legacy env fallback parsing and the env_bool helper used for removed flags; adjusted tests accordingly. - core/config/loader.rs: dropped support for overriding config dir via CODESCRIBE_APP_DIR; now only CODESCRIBE_DATA_DIR is supported. - bin/codescribe.rs: prefer CLI language flag and fall back to settings.json whisper_language when starting live transcription. - core/build.rs and scripts/build-dmg.sh: removed legacy CODESCRIBE_NO_EMBED_WHISPER handling and updated build script env handling for embed TTS/E5. - Updated .env.example, docs/ENV_REGISTRY.toml, docs/ADR and docs/env.md to remove references to deprecated env vars and reflect the new behavior. Rationale: remove deprecated configuration baggage, centralize behavior around current env vars, and improve runtime performance by caching the VAD model per-thread.[ok-commit]
Centralize Silero VAD defaults in core/vad/config.rs and stop using CODESCRIBE_VAD_* environment overrides. The VAD default constants and VadConfig::default() are now Silero-derived, recorder/chunker/gating logic use those hardcoded values (gate mode fixed to Supervisor, speech_pad mirrors pre_roll), and env-based parsing/overrides were removed or simplified. Update touches: core/vad/config.rs, core/audio/chunker.rs, core/audio/recorder.rs, core/config/*, app/controller, tests, docs, examples and helper scripts to reflect the new single source of truth and remove runtime VAD env knobs.[ok-commit]
Introduce first-class work modes and per-mode shortcut bindings, plus macOS symbolic hotkey conflict detection. Added WorkMode, ShortcutBinding and ModeBinding types, default bindings, and conversion helpers to map legacy HOLD_MODS/TOGGLE_TRIGGER to the new mode_bindings model. Persisting and migration logic updated (settings schema bumped, normalization, and legacy sync in loader/settings), with tests covering migrations and mapping behavior. UI changes: settings and onboarding labels updated, new mode binding recorder UI and handlers (start/record/apply bindings), runtime refresh hooks, and a hotkey conflict indicator driven by a new macOS shortcut_registry module. The macOS module reads com.apple.symbolichotkeys.plist via plutil, detects collisions with modifier-only gestures, and is integrated into the bootstrap to surface warnings. Additional housekeeping: updated imports/usages and tests.[ok-commit]
Simplify and rework the hotkeys/settings UI and handler logic: remove legacy hold/toggle/preset popups and related state/handlers, introduce a compact "Capture tuning" section with Disable and Double Ctrl quick actions, and add MODE_DISABLE_TAG_OFFSET and helper decoders (mode_from_disable_tag, mode_from_double_ctrl_tag). Update binding parsing to use the CONTROL flag path and streamline onModeBindingChange to handle start/disable/quick-bind cases. Adjust layout/text for recorder hints and mode hints, and update tests to validate the new mode-binding contract (mode-first, double-ctrl behavior) and helper functions.[ok-commit]
Introduce a "View conflicts" button and dialog to show detailed hotkey conflict info. Adds a new state field (keys_conflict_details_button), adjusts hotkeys tab layout to make room for the button, and wires an Objective-C action (onShowHotkeyConflicts) that displays an NSAlert sheet with conflict details. Refactors conflict detection into hotkey_conflicts and hotkey_conflict_status_from, adds hotkey_conflict_details_text to format a multi-line report, and enables/disables the details button according to whether conflicts exist. Updates apply_hotkey_conflict_indicator to accept the button pointer and toggles its enabled state. Also adds tests for the conflict-details formatter.[ok-commit]
Refactor the bootstrap/settings UI: rename and reorganize tabs (Modes & Shortcuts, AI & Prompts, Audio & Input, Quality, Diagnostics, Advanced), add a prompt editor (type popup, editor, load/save/reset, status/path labels), and move capture timing controls into an Advanced/Voice Lab area. Extract clear_bootstrap_ui_state() to centralize state clearing and update state struct with new UI fields. Provide compatibility adapter builders for new tab names that reuse existing implementations. Simplify sidebar/tab button labels and icons, update tab switch handlers, and adjust related UI strings. Update tray integration: remove prompt-related and several macOS-specific privacy/menu actions, and route tray settings action to open the new settings tab. Other changes: add new core/agent modules and modify core/quality loop and bin/codescribe_loop (minor updates not shown here) to align with these UI and architecture changes.[ok-commit]
- Added new dashboard refresh hooks (`refresh_quality_dashboard`, `refresh_diagnostics_dashboard`, `refresh_prompt_editor_labels`) for real-time updates to the UI. - Introduced utility functions to manage prompt editor state: `set_prompt_editor_content`, `read_prompt_editor_content`, `set_prompt_editor_status`, `refresh_prompt_editor_labels`, among others. - Added handlers to properly update diagnostics, hotkey conflicts, and quality indicators based on current configuration and state. - Enhanced the Quality tab with richer data (availability, pending mismatches, last check, report links) and toggle controls for auto-tune and ultra-quality settings. - Implemented a Diagnostics tab with permission matrix, hotkey conflict indicators, and quick-refresh actions. - Reorganized related tab-builder code to harmonize with the previously refactored UI structure.
…dling - Introduced `read_clipboard` and `write_clipboard` tools to interact with system clipboard content (text and images). - Added `get_selected_text` and `get_frontmost_app` tools to retrieve selected text and active application details respectively. - Updated `app/agent/tools` module to register all tools at once using a unified `register_all_tools` function. - Refactored diagnostics tab with `onDiagnosticsRefresh` and `onCopyDiagnostics` handlers for quick-refresh actions. - Enhanced prompt editor with new actions for loading, saving, and resetting prompts, and utility functions like `save_prompt_content` and `reset_prompt_content`. - Integrated `async-trait` crate for ergonomic async trait usage in the agent. - Added a new `AgentSession` struct in `core/agent/session.rs` to manage multi-step agent-tool interactions with reasoning traces and tool call orchestration. - Adjusted UI tab and handler structures in `app/ui/bootstrap` to incorporate new tools and diagnostics improvements.
- Added `OpenAiProvider` in `app/agent/openai_provider.rs` implementing the `AgentProvider` trait for streaming responses from OpenAI with support for tools, chunking, and timeout configurations. - Introduced `create_default_provider` and `create_openai_provider_from_env` functions in `app/agent/mod.rs` for initializing providers using environment variables. - Registered new tools in `app/agent/tools` for extended agent capabilities: - `read_file`: Read text files under a size limit. - `take_screenshot`: Capture and resize screenshots using macOS APIs. - `type_text`: Simulate keyboard input using clipboard paste for reliability. - Updated the `Cargo.toml` and `Cargo.lock` to include required dependencies: `serde`, `async-trait`, `base64`, `reqwest`, and `tokio`. - Enhanced prompt editing logic in `app/ui/bootstrap` with utility functions like `save_prompt_content` and `prompt_display_name`. - Refactored `
- Introduced new modules in `core/agent` for more robust agent functionality: - `provider`, `registry`, `session`, `types`, and enhancements in `thread_store`. - Added public exports for streamlined access to agent types, tools, and structures. - Implemented `content_block_to_value` and `value_to_content_block` for improved JSON serialization/deserialization of `ContentBlock` types in `thread_store`. - Reduced redundant code by centralizing serialization logic. - Updated `Cargo.toml` and `Cargo.lock` to add missing dependencies: `async-trait` and `base64`. - Added `nosemgrep` annotations in `filesystem` methods to clarify security reasoning around path traversal handling. - Removed unused `agent` module and trimmed redundant code in UI-related files: - Removed dead variants like `PermissionStatus::Unknown`. - Simplified UI logic in `bootstrap/mod.rs`. - Enhanced dependency handling across the project to prepare for future feature integrations.
- Introduced `validated_endpoint_url` function to ensure endpoint URLs are valid, supporting `http` and `https` schemes only. Added checks for empty URLs, malformed URLs, and missing hostnames. - Updated `stream` and `stream_agent_responses` methods to use sanitized URLs, replacing direct usage of unvalidated endpoints. - Added `nosemgrep` annotations to clarify security checks and prevent triggering false positives in linter tools. - Updated `ENV_REGISTRY.toml` with a new environment variable, `CODESCRIBE_AGENT_USE_PREVIOUS_RESPONSE_ID`, to control thread continuity in the OpenAI Responses API, with hot reload support.
- Simplified tray menu layout: removed unused submenus, reorganized items for clarity, and updated menu structure to reflect new agent and diagnostics options. - Deleted `submenus.rs` as it was unused and redundant. - Updated Silero VAD defaults: - Increased `SILERO_DEFAULT_MAX_SILENCE_SEC` to 0.3 and set `SILERO_DEFAULT_MAX_UTTERANCE_SEC` to 30.0. - Adjusted related tests to validate the updated constants. - Enhanced code comments and menu documentation for better maintainability.
Replace legacy hotkey env/fields (HOLD_MODS, TOGGLE_TRIGGER, HOTKEY_DOUBLE_TAP_*) with a canonical mode_bindings contract and runtime projection. - Introduce ModeHotkeyBindings and ShortcutBinding-based mode bindings; add runtime_projection to derive HoldMods/ToggleTrigger for the existing macOS hotkey engine. - Stop promoting/rehydrating legacy env keys; persist and read canonical mode_bindings in UserSettings and ignore legacy HOTKEY envs at runtime. - Update hotkey conflict detection and shortcut registry to operate on ModeHotkeyBindings instead of legacy fields. - Update onboarding/UI bootstrap to save/load mode_bindings and to apply projected runtime hotkey config; remove manipulations of legacy env vars. - Update Config loader to compute runtime hold/toggle values from mode_bindings and to ignore legacy env overrides for hotkeys; add tests covering the new behavior. - Adjust many tests and settings migration logic to ensure backward-compatible behavior while making mode_bindings the single source of truth. This consolidates hotkey configuration into a single canonical representation (mode_bindings) while providing a one-way projection for compatibility with the existing runtime engine.[ok-commit]
- Removed legacy `HOLD_MODS` and `TOGGLE_TRIGGER` settings, replacing them with `ModeHotkeyBindings` as the unified binding mechanism. - Updated configuration loading to only utilize `mode_bindings`, ignoring deprecated environment variables and fields. - Simplified runtime projection to derive `HoldMods` and `ToggleTrigger` where compatibility with legacy logic is needed. - Adjusted onboarding, permissions, and diagnostics logic to use the new binding approach, including enhanced hotkey conflict diagnostics. - Streamlined settings persistence, migration, and tests to align with the mode-first design, removing all references to deprecated fields. - Refactored hotkey runtime and projection interfaces to ensure a clear separation between configuration and runtime logic.
Integrates AgentSession runtime path with tool registry and keeps a safe legacy fallback for response generation. Adds ThreadStore-backed drawer entries with search and thread-aware copy/delete/favorite actions. Expands agent/thread tests and aligns mode-first hotkey/settings migration updates. [ok-commit]
Improve Drawer thread entry hydration from ThreadStore, normalize preview/search fields, and scan recent legacy transcript folders for better continuity. Add regression test for searching thread message/note corpus. [ok-commit]
- route assistive pipeline through agent runtime callback with guarded legacy fallback\n- rotate backend runtime thread boundary from New Thread action\n- persist runtime degraded state in UI status model and recovery messaging\n- make Drawer ThreadStore-first with optional legacy opt-in env gate\n- add callback dispatch tests and env registry/docs updates [ok-commit]
- use shared runtime helper for assistive dispatch path\n- keep assistant rewrite helper available for controller tests\n- resolve pre-push clippy dead-code gate without bypass [ok-commit]
Bump workspace and package version to 0.8.0 and make several functional refactors: introduce agent runtime rotation helpers and async reset (rotate_for_new_thread_with / reset_agent_runtime_for_new_thread), add legacy assistive-thread persistence (persist_legacy_assistive_thread) and normalize assistive text, and make run_legacy_send_path return an optional assistant string so fallbacks can be persisted. Convert raw_save_enabled to opt-in for assistive mode via CODESCRIBE_ASSISTIVE_LEGACY_TRANSCRIPT_BACKUP. Change RecordingController to hold an Option<StreamingRecorder>, add recorder init/guard helpers, and update many conversation/hold/toggle flows to gracefully handle recorder unavailability and mark runtime degraded. Refactor hotkey logic to remove old HoldMods/ToggleTrigger projection, use ShortcutBinding directly, add assistive selection handling, and update related tests. Misc: update README and docs to reflect mode/hotkey wording, tweak .env.example alias, and update tests and Cargo.lock/Cargo.toml accordingly.[ok-commit]
Stylistic and formatting cleanup across documentation and the site. Adjusted Markdown tables and spacing in README, guides, OVERLAY_STREAMING, modes, settings, QUICKSTART, and chat-overlay for consistent column alignment; added blank-line fixes to .github/ISSUE_TEMPLATE/bug_report.md and SECURITY.md; and reformatted docs/landing/index.html (doctype, indentation, HTML/CSS/JS reflow) for consistency and readability. No functional behavior changes intended — purely documentation and presentation improvements.[ok-commit]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary of Changes
Settings Overhaul:
settings.jsonas a source of truth and ensure seamless migration for.env-based configurations.Pipeline Enhancements:
UI and User Experience Updates:
Code Cleanup & QA:
streamlined-release refactor