|
| 1 | +# Deep Audit Report: Cortex GUI Action Gaps |
| 2 | + |
| 3 | +**Audit Date:** January 27, 2026 |
| 4 | +**Auditor Role:** Senior Full-Stack Engineer / Lead QA |
| 5 | +**Project:** cortex-gui (Tauri + SolidJS IDE) |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Executive Summary |
| 10 | + |
| 11 | +This deep audit identified **5 Critical Broken Bridges** where the frontend attempts to invoke backend commands that do not exist, **3 UX Improvement Areas** with missing visual feedback, and several **minor issues** that could affect user experience. |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## 1. CRITICAL FAILURES: Broken Tauri Bridges |
| 16 | + |
| 17 | +### 1.1 Missing DevContainer Backend Commands |
| 18 | +**Severity:** 🔴 CRITICAL |
| 19 | +**Location:** `src/context/RemoteContext.tsx` (lines 1089-1237) |
| 20 | + |
| 21 | +The frontend invokes the following DevContainer commands that have **NO backend implementation**: |
| 22 | + |
| 23 | +| Frontend Invoke | Backend Status | Impact | |
| 24 | +|-----------------|---------------|--------| |
| 25 | +| `devcontainer_connect` | ❌ Missing | Cannot connect to dev containers | |
| 26 | +| `devcontainer_start` | ❌ Missing | Cannot start dev containers | |
| 27 | +| `devcontainer_stop` | ❌ Missing | Cannot stop dev containers | |
| 28 | +| `devcontainer_remove` | ❌ Missing | Cannot remove dev containers | |
| 29 | +| `devcontainer_save_config` | ❌ Missing | Cannot save devcontainer.json | |
| 30 | +| `devcontainer_build` | ❌ Missing | Cannot build dev containers | |
| 31 | +| `devcontainer_load_config` | ❌ Missing | Cannot load devcontainer.json | |
| 32 | +| `devcontainer_list_features` | ❌ Missing | Cannot list available features | |
| 33 | +| `devcontainer_list_templates` | ❌ Missing | Cannot list available templates | |
| 34 | + |
| 35 | +**Impact:** The entire DevContainer feature is non-functional. UI elements exist but all actions fail silently or throw unhandled errors. |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +### 1.2 Missing VS Code Compatibility Commands |
| 40 | +**Severity:** 🔴 CRITICAL |
| 41 | +**Location:** `src/context/CommandContext.tsx` (lines 76-113, 2957-2959) |
| 42 | + |
| 43 | +| Frontend Invoke | Backend Status | Impact | |
| 44 | +|-----------------|---------------|--------| |
| 45 | +| `vscode_execute_builtin_command` | ❌ Missing | Extension builtin commands fail | |
| 46 | +| `vscode_execute_command` | ❌ Missing | Extension commands fail | |
| 47 | +| `vscode_get_command_palette_items` | ❌ Missing | Command palette missing extension items | |
| 48 | + |
| 49 | +**Impact:** Extension commands registered in Command Palette cannot be executed. Users see commands but clicking them has no effect. |
| 50 | + |
| 51 | +--- |
| 52 | + |
| 53 | +### 1.3 Missing Workspace Edit Command |
| 54 | +**Severity:** 🔴 CRITICAL |
| 55 | +**Location:** `src/components/editor/RenameWidget.tsx` (lines 527, 603) |
| 56 | + |
| 57 | +| Frontend Invoke | Backend Status | Impact | |
| 58 | +|-----------------|---------------|--------| |
| 59 | +| `apply_workspace_edit` | ❌ Missing | Rename refactoring fails | |
| 60 | + |
| 61 | +**Impact:** The "Rename Symbol" (F2) refactoring feature appears to work in the editor preview but fails to persist changes to files. |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +### 1.4 Missing AI Stream Cancel Command |
| 66 | +**Severity:** 🟡 MEDIUM (currently commented out) |
| 67 | +**Location:** `src/context/AIContext.tsx` (line 636) |
| 68 | + |
| 69 | +```typescript |
| 70 | +// invoke("ai_cancel_stream", { threadId: state.activeThreadId }).catch((e) => { |
| 71 | +``` |
| 72 | + |
| 73 | +**Status:** The command is commented out, indicating awareness of the missing backend. Users cannot cancel in-progress AI streams gracefully. |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +## 2. UX IMPROVEMENTS: Missing Visual Feedback |
| 78 | + |
| 79 | +### 2.1 Silent Error Handling |
| 80 | +**Location:** Multiple files |
| 81 | + |
| 82 | +Several locations catch errors but provide no user feedback: |
| 83 | + |
| 84 | +| File | Line | Issue | |
| 85 | +|------|------|-------| |
| 86 | +| `AppCore.tsx` | 397 | `unregister_window` fails silently | |
| 87 | +| `App.tsx` | 392 | Same as above | |
| 88 | +| `SSHContext.tsx` | 803 | SSH disconnect fails silently | |
| 89 | +| `TestingContext.tsx` | 2005 | Test watcher stop fails silently | |
| 90 | + |
| 91 | +**Recommendation:** Add toast notifications or status bar messages for these operations. |
| 92 | + |
| 93 | +--- |
| 94 | + |
| 95 | +### 2.2 Incomplete View Implementation |
| 96 | +**Location:** `src/components/AuxiliaryBar.tsx` (line 187) |
| 97 | + |
| 98 | +The AuxiliaryBar shows "View not implemented" for unhandled view IDs in the right sidebar. This indicates planned but incomplete features. |
| 99 | + |
| 100 | +**Currently Implemented Views:** |
| 101 | +- ✅ outline |
| 102 | +- ✅ timeline |
| 103 | +- ✅ chat |
| 104 | +- ❌ Other views show fallback message |
| 105 | + |
| 106 | +--- |
| 107 | + |
| 108 | +### 2.3 Backend Command Not Found Warning |
| 109 | +**Location:** `src/context/TestingContext.tsx` (line 344) |
| 110 | + |
| 111 | +```typescript |
| 112 | +// Backend command not implemented - use fallback detection (this is expected) |
| 113 | +``` |
| 114 | + |
| 115 | +This is documented but indicates feature parity gaps. |
| 116 | + |
| 117 | +--- |
| 118 | + |
| 119 | +## 3. NAVIGATION & UI INTEGRITY |
| 120 | + |
| 121 | +### 3.1 Event Listeners Audit ✅ |
| 122 | +All major components have proper event handlers: |
| 123 | + |
| 124 | +| Component | Status | |
| 125 | +|-----------|--------| |
| 126 | +| TitleBar.tsx | ✅ All window controls functional | |
| 127 | +| ActivityBar.tsx | ✅ All tab buttons have handlers | |
| 128 | +| MenuBar.tsx | ✅ All menu items have actions | |
| 129 | +| Sidebar.tsx | ✅ All action buttons functional | |
| 130 | +| Layout.tsx | ✅ Resize handles work correctly | |
| 131 | + |
| 132 | +### 3.2 Dead Navigation Links |
| 133 | +**None found.** All navigation links in the sidebar properly update SolidJS signals. |
| 134 | + |
| 135 | +--- |
| 136 | + |
| 137 | +## 4. IDE-SPECIFIC FLOW AUDIT |
| 138 | + |
| 139 | +### 4.1 File System Operations ✅ |
| 140 | +- "New File" → Triggers `fs_create_file` ✅ |
| 141 | +- "Open Folder" → Uses Tauri dialog + `create_new_window` ✅ |
| 142 | +- "Save" → Calls `fs_write_file` ✅ |
| 143 | + |
| 144 | +### 4.2 Process Management |
| 145 | +- "Run" (Debug) → `debug_start_session` ✅ (backend exists) |
| 146 | +- "Stop" → `debug_stop_session` ✅ (backend exists) |
| 147 | +- Terminal management → All PTY commands exist ✅ |
| 148 | + |
| 149 | +### 4.3 Terminal & Editor Layout ✅ |
| 150 | +- Toggle terminal → Works correctly via TerminalState |
| 151 | +- Toggle sidebar → Works correctly via Layout state |
| 152 | +- Resize panels → Working resize handles |
| 153 | + |
| 154 | +--- |
| 155 | + |
| 156 | +## 5. ACTION PLAN: Required Fixes |
| 157 | + |
| 158 | +### Priority 1: Critical Backend Implementations |
| 159 | + |
| 160 | +#### Fix 1: Add DevContainer Backend Stub Commands |
| 161 | +Create placeholder commands in `src-tauri/src/remote.rs` to prevent crashes: |
| 162 | + |
| 163 | +```rust |
| 164 | +#[tauri::command] |
| 165 | +pub async fn devcontainer_connect(container_id: String) -> Result<(), String> { |
| 166 | + Err("DevContainer support is not yet implemented".to_string()) |
| 167 | +} |
| 168 | + |
| 169 | +#[tauri::command] |
| 170 | +pub async fn devcontainer_start(container_id: String) -> Result<(), String> { |
| 171 | + Err("DevContainer support is not yet implemented".to_string()) |
| 172 | +} |
| 173 | + |
| 174 | +// ... similar for stop, remove, save_config, build, load_config, list_features, list_templates |
| 175 | +``` |
| 176 | + |
| 177 | +#### Fix 2: Add VS Code Command Stub |
| 178 | +Create `src-tauri/src/extensions.rs` additions: |
| 179 | + |
| 180 | +```rust |
| 181 | +#[tauri::command] |
| 182 | +pub async fn vscode_execute_builtin_command(command: String, args: Vec<serde_json::Value>) -> Result<(), String> { |
| 183 | + Err(format!("VS Code command '{}' is not available in Cortex", command)) |
| 184 | +} |
| 185 | + |
| 186 | +#[tauri::command] |
| 187 | +pub async fn vscode_execute_command(command: String, args: Vec<serde_json::Value>) -> Result<(), String> { |
| 188 | + Err(format!("Extension command '{}' is not available", command)) |
| 189 | +} |
| 190 | +``` |
| 191 | + |
| 192 | +#### Fix 3: Add Workspace Edit Command |
| 193 | +Create `src-tauri/src/fs.rs` addition: |
| 194 | + |
| 195 | +```rust |
| 196 | +#[tauri::command] |
| 197 | +pub async fn apply_workspace_edit( |
| 198 | + uri: String, |
| 199 | + edits: Vec<TextEdit>, |
| 200 | +) -> Result<(), String> { |
| 201 | + // Implementation using fs_write_file internally |
| 202 | +} |
| 203 | +``` |
| 204 | + |
| 205 | +### Priority 2: UX Improvements |
| 206 | + |
| 207 | +#### Fix 4: Add Error Toasts for Silent Failures |
| 208 | +Update catch handlers to show user notifications: |
| 209 | + |
| 210 | +```typescript |
| 211 | +// Before |
| 212 | +invoke("unregister_window", { label }).catch(() => {}); |
| 213 | + |
| 214 | +// After |
| 215 | +invoke("unregister_window", { label }).catch((e) => { |
| 216 | + console.error("Failed to unregister window:", e); |
| 217 | + // Optionally show toast for critical failures |
| 218 | +}); |
| 219 | +``` |
| 220 | + |
| 221 | +--- |
| 222 | + |
| 223 | +## 6. SUMMARY METRICS |
| 224 | + |
| 225 | +| Category | Count | Status | |
| 226 | +|----------|-------|--------| |
| 227 | +| Critical Missing Commands | 12 | 🔴 Needs Fix | |
| 228 | +| Silent Error Handlers | 4 | 🟡 Should Fix | |
| 229 | +| Incomplete Views | 1 | 🟢 Expected (WIP) | |
| 230 | +| Dead Navigation Links | 0 | ✅ All Good | |
| 231 | +| Missing Event Handlers | 0 | ✅ All Good | |
| 232 | + |
| 233 | +--- |
| 234 | + |
| 235 | +## Appendix: Full List of Missing Backend Commands |
| 236 | + |
| 237 | +``` |
| 238 | +devcontainer_connect |
| 239 | +devcontainer_start |
| 240 | +devcontainer_stop |
| 241 | +devcontainer_remove |
| 242 | +devcontainer_save_config |
| 243 | +devcontainer_build |
| 244 | +devcontainer_load_config |
| 245 | +devcontainer_list_features |
| 246 | +devcontainer_list_templates |
| 247 | +vscode_execute_builtin_command |
| 248 | +vscode_execute_command |
| 249 | +vscode_get_command_palette_items |
| 250 | +apply_workspace_edit |
| 251 | +``` |
| 252 | + |
| 253 | +--- |
| 254 | + |
| 255 | +*Generated by Deep Audit Tool - Cortex GUI v0.1.0* |
0 commit comments