2026.06.15-2
Electra AI Center — Release Notes 2026.06.15-2
This patch introduces a major suite of functional, event-driven, and structural bug fixes to the graphical environment (electra_gui.py) following an 8-round systematic audit. Additionally, the model directory has been expanded to support 126 models—including critical new updates like kimi-k2.7-code, gemini-3-flash-preview, deepseek-v4-pro, gpt-oss:20b, and kimi-k2-thinking.
🎛️ Refactored Subsystems & Audited Bug Fixes
- WebKit-JS Base64 UTF-8 Bridging & String Escaping (Rounds 7 & 8)
Deprecation & WebKit2GTK Crash Fix: Replaced the legacy decodeURIComponent(escape(window.atob(...))) UTF-8 base64 decoding pattern inside add_chat_message and streamdo_render [1]. On systems running modern WebKit2GTK 6.0 in strict mode, escape is undefined and threw critical ReferenceError exceptions, dropping streaming blocks [1]. Implemented a robust, native decoding pipeline:
new TextDecoder().decode(Uint8Array.from(atob(payload), c => c.charCodeAt(0)))
Apostrophe & Single-Quote Handling: The model routing names and labels containing single quotes (e.g., Electra [Writer's Mode] or model naming conventions with single quotes) would break JS string literals when compiling startStream('{sender}', ...). Added backslash and quote sanitization (.replace('\', '\\').replace("'", "\'")) on both Python and JavaScript boundaries.
System Pill Input Sanitization: Extended escaping within add_system_pill to sanitize backslashes, carriage returns (\r), and backticks (`) to prevent broken JS injections on AI file mentions.
CommonMark HTML-Escaping: Resolved a critical parsing bug where code blocks containing generic definitions (List), template strings (${var}), or logical checks (x && y) bypassed HTML-escaping before insertion. Code block text is now fully escaped to entities (&, <, >) prior to rendering.
- Text Buffers, Undo History, & In-Place Splicing (Rounds 2 & 6)
Undo Stack Preservation on AI Writes: Rewriting text via code replacements, formatting engines (Ctrl+Shift+I), bulk replaces, or LSP refactoring was utilizing buf.set_text(), completely blowing away the user's undo stack. Wrapped all buffer mutations inside begin_user_action() and end_user_action() blocks, performing clean delete() and insert() sequences to preserve the editing history.
Stale Offset Protection on Slow Edits: During inline AI rewrites (Ctrl+K), the editor now snapshots the complete buffer text at call-time. If the user continues typing during the API call (up to 60s timeout), the return block is spliced against the snapshotted baseline rather than stale character offsets, preventing out-of-order text corruption.
Keybinding Collision & Redundant Multi-Line Sends: Bare Enter (send) and Ctrl+Enter (newline) were executing identical send operations, preventing multiline messages. Bare Enter remains mapped to the send event, while Ctrl+Enter has been configured to insert newlines (\n) into the buffer.
Non-Source Context Filters: In Coder Mode, the editor now checks tab suffixes and file extensions before performing auto-context injections, preventing the engine from attempting to open and read binary image tabs or virtual preview buffers (::md_preview).
- File Tree, Polling, & Workspace Synchronization (Rounds 3, 5, & 6)
Double-Thread Mitigation: Refactored deferredpopulate_tree. Previously, calling the method from within background thread instances (like refresh_file_tree or pollfile_tree) resulted in double-threading by spawning nested t.Thread loops. The background logic has been cleanly separated into run_tree_scan.
Workspace Generation Checking: Added a scangeneration integer tracking mechanism. Rapid save triggers or overlapping poll sequences now discard stale in-flight results, ensuring only the most up-to-date workspace tree scan populates the GtkTreeStore.
Asynchronous Directory Scans: Standardized all legacy synchronous populate_tree() calls.Scans on folder switches, session state restores, and GUI sync actions now execute on dedicated background threads, eliminating main thread UI blocking.
Background Log Quieting: Integrated a silent boolean pass to suppress "● Indexing workspace..." logs from appearing in the activity log during background tree scans.
Pruning Irrelevant Directories: Expanded the ignore paths SKIPDIRS) during recursive walks to block heavy project files: pycache, node_modules, .venv, venv, env, dist, build, .tox, .mypy_cache, and similar compilation outputs.
Recursive Folder Filtering: Fixed the file explorer search function to check both directory and child nodes. Previously, searching for a file hid unmatched parent directories, making matching children invisible.
- UI Layout, Dialogs, & Viewports (Rounds 2, 4, & 7)
Minimap Layout Navigation: Introduced the getsource_view(pw) layout-traversal helper. When the Minimap is enabled, active tab page widgets are encapsulated inside a custom Gtk.Box layout instead of a Gtk.ScrolledWindow. The new helper safely navigates both structural types, repairing broken scroll-to-iter operations, word-wrap toggles, indent options, and search jumps on minimap-enabled tabs.
Default Context Menu Suppression: Modified the right-click mouse listener in the editor oneditor_right_click) to return True upon displaying the custom popover. This consumes the event and blocks GtkSourceView from layering its default context menu on top of the custom GUI popup.
Split Editor Layout Failures: Corrected a layout crash inside togglesplit_editor. The splitter open command was calling pack_start() on old_parent (which is a Gtk.Paned layout and lacks pack_start capabilities). Swapped to use pack1() with fallback protections.
Sidebar Restorations: Re-entering Coder Mode after a Chat session now programmatically checks the sidebar state and restores the main_paned width to sidebarexpanded_pos if it was collapsed (width < 40).
Transient Popups & Window Grabs: Added set_transient_for(self) properties to the @-mention and palette popups to prevent them from dropping behind main panels. Implemented an active Gdk pointer grab on the right-click context menu to auto-close the popup whenever a user clicks outside the interface.
Interactive Dialog Handling: Enabled set_activates_default(True) and default responses for the "New File" and "Rename" dialog prompts, allowing users to submit directory actions using the Enter key.
- Code Completion, Formatting, & Metrics (Rounds 4 & 8)
Ghost Buffer Switching Fix: If the user changed active editor tabs while the autocomplete API call was in-flight, ghostclear previously referenced the active buffer, missing the old buffer's ghost tags. The tags are now resolved dynamically via ghostanchor_mark.get_buffer(), ensuring thorough tag cleanup.
Autocomplete Accept Cooldown: Implemented a 1500ms post-accept cooldown timer ghostpost_accept_done). This prevents immediate re-triggering of completion runs caused by buffer edits made during the autocomplete insertion.
Word/Character Count Initialization: The Writer Mode metric labels are now updated upon entering the mode and opening files, preventing stale or empty strings from showing until the first keystroke.
Find-In-Project Case Matching: Linked selffipcase_btn to a new onfip_case_toggled handler, resolving a bug where toggling the "Aa" match option provided no visual active-state feedback.
☁️ New Models Added to the Fallback Matrix
This release scales the available model register to 126 entries, updating fallback chains and routing priorities across both proprietary and open ecosystems.
Total Registered Endpoints: 126 Models (Cloud + Proprietary Endpoints)
Key Additions:
kimi-k2.7-code — Upgraded coding capabilities with specialized syntax handling.
gemini-3-flash-preview — Low-latency, high-performance multimodal reasoning.
deepseek-v4-pro — High-context reasoning and math-heavy programming.
kimi-k2-thinking — Long-context search and structured logical step-by-step reasoning.
gpt-oss:20b — Fast, lightweight general-purpose completions.