wraith/src-tauri/src/commands/workspace_commands.rs
Vantz Stockwell 1b74527a62
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 2m53s
feat: tab notifications, session persistence, Docker panel, drag reorder sidebar
Tab activity notifications:
- Background tabs pulse blue when new output arrives
- Clears when you switch to the tab
- useTerminal marks activity on every data event

Session persistence:
- Workspace saved to DB on window close (connection IDs + positions)
- Restored on launch — auto-reconnects saved sessions in order
- workspace_commands: save_workspace, load_workspace

Docker Manager (Tools → Docker Manager):
- Containers tab: list all, start/stop/restart/remove/logs
- Images tab: list all, remove
- Volumes tab: list all, remove
- One-click Builder Prune and System Prune buttons
- All operations via SSH exec channels — no Docker socket exposure

Sidebar drag-and-drop:
- Drag groups to reorder
- Drag connections between groups
- Drag connections within a group to reorder
- Blue border indicator on drop targets

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:50:49 -04:00

17 lines
495 B
Rust

//! Tauri commands for workspace persistence.
use tauri::State;
use crate::AppState;
use crate::workspace::{WorkspaceSnapshot, WorkspaceTab};
#[tauri::command]
pub fn save_workspace(tabs: Vec<WorkspaceTab>, state: State<'_, AppState>) -> Result<(), String> {
let snapshot = WorkspaceSnapshot { tabs };
state.workspace.save(&snapshot)
}
#[tauri::command]
pub fn load_workspace(state: State<'_, AppState>) -> Result<Option<WorkspaceSnapshot>, String> {
Ok(state.workspace.load())
}