Skip to content

fix(gui): implement missing Tauri backend commands for action gap fixes#363

Merged
echobt merged 1 commit intomasterfrom
fix/gui-action-gaps-audit-fixes
Jan 27, 2026
Merged

fix(gui): implement missing Tauri backend commands for action gap fixes#363
echobt merged 1 commit intomasterfrom
fix/gui-action-gaps-audit-fixes

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 27, 2026

Summary

This PR addresses the Action Gaps audit findings for the cortex-gui IDE, implementing 16 missing backend commands that were invoked from the frontend but had no corresponding Tauri command handler.

Problem

The previous audit identified that many UI elements in the IDE were non-functional because they invoked backend commands that didn't exist. This caused silent failures when users:

  • Used search and replace functionality
  • Executed notebook cells
  • Tried to terminate processes from the Process Explorer
  • Used git operations like branch rename, reset, or clean

Solution

New Modules

search.rs - Search and replace functionality

  • search_replace_all: Replace matches across multiple files
  • search_replace_in_file: Replace all matches in a single file
  • search_replace_match: Replace a single match

notebook.rs - Notebook kernel execution

  • notebook_execute_cell: Execute code in a notebook cell
  • notebook_interrupt_kernel: Interrupt running kernel
  • notebook_shutdown_kernel: Shutdown a kernel
  • notebook_start_kernel: Start a new kernel for a notebook

process.rs - Process management

  • terminate_cortex_process: Kill processes with Unix/Windows support

Git Enhancements (git.rs)

  • git_branch_rename: Rename a local branch
  • git_reset_soft: Soft reset to a commit (keeps changes staged)
  • git_clean: Clean untracked files
  • git_stage_lines: Stage specific lines from a file
  • git_unstage_lines: Unstage specific lines from a file
  • git_remote_add/remove/rename: Aliases for frontend naming conventions

Testing

  • Cargo check passes successfully
  • All new commands are properly registered in lib.rs
  • Code formatted with cargo fmt

Audit Report

The updated AUDIT_REPORT.md now reflects the status of all fixes and remaining work.

Breaking Changes

None - all changes are additive.

This PR addresses the Action Gaps audit findings for the cortex-gui IDE,
implementing 16 missing backend commands that were invoked from the frontend.

## Changes

### New Modules
- **search.rs**: Search and replace functionality
  - search_replace_all: Replace matches across multiple files
  - search_replace_in_file: Replace all matches in a single file
  - search_replace_match: Replace a single match

- **notebook.rs**: Notebook kernel execution
  - notebook_execute_cell: Execute code in a notebook cell
  - notebook_interrupt_kernel: Interrupt running kernel
  - notebook_shutdown_kernel: Shutdown a kernel
  - notebook_start_kernel: Start a new kernel for a notebook

- **process.rs**: Process management
  - terminate_cortex_process: Kill processes with Unix/Windows support

### Git Enhancements (git.rs)
- git_branch_rename: Rename a local branch
- git_reset_soft: Soft reset to a commit (keeps changes staged)
- git_clean: Clean untracked files
- git_stage_lines: Stage specific lines from a file
- git_unstage_lines: Unstage specific lines from a file
- git_remote_add: Alias for frontend naming convention
- git_remote_remove: Alias for frontend naming convention
- git_remote_rename: Alias for frontend naming convention

### Updated Files
- lib.rs: Registered all new commands in invoke_handler
- AUDIT_REPORT.md: Updated with fix status

## Impact
- Fixes silent failures when using search/replace in project
- Enables notebook cell execution
- Allows proper process termination from Process Explorer
- Fixes git branch rename, reset, clean operations
- Resolves naming mismatches between frontend and backend
@echobt echobt merged commit 4271e8c into master Jan 27, 2026
@echobt echobt deleted the fix/gui-action-gaps-audit-fixes branch January 27, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants