Releases: raymerjacque/Electra_AI_Center
Release list
2026.07.02
Electra AI Center — June 30 2026 Update
Electra starts thinking ahead, and you can finally ask her what she knows about you
🟢 The short version
This update is all about Electra moving from "answers when asked" to "actually has your back."
-
Electra now learns your schedule and acts on it before you ask. The Heartbeat agent — the part of Electra that runs quietly in the background — now pays attention to when you actually work. After a few weeks of normal use, it learns things like "this user usually starts work around 9am on Mondays" and automatically preps a heads-up the night before, so it's waiting for you when you sit down. If you've been coding all day and forgot to commit your work, Electra will give you a gentle nudge before you log off. And right before you push code to GitHub, she'll quietly check that branch's history — if it's failed CI repeatedly recently, she'll warn you before you push, not after.
-
New command: /me — ask Electra what she knows about you. Curious what Electra has actually picked up about you over time? Type /me and she'll gather everything she's learned — your preferences, how you work, your patterns — and write you a warm, plain-English summary. No raw data dumps, no spreadsheets, just Electra telling you about yourself the way a friend would. And don't worry — anything that looks like a password or API key gets automatically scrubbed before it's ever shown to the AI, and your clipboard history is never touched by this feature at all.
-
New command: /vloop — Electra fixes visual bugs and checks her own work. This is a big one. If you tell Electra to fix something visual — a broken layout, a button that's not showing up right — she now takes a screenshot first, makes the fix, takes another screenshot, and actually looks at it to confirm the fix worked. If it didn't, she tries again automatically, learning from what she saw. No more "I fixed it!" followed by you finding out it's still broken. Try it with something like /vloop fix the broken layout in the settings page.
-
Behind-the-scenes reliability fix. Found and fixed a bug where a single hiccup from one of our AI providers could cause a command to fail outright instead of automatically trying a backup. This is now fixed for the new /me command, matching how the rest of Electra already handles provider outages gracefully.
That's the gist — Electra is quietly getting more proactive and more transparent at the same time. Full nerdy breakdown below if you want it. 👇
🔧 The deep dive (for the tech junkies)
Predictive Heartbeat
The Heartbeat agent (heartbeat agent ) already had a solid task-scheduling and ReAct-loop foundation from earlier sprints — what it was missing was the learning layer described on the roadmap. This sprint built that out:
New lightweight activity stream. record_activity(event_type, meta) appends single-line JSON events to ~/.electra/activity_log.jsonl from a handful of choke points in ai terminal — most importantly handlerouted_prompt(), which is the single function every piece of user input passes through regardless of mode or entry point (terminal or Electra Bar). One hook there is enough to capture weekday/hour activity signal without instrumenting every individual mode.
Pattern analysis. analyze_patterns() runs on a ~6-day cadence from inside the existing heartbeat tick loop. It buckets first-activity-of-day timestamps by weekday over a 90-day lookback window, and only trusts a weekday once it has ≥3 samples (avoids overfitting on noise).
Auto-generated predictive tasks. Once a weekday pattern is trusted, generate_predictive_tasks() writes a local-only task (tagged predictive, never touches server tasks) scheduled the night before at a configurable prep time. This required extending the existing schedule parser with a new weekly HH:MM format alongside the existing every Xm/h/d and daily HH:MM syntax.
End-of-day commit nudges. A new tick-level check predcheck_inactivity_and_remind) fires once per day, inside a configurable local-hour window, if there's been prompt activity today but no git_commit event — deduped via a small per-day state file so it never spams.
Branch risk warnings. This one didn't need any new data collection at all — it reuses the existing CI Watch state file (ci_state.json) that was already tracking failed runs per repo/branch. get_branch_risk_warning(repo, branch) counts failures in a 21-day window and returns an advisory string if a branch has failed ≥2 times. Wired in right before the actual git push call in ai terminal commit/push helper — derives the branch via git rev-parse --abbrev-ref HEAD and the repo from git remote get-url origin, purely advisory, never blocks the push.
New /predictive status|analyze|on|off CLI command for visibility and control.
Bonus fix: callai() in the heartbeat ReAct loop had conversation_id nested inside extra_body instead of being a top-level payload key — violating the server contract and silently breaking multi-turn memory continuity in the predictive ReAct loop specifically. Fixed.
/me — AI Self-Knowledge Profile
Before building this, we did a full audit of every place the app actually collects user data, not just Heartbeat:
Explicit /profile preferences (~/.electra/profile.json)
Server-side MemPalace (ChromaDB, keyed by the stable per-mode conversation IDs — chat, coder, novel)
The local offline MemPalace mirror for Ollama mode
Predictive Heartbeat's learned patterns and scheduled automations
Account tier info
Deliberately excluded: clipboard history (in-memory only, never written to disk, and explicitly never read by /me), and anything resembling a credential. gatherme_data() runs every assembled section through mescrub(), which regex-matches api_key/token/password/secret/bearer/sk-…/gh*_… patterns and redacts them before the bundle is capped at 6000 chars and sent anywhere near a prompt — defense in depth on top of simply not collecting credentials in the first place.
The AI-facing system prompt is explicit about tone and boundaries: second-person, 150–300 words, zero internal jargon (no file paths, no "MemPalace," no JSON), honest about sparse data rather than inventing details.
Fallback chain fix: the first version of /me only tried one model and surfaced raw 502 Bad Gateway errors straight to the user on the first provider hiccup — a real bug caught from a live run. Rewritten to walk a short candidate list (current model first, then up to 4 from FALLBACK_MODELS), treating any 5xx or timeout as "try the next one" rather than a hard failure, matching the resilience pattern already used everywhere else model calls happen in the app.
Visual Feedback Loop — /vloop
Worth noting: the underlying primitives — take_screenshot and analyze_image — already existed as registered coder-agent tools the AI could call mid-task. What the roadmap item actually called for was the outer loop: an autonomous see → act → verify cycle, not just the individual capabilities.
/vloop , runs from inside /coder (it needs an active coding session/workspace).
Captures a silent baseline screenshot vloopcapture(), separate from the interactive /screenshot command).
Dispatches the actual fix attempt through process_coding_message() — the full coder agent tool loop, which can launch the app via open_application, edit files, run commands, and optionally use its own vision tools mid-task.
Takes an independent "after" screenshot and sends it to the vision model with an explicit verification prompt: reply VERIFIED or NOT_VERIFIED plus a one-line reason.
If not verified, that exact vision feedback gets folded into the next attempt's prompt automatically — up to 3 attempts by default — so each retry is informed by what actually went wrong visually, not just a generic "try again."
Built on the existing scrot/gnome-screenshot/ImageMagick fallback chain — fully native to the Linux desktop, no browser automation involved.
2026.06.24
Electra AI Center — Release Notes (2026.06.24)
This patch release represents an exhaustive, multi-layered hardening of the Coder and Command execution loops (ai termina) and the WebKit-GTK GUI thread integrations (electra gui) .
🔴 Coder Fallback Rotations & Message Sanitization (ai terminal)
A series of execution-state and history-corruption bugs have been resolved to prevent redundant model rotations and downstream API validation rejections.
Clean Fallback Slate: Both the ChunkedEncodingError and general Exception fallback paths now cleanly reset all tracking metrics when rotating to a new model:
sarfailures = 0 — Clears search-and-replace failures, preventing the new model from immediately inheriting "Your last SAR call failed" steering.
consecutive_test_failures = 0 — Clears the consecutive test-failure counter.
stuckasked_this_episode = False — Re-enables the interactive user hint dialog for the new model's execution window.
Provider-Side Rate Limits & 5xx Failures: Added explicit pattern detection for "429 Too Many Requests (provider)" and HTTP 5xx responses (500, 502, 503, 504) to the isall_failed condition. Rather than silently pausing the agent, these external server errors now trigger an immediate model rotation to resume the task.
Double-Retry Model Bypass: Prior to clearing codertried during the second queue loop attempt queueretries_count < 2), the original failed model is explicitly added back to the tried list. This ensures the fallback logic doesn't immediately retry the first broken model on a secondary pass.
Context Token Calculations: Modified the ctxused calculation to parse and include tool_calls payloads (json.dumps(tool_calls)). Previously, context-size checks only read message content strings, drastically understating token estimates by tens of thousands of characters during heavy file-writing operations, which led to silent context overflows and server-side 400 errors instead of auto-compaction.
Double-Append Prevention & Safe History Appends:
Piped background system warnings BGCRASH_MESSAGES), plan auto-execution approvals ([PLAN AUTO-EXECUTE]), and lint/testing failures through safeappend_user() rather than bare coding_history.append(). This guarantees that mid-turn system updates do not result in consecutive same-role (user→user) blocks.
Optimized sanitizemessages Rule 3 to also drop orphaned assistant stubs that have no id properties if no matching tool results are found in the following messages, preventing validation rejections on strict backends.
🔴 Command Mode & GPS Session State Repairs (ai terminal)
Several state-loss bugs in the command-execution and terminal-helper threads have been patched.
GUI_KILL_FLAG Reset: Added GUI_KILL_FLAG.clear() at the non-continuation entry of process_command_message. Previously, the flag stayed set after a user pressed Stop, causing any subsequent command to instantly terminate on turn 0 before executing.
GPS Continuation Mapping: Bounded GPS indexing to the initial task gpssession_key. Previously, the 100-turn checkpoint continuation hashed the handoff string continuationmsg), creating a different key that cleared all plan/done/run progress and triggered redundant file-reads and shell commands.
Dynamic Fallback Filtering: Refactored getnext_command_model() to ignore models with a "reason" capability unless they also feature "tool" support. Removed pure-reasoning models (step-3.7-flash, ol-qwen3-next:80b) from COMMAND_FALLBACK_CHAIN and replaced them with specialized coding fallback options (llm7-codestral-latest).
Command Mode Idle Nudges: Implemented a command mode idle-turn tracker (cmd_idle_turns). If a model outputs text without calling tools mid-task, it injects a [SYSTEM: You MUST call a tool NOW] nudge and forces tool_choice = "required".
🖥️ WebKit DOM & GTK GUI State Syncing (electra gui)
Chat→Command Double-End Regression (Critical): Fixed a regression introduced by the earlier double endStream() fix where the GUI became permanently locked in a spinning state during Chat→Command routing. Split the dispatcher's state check into coderrouted (which bypasses the dispatcher's end() because coder manages its own lifecycle) and cmdrouted (which forces end() execution because command mode does not).
Spurious Bubble Prevention & History Deduplication: Captured CODING_MODE and COMMAND_MODE states before calling process_text_in_chunks(). If they change during execution, it suppresses the GUI dispatcher's start("Chat") bubble, preventing double-fires of stream_end(), duplicate console renderings, and duplicate history entry appends inside the sidebar panel.
WebKit2 API Compatibility: Refactored onapply_code_result to handle WebKit2 4.1/6.0 API variations safely. Replaced old WebKit2 4.0 run_javascript_finish and get_js_value().to_string() operations with compatibility try/except clauses that fall back to get_value() and str() equivalents, eliminating silent transfer failures.
LSP casting safeguards: Wrapped int() conversions on incoming line/column parameters for all four language server tools inside try/except (TypeError, ValueError) blocks with safe default fallbacks .
Model Syncing & Multi-Threaded Regenerations:
Wired GUI_INFO_CALLBACK and CURRENT_MODEL_ID syncs across all initial auto-routing and final teardown paths (8 locations) to update the bottom info bar and model picker dropdown highlighted states modelrow_btns).
Guarded handlechat_action("regenerate") with isai_working to prevent spawning concurrent backend threads writing to the same history and tool-use maps.
🔒 Batch-Write Type-Guards & Payload Checks (ai terminal)
A critical bug has been resolved where models (specifically larger reasoning models) mis-serialized their JSON payloads.
write_files Type Safeguards (Critical): If a model passed a string instead of a structured JSON array for the files key, the inner loop would iterate through characters and crash with 'str' object has no attribute 'get'. The system now enforces structural type checks on arrival:
If the files argument evaluates to a string, the tool rejects the call and returns a schema-correcting instruction to the model.
Validates that each element within the array is an instance of dict before invoking .get(), skipping malformed array items with console warnings instead of throwing unhandled exceptions.
File-Count Sanity Capping: Implemented an upper boundary of 50 files per write_files call. If a model attempts to write an excessive volume of files in a single pass (such as the 1,672 files detected in recent error logs), the tool rejects the payload, instructing the model to chunk its modifications into sequential batches.
Defensive Tool Wrapper Refactoring: Wrapped both command and novel mode execute_tool calls inside localized try/except Exception as e blocks. This matches the coder agent's existing resilience profile: any tool exception (permission errors, missing paths, invalid arguments) is converted to an informative error string and returned to the model as a tool execution output, allowing the agent to self-correct rather than breaking the history state and crashing the loop.
has_write_ops Completeness: Added write_files and search_and_replace_batch to the has_write_ops evaluation tuple within the coder idle-turn checker. This prevents false positive "No tool call detected" nudges after successful batch writes.
🚫 Reasoning Model Fallback Exclusions
Reasoning models (such as step-3.7-flash or ol-qwen3-next:80b) tend to over-plan and output massive thought blocks, making them highly unstable for structured tool-calling. This patch completely isolates them from agentic operations.
Model Re-Tagging: Re-tagged step-3.7-flash as "reason" (removed "tool") in MODEL_CAPABILITIES. Set CODER_FALLBACK_MODEL to llm7-codestral-latest (a purpose-built, stable tool-calling coder model).
Comprehensive Reason-Filtering:
Removed reasoning-only models from both CODER_FALLBACK_CHAIN and COMMAND_FALLBACK_CHAIN.
Filtered out any model containing the "reason" capability tag within all fallback candidate loops (stream-error paths, all-models-failed paths, and getnext_command_model loops) unless the model also explicitly possesses the "tool" capability tag.
🏎️ Connection & Retry State Alignment (ai terminal)
streamretries[turn] Reset on All-Failed Switch (Medium Severity): When the SSE loop hit a non-stream error (all-failed, API bad requests, or keys exhausted) and rotated models, streamretries[turn] was never reset. The new model inherited the stale retry count (e.g. 3/3), meaning any minor stream drop immediately triggered another model rotation. The state is now reset to 0 upon rotation.
BGCRASH_MESSAGES Queue Concurrency Guard: Ensured that background crash/pinned file messages injected via BGCRASH_MESSAGES are mapped to safeappend_user() to prevent consecutive user-role messages.
Core Loop Unhandled Exception Protection: Wrapped the entire Coder loop within an outer try/finally block. If an unhandled exception manages to escape the loop, it now programmatically decrements CODERCHECKPOINT_DEPTH to prevent resource leaks and schedules stream_end() to unlock the GUI spinner.
🖥️ GTK Thread Safety & Double-Output Fixes
GUI Thinking Console Double-Output (Medium Severity): When GUI_MODE=True, thinking chunks were sent to both GUI_STREAM_CALLBACK and sys.stdout. The terminal launched by the GUI was getting a raw cyan dump of all thinking text while the GUI panel was also rendering it. Gated the stdout write on not GUI_MODE.
diffconfirm Main Thread Safety: If DIFF_PREVIEW=True and GUI_CONFIRM_CALLBACK had not yet been wired (early in startup), the if GUI_MODE check fell through to terminal input(), freezing the GTK main thread. Added a safe fallback that auto-approves diffs and logs the event to prevent deadlocks.
🧩 Open VSX Extension Subsystem & Asset Extraction
We have implemented an...
2026.06.18
Electra AI Center — Release Notes (2026.06.18)
This release implements a new Electra AT-SPI / Electra D-bus system, a total hardening of the agentic execution core inside ai terminal and electra gui. Over 40 distinct stability bugs—discovered during a 11-round audit of the coder and command mode loops—have been resolved to prevent stream-dropout freezes, execution memory loss, payload structural violations, and main-thread graphical stuttering [1].
⚡ New Electra AT-SPI - What is AT-SPI?
AT-SPI stands for Assistive Technology Service Provider Interface. It is the standard Linux accessibility layer — the same infrastructure used by screen readers for visually impaired users. Every GTK, Qt, and Electron application on your desktop exposes its UI structure through AT-SPI automatically: the text content, button labels, window titles, input field values, menu items, and document content are all readable by any process that connects to the AT-SPI bus.
Electra now connects to this bus through a lightweight background daemon (electra_atspi_daemon.py) and reads whatever application you currently have focused.
What does it actually give the AI?
Every 2.5 seconds, the daemon captures:
The name of the focused application (e.g. Firefox, Gedit, LibreOffice Writer, Nemo, Terminal)
The window title (e.g. "GitHub — Mozilla Firefox", "main.py — Gedit")
The current URL if a browser is focused (extracted from the address bar)
The focused widget — which input field, button, or text area the cursor is in
The visible text content of the active window — document text, terminal output, web page content, file listings, error messages — up to 3,000 characters, trimmed intelligently from start and end
This is written to /tmp/electra_atspi_context.json and injected into the AI's system prompt on every message.
What this means in practice:
You see an error in Firefox → ask Electra "what does this mean?" → Electra has already read the page, no copy-paste needed
You're looking at a terminal with a failed build → ask "why did this fail?" → Electra read the output
LibreOffice document is open → ask "summarise this for me" → Electra read the document
You're browsing a GitHub issue → ask "what's the fix?" → Electra has the issue text
File manager open on a folder → ask "which of these files is the largest?" → Electra sees the listing
What it does NOT do:
It does not take screenshots — purely text via accessibility API
It does not record anything — context is read live, not stored
It does not read password fields — AT-SPI masks password role widgets
It ignores the Electra app itself to avoid circular context
⚡ New Electra D-Bus - What is D-Bus?
D-Bus (Desktop Bus) is the standard inter-process communication system on Linux. It is the backbone of the entire Linux desktop: every notification you see, every volume change, every network status update, every media player control — all of it travels over D-Bus. By registering a name on the D-Bus session bus, an application becomes reachable by any other application running in the same desktop session.
Electra now registers org.makululinux.Electra on the D-Bus session bus through a background daemon (electra_dbus.py), which means any application, script, keyboard shortcut, or file manager plugin on your desktop can send queries to Electra and receive responses without going through the GUI.
What is exposed?
The daemon exposes the following interface at /org/makululinux/Electra:
MethodWhat it doesPing()Health check — returns "pong". Use to verify the daemon is alive.ExecuteIntent(query)Send any natural-language query to Electra's AI. Returns a request ID immediately, fires a ResponseReady signal with the answer when done.GetContext()Returns a JSON blob with the current Electra context: active workspace path, current AT-SPI screen content, and model information.Notify(title, body)Send a desktop notification through Electra. Uses notify-send under the hood.TileWindows(layout)Command the compositor to arrange windows. Supports Hyprland (hyprctl) and generic X11 (wmctrl).
What this makes possible (building blocks for future features):
Nemo right-click integration: "Ask Electra about this file" → one dbus-send call → response in a dialog
Global keyboard shortcut: bind any hotkey to send selected text or clipboard content to Electra instantly
Custom application integration: any app built by you or third parties can query Electra's AI without embedding API keys
Automation scripts: shell scripts and cron jobs can use Electra's AI as a reasoning engine
Voice assistant integration: bind a push-to-talk key → transcribe → ExecuteIntent → speak response
Other desktop apps: any GTK, Qt, or terminal application can become "Electra-aware" with three lines of code
The ResponseReady signal:
Because AI responses take time, ExecuteIntent is non-blocking. It returns immediately with a request_id and fires a D-Bus signal ResponseReady(request_id, response) when the answer is ready. Any application that wants to receive Electra's response just listens for this signal on the session bus.
🔴 Stream Dropout Resiliency & Fallback Model Rotations (ai terminal)
A major focus of this release was addressing failures in the stream interruption and fallback recovery paths [1].
Elimination of Stale Connection Counters: Removed a persistent, function-attribute counter (process_coding_messageconnretries) [1]. Previously, this counter tracked cumulative network hiccups across separate tasks [1]. Once it reached 3, it permanently locked, causing all subsequent stream interruptions to immediately abort without attempting model switches [1].
Per-Turn Retry Budget: Replaced the global counter with streamretries (a per-call dictionary keyed on the active turn index, reset dynamically) [1].
Dynamic Model Switching: If a stream fails (e.g., ChunkedEncodingError, connection timeouts, server drops) and exhausts its 3-retry budget, the loop now rotates to the next model in CODER_FALLBACK_CHAIN rather than stopping [1].
Context-Preserving Handoff Messages: Upon switching models mid-task, a structured [HANDOFF] user message is injected into the conversation history [1]. This message informs the replacement model:
Which model it is replacing and the error that triggered the handoff [1].
Which files have already been modified during the session [1].
Which tool calls were completed (e.g., write_file×3, read_file×1) [1].
An explicit instruction directive: "Continue the task — do NOT restart from scratch" [1].
🔴 Thread-Safe Message Sanitization sanitize messages
To prevent upstream API validators from rejecting payloads due to structural history violations (which return HTTP 400 Bad Request and crash the loop), we designed a module-level message sanitization engine sanitizemessages) [1]. This engine validates and repairs the active message list before every API dispatch in both Coder and Command modes [1]:
Consecutive Role Deduplication: Prevents back-to-back same-role messages [1]. If consecutive user/user messages occur (e.g., a handoff note injected right after a user's prompt, or a manual file pin), the system wraps the call with a new safeappend_user helper to insert a minimal assistant confirmation bridge [1].
Empty and Null-Content Pruning:
Replaced content: null definitions (which occur when reasoning/thinking models output tool calls but no text) with content: "" to satisfy strict schema validators [1].
Prunes empty assistant stubs (content=None, tool_calls=None) [1].
Orphaned Tool Result Cleaning: Automatically strips tool result messages if their matching tool_calls definitions were dropped during a stream interrupt, and ensures payloads always end on a user role to comply with strict 3rd-party APIs [1].
🔴 Coder and Command Agentic Loop Hardening (ai terminal)
History Snapshot Bug Fix: Resolved a command mode bug where historysnapshot_len was captured before user_input was appended to command_history [1]. On model switches, the rollback deleted everything from index 1 onward, wiping out the user's initial prompt and causing fallback models to start with zero context [1]. The user message is now appended first [1].
Automatic Checkpoint Continues (Turn 80): In GUI mode, when hitting max_turns = 80, instead of silently stopping and abandoning the task, the agent now automatically appends a checkpoint summary and continues [1].
Safe Tool Parameter Casting: Wrapped int casts inside read_file (max_lines) and all four LSP tools (lsp_goto_definition, etc.) in try/except statements [1]. If models pass None or a non-numeric string (common with smaller models), the system falls back to default values instead of throwing unhandled exceptions [1].
Auto-Compactor Data Sanitization: Fixed a critical bug in autocompact_session where raw message lists containing "tool" or "tool_calls" roles were forwarded to /v1 compactors without schemas [1]. This triggered silent HTTP 400 errors, causing the session memory to compact into a blank handoff [1].
🟡 Cairo context & GTK Keystroke Repair (electra gui)
Gdk backslash Keypress Crash: Fixed the editor keyboard event listener to map the correct GTK property Gdk.KEY_backslash (lowercase) instead of the broken Gdk.KEY_BackSlash (capital S) [1]. Because this listener evaluates every keystroke globally, the typo was throwing AttributeError exceptions on every single key pressed in the editor [1].
Cairo Context Type-Bridge Failures: On Debian/Ubuntu installations lacking proper Python-to-GI Cairo bindings, GTK's native draw events (used for minimaps, theme swatches, and intro tours) threw constant TypeError: Couldn't find foreign struct converter for 'cairo.Context' warnings [1]. Added a CAIROOK startup check to gracefully disable drawing bindings if the foreign structure converter is missing, eliminating console noise [1].
Synchronous Workspace S...
2026.06.16
### Electra AI Center — Release Notes 2026.06.16
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
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
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
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
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
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.
🐝 Asynchronous Agent Swarm Mode (Coder Mode)
We have introduced a multi-agent concurrency framework for Coder Mode to distribute complex software engineering tasks across parallel execution threads.
JSON Task Decomposition (Orchestrator): Entering /swarm (or clicking the 🐝 toggle in the toolbar) routing routes code requests to an orchestrator model. This initial single-pass pass analyzes the workspace and outputs a structured JSON blueprint decomposing the request into up to six discrete file-specific tasks.
Concurrent Worker Threads: The application spawns a dedicated worker thread for each task [1]. Each worker operates in complete isolation, maintaining its own:
- Dedicated chat history and context window.
- Thread-safe access to the global tool execution map (TOOLS).
8-round agentic execution loop, allowing workers to iteratively call read_file_with_lines, write_file, or run_command.
Text-Only Markdown Extraction Fallbacks: If a worker model returns plain markdown code blocks instead of structured tool calls, a fallback parser extracts the first code fence block and writes it to the designated file path.
Reviewer Pass: After all worker threads resolve, a final review agent evaluates the combined changes in a single pass to check for consistency, logical gaps, and import conflicts.
Thread-Safe Status Broadcasting: The worker threads stream status updates (🔄 active, ✅ done, ❌ error, ⏳ queued). These updates are snapshotted in Python before being pushed via GUI_STREAM_CALLBACK("swarm_update") to a GTK status panel in the chat interface.
✏️ Inline Edit Mode Overhaul (Ctrl+K)
The inline editing popover has been rewritten to resolve attribute exceptions, add missing context, and improve UI usability.
Correct API Attribute Routing: Replaced outdated references at.API_URL, at.API_KEY, etc.) with global configuration...
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.
2026.06.15
Electra AI Center — Release Notes 2026.06.15
This massive development sprint adds over 2,300 lines of code across three distinct structural merges, bringing the application's source base to 10,075 lines. This release implements full IDE features, including a Project Search-and-Replace system, a Cairo-rendered Minimap, an AST-driven Sticky Scroll header, Multiple VTE terminal sessions, a Python REPL interpreter tab, and an interactive Sidebar Plugin Manager [1].
🛠️ Project-Wide Search & Replace Engine
The search subsystem has been expanded with a secondary regex-capable replacement engine [1].
Regex Substitutions (re.subn): Users can now execute global replacements across their entire workspace, with full support for regex capture groups (\1, \2, etc.) [1].
Active Buffer Synchronization: On replacement, the engine detects if target files are currently open in the GTK editor tabs, programmatically reloads the text buffers, and refreshes the search results [1].
Execution Feedback: Provides a non-blocking toast alert detailing the count of occurrences swapped and files modified (e.g., "Replaced 47 occurrence(s) in 12 file(s)") [1].
🗺️ Cairo-Rendered Code Minimap (Ctrl+Shift+)
A high-performance visual navigation panel has been added to the right margin of GtkSourceView editor tabs [1].
Proportional Line Drawing: Uses a native Cairo drawing canvas to construct line-by-line proportional bars of code (with wider bars representing longer lines) matching your syntax highlighter theme colors [1].
Viewport Tracking: Highlights a semi-translucent overlay indicating the viewport boundary relative to the active line index [1].
Interactive Navigation: Supports mouse press events on the canvas, instantly translating the coordinates to line numbers and scrolling the GtkSourceView view port to the target destination [1].
📌 AST-Driven Sticky Scroll Header
A dynamic, contextual header bar has been integrated directly above the editor tabs to maintain structural awareness during file traversal [1].
Abstract Syntax Tree (AST) Precision: For Python files, the module uses standard ast.parse evaluations to calculate the surrounding hierarchical structure of the cursor position [1]. Falls back to regex matches for JS, TS, Go, Rust, C, and C++ [1].
Dynamic Scoping: Displayed within a dedicated layout bar, showing the exact class, function, or method structure of the active block (e.g., class DocumentManager › def parse_block) [1].
Debounced Thread Processing: Updates on every cursor position change, throttled through GLib.idle_add to prevent GUI input stuttering [1].
📎 Workspace Context & File Management
- @-Mention Interactive Context Chips
Visual File Pills: When typing @filename inside the chat pane, the autocompleted file is rendered as a stylized chip/pill directly above the chat text field [1].
Removable Tags: Chips feature a termination action (✕), which strips both the pill and its bound [File: ...] context block from the input buffer [1].
Auto-Injection Context: In Coder Mode, the file contents of the active editor tab are automatically appended to the prompt context without requiring manual pinning, unless explicitly bypassed by other @-mention blocks [1].
- Workspace Session Switcher & Recent Files
Popover Folder Tracker: A new workspace switcher button (⌂) lists the last 12 project directories with active tracking checkmarks, stored at ~/.config/electra/recent_workspaces.json [1].
Quick Open History: The Ctrl+P Quick File Open tool now features a dedicated RECENT section displaying the last 8 open buffers, persisting states across system restarts [1].
- Drag & Drop Text Insertion
Connects the GTK editor window to native window manager drag operations [1].
Decodes incoming drag objects (MIME type text/uri-list), automatically opening files in dedicated editor tabs, and handling binary formats (such as image assets) through local preview paths [1].
🐚 Multi-VTE Terminal Tabs & Python REPL
- Concurrent Terminal Tabs
Bottom terminal panels can now spawn multiple isolated console sessions using the + button [1].
Spawns new VTE terminal views inside the active workspace directory, each designated with tab navigation and close operations [1].
- Stateful Python REPL Tab
Integrates a dedicated Python interpreter shell in the bottom panel for rapid prototyping [1].
Implements unified command line tracking, accepting expressions (evaluated via eval()) and full statements (executed via exec()) [1].
Captures and displays standard streams (stdout/stderr), preserving local variables and memory environments between inputs [1].
Binds keyboard arrow events to navigate the shell command history [1].
⚡ Active Coding, Linting & Formatting Automation
- Auto-Format on Save (Ctrl+S)
The editor now intercepts save sequences to apply programmatic code formatters [1]. If a conforming formatting tool is installed on the host system, the editor invokes the process, reloads the modified buffer, and confirms via toast notification [1]:
LanguageFormatting Binaries EvaluatedPythonblack [1]Web (JS, TS, CSS, HTML, MD, JSON)prettier [1]Gogofmt [1]Rustrustfmt [1]C / C++ / Header Filesclang-format [1]Rubyrubocop -a [1]Shell Scriptingshfmt [1]
The command can also be triggered manually via Ctrl+Shift+I or through Command Palette menus [1].
- Clickable TODO/FIXME Project Explorer
Adds an asynchronous workspace parser that queries files for comment markers: # TODO, # FIXME, # HACK, # NOTE, and # XXX [1].
Populates a prioritized, color-coded tabular list (green TODO, amber FIXME, red HACK, accent NOTE) in the bottom notebook [1].
Clicking any entry automatically opens the target file and sets the cursor to the exact line number [1].
🔌 Sidebar Plugin Switchboard & Chat Actions
- Sidebar Plugin Manager Panel
Registers a visual switcher view displaying the status of all 14 integrated services (including LSP, Heartbeat, Ghost Text, Home Assistant, Spotify, and Finance Bot) [1].
Implements toggle switches (Gtk.Switch) that dynamically modify runtime parameters (such as enabling/disabling inline ghost autocomplete or saving file-formatting scripts) and save active profiles to ~/.config/electra/plugins.json [1].
- Chat Message Actions
Rendered message elements now feature hover-triggered toolbar actions [1]:
Regenerate (↺): Re-runs the preceding prompt through the routing agent, rewriting the active chat stream [1].
Copy Raw (⎘): Captures unrendered markdown strings directly to the clipboard [1].
Communicates directly with python core runtimes via an expanded electraAction(action, data) WebKit title bridge [1].
- Comprehensive Markdown Parser Refactor
Full CommonMark Tables: Renders striped HTML table tags directly inside markdown text buffers [1].
Task List Checkboxes: Replaces raw markdown markdown blocks (- [ ] / - [x]) with interactive, CSS-formatted checked/unchecked status symbols [1].
Formatting Syntaxes: Supports ordered lists, strikethrough (~~), combined bold-italic, custom links, and thematic breaks (---) [1].
🎛️ Detailed Status Bar, Keybindings, & Bug Fixes
Advanced Workspace Analytics: The editor status bar now provides dynamic metrics [1]:
Active selection statistics detailing line, word, and character counts (e.g., (3 Ln, 47 W, 218 Ch selected)) [1].
Raw file size estimations (e.g., 42 KB) [1].
Line ending formats (LF vs CRLF) and active tab/spaces indentation guides (with support for clickable conversions) [1].
New Hotkeys Registered:
Ctrl+G — Go to Line [1].
Ctrl+K — Inline AI selection edit (triggers model-prompt replacements with side-by-side diff approvals) [1].
Ctrl+Shift+T — Opens the active workspace TODO/FIXME comments panel [1].
F9 — Focuses the bottom Python REPL tab [1].
🐛 Image Tab Closing Fix: Corrected openimage_preview so that both WebKit and Gtk.Image preview panes are encapsulated using maketab_label and configured with set_tab_reorderable, preventing locked, unclosable visual preview sheets [1].
Ghost Text — Full Implementation
Three helper functions: ghostget_model(), ghostadvance_model(), ghostreset_model(). After a successful completion, resets to the fastest primary. After timeout/empty, advances to the next. After full rotation it wraps back — no permanent demotion.
Ghost models are completely separate from CODING_MODEL — they never compete for tokens or rate limits with the main coder agent.
2026_06_14
Latest Build. See patreon Posts for release notes
2026.06.09_r1
Delete plugins/autorepair_content_summarizer.py
2026_06_06.09
[AutoRepair] autorepair_proactive_scan_confirm.py — Proactive: y
2026.06.06.r1
⚡ 2026.06.06-r1
🟢 Electra Finance Center — Full GUI Application
• New /finance command launches a standalone PyQt5 GUI — a complete income
management dashboard built into the AI Center.
• 6-page side-navigation layout: Dashboard, Streams, Pending, Wallet, Config, Log.
• Dashboard: 5 stat cards (Earned 30d, Today, Goal, Active streams, Pending),
animated monthly goal progress bar, earnings-by-stream table, 25-entry activity feed.
• Streams page: all 28 income streams in a table with live status badges,
last-run time, 30-day earnings, per-row Enable/Pause toggle and Run Now button,
plus bulk Enable All / Pause All actions.
• Pending Approvals: card-per-action layout with stream badge, amount, description,
per-card Approve/Reject buttons, and Approve All bulk action.
• Wallet: PayPal/Stripe/Total balance cards, Sync Income Now, Check Balances,
50-row synced transactions table.
• Config: 6-tab form covering all 50+ credential and settings fields with
show/hide toggles on secret fields and a single Save Config button.
• Activity Log: 200 entries, colour-coded ERROR/WARN/INFO, monospace font,
auto-scroll, Clear and Refresh controls.
• Finance AI chat pane always visible on the right — injects live earnings
context (goal, earned, active streams, pending count, capital) into every
message. Three suggestion chips: Analyse / Ideas / Next Step.
• 10 built-in themes with live switching — no restart required:
Electra Dark, Midnight Purple, Ocean Teal, Amber Night, Rose Dark,
Light Ink (default), Solarized Light, Nord, Dracula, Monokai.
• Theme preference persisted to finance.conf — restores on next launch.
• All background operations (stream runs, wallet sync, AI chat, scan) run in
QThread workers so the UI never freezes.
• Auto-refresh every 60 seconds.
🟢 Electra Bar — Qt xcb Platform Fix
• electra_bar_qt.py and electra_bar_launcher.py now detect the missing
libxcb-cursor0 dependency (required on Ubuntu 22.04+/23.04+ for the Qt
xcb platform plugin) before QApplication is created.
• Clear error message printed with exact fix: sudo apt install libxcb-cursor0
• Wayland sessions automatically switch to QT_QPA_PLATFORM=wayland.
• QT_QPA_PLATFORM_PLUGIN_PATH auto-detected across all common PyQt5/PyQt6
install locations (system apt, pip, user local).
🟢 Build System — PyQt5 + Memory Fixes
• docker.sh: PyQt5 installed via pip (not Debian package) so Nuitka can
locate and bundle it correctly. libxcb-cursor0 added to both fresh and
existing container provisioning. --shm-size=6g added to docker run.
• compile.sh: --jobs=1, --lto=no, --low-memory added to prevent gcc OOM-kill
on the large ai_terminal.py → C translation unit (37K+ lines).
--include-package=PyQt5 (+ QtWidgets/QtCore/QtGui) added for Finance GUI.
Removed --enable-plugin=pyqt5 (incompatible with Debian PyQt5 package).
• Pre-flight RAM check warns if less than 6GB free before compilation starts.
⚡ 2026.06.05-r5
🔴 Telegram Service — Fixed (Survives Reboot)
• Telegram daemon service (/telegram service install) now works correctly
after reboot. The service file is now written directly by the compiled
binary — no external install_telegram_service.sh required.
• Service unit now sets HOME, XDG_RUNTIME_DIR and PATH explicitly so the
daemon has a valid environment when started by systemd after boot.
• Root cause: top-level import of tkinter and ttkbootstrap was crashing the
binary at startup in any headless/no-display environment (e.g. systemd
service). Both are now lazy-imported only inside the functions that need
them (/box multiline input, /image file picker fallback).
• telegram_bridge is fully bundled inside ai_terminal.bin — no separate
.py file needs to be deployed alongside the binary.
⚡ 2026.06.05-r1
🟢 Per-Project Memory — Coder Mode
• Each project folder now gets its own stable conversation_id stored in
/.electra_session.json (Coder mode only).
• Opening the same folder again reconnects the AI to that project's
server-side MemPalace thread — full long-term project memory.
• Different folders get different IDs — no cross-project memory bleed.
• Terminal shows "🧠 Project memory: Returning session (ID xxxxxxxx…)"
or "New session" so you always know which memory thread is active.
• Chat and Command modes are unaffected — they keep their own global
persistent IDs (~/.electra_chat_id and ~/.electra/command_id).
• .electra_session.json excluded from file tree, vector index, and codebase map.
• Falls back silently to the global coder_id on read-only filesystems.
⚡ 2026.06.05
🟢 GUI — Safe Workspace Redirect
• Home directory, Desktop, Downloads, Documents and other system folders are now
blocked as workspace roots — the GUI silently redirects to ~/workspace/project_
so the file-tree indexer never crawls tens-of-thousands of unrelated files.
• _safe_workspace() guard applied at three points: GUI init (cwd on launch),
"New Workspace" folder picker, and the --cwd argument parser.
• --cwd guard extended to cover --gui launches (previously only --coder/--writer).
• Unsafe directory list expanded: ~/Downloads, ~/Documents, ~/Pictures, ~/Videos,
~/Music, ~/Public, ~/Templates, /tmp, /root, /, /home.
🟢 GUI — Collapsible Thinking Blocks
• AI thinking blocks now collapse automatically the moment the full response
arrives (ChatGPT-style). A ▾ arrow in the header lets users re-expand any time.
• Thinking summary preview (first 70 chars) shown inline while collapsed.
🟢 GUI — Default Theme Changed to Light Ink
• Light Ink is now the default theme on first launch.
🟢 GUI — Deferred File-Tree Indexing
• File tree now populates in a background thread after the window appears —
GUI opens instantly instead of hanging on large directories.
• "● Indexing workspace files…" / "✓ Workspace ready" status shown in activity log.
• Vector index start/done also surfaced in activity log via indexing_status callback.
🟢 GUI — Auto Mode-Switch from Routing Agent
• When the routing agent routes a prompt to CODER or WRITER, the GUI tab
switches automatically — no need to manually click the mode buttons.
⚡ 2026.06.03-r2
🔴 Bug Reporting & Error Auto-Filing
• /report, /bug, /bugs now open GitHub Issues in the browser.
• Added _auto_report() — silent background GitHub issue filer hooked into all
major error paths (Chat, Coder, Command agents).
• 3-layer dedup: in-memory (1hr) → local ledger → GitHub search.
• Recurrence comments rate-limited to once per 24h per machine per error fingerprint.
• Fixed stamp write race in release notes popup.
⚡ 2026.06.03
🔴 Core Coder Agent & Context Retention Fixes
• Persistent context logging restored — fallback/retry states now write to
coding_history, fixing conversation continuity during network recovery.
• conversation_id promoted to a top-level payload key across 10 request sites.
• Surgical file tools now update LAST_WRITTEN_FILE and trigger background re-indexing.
🟠 Tool Integrations & Router Fixes
• Weather keyword hijack fixed — CPU/RAM/disk terms no longer trigger weather routing.
• Binary file read crashes fixed (errors="replace").
• tags stripped from AI responses before saving to compressed history.
🟡 GUI Editor Fixes
• Diff hunk double-newline corruption fixed.
• Duplicate stream-end signal fixed.
• /ghost command initialisation fixed.
• GUI loading indicators now activate correctly during planning phases.