diff --git a/tickets/fix-proxmox-and-ai-issues.md b/tickets/fix-proxmox-and-ai-issues.md new file mode 100644 index 00000000..efbc690d --- /dev/null +++ b/tickets/fix-proxmox-and-ai-issues.md @@ -0,0 +1,79 @@ +# Fix: Proxmox Dashboard and AI Chat Issues + +## Description + +Resolved 7 bugs across the Proxmox management dashboard and the AI triage chat that rendered several features non-functional. Issues were verified against a live Proxmox VE host at `172.0.0.18`. + +## Acceptance Criteria + +- [x] VM action menu items (start, stop, reboot, shutdown, suspend, resume, migrate, clone, delete) execute and close the menu +- [x] Migration dialog presents a "Target Remote" dropdown listing all configured clusters for cross-datacenter migration +- [x] Storage page displays actual storage from PVE (cluster-wide, with correct size/used/available figures) +- [x] Network interface "Type" field is a dropdown of all valid PVE interface types, not a free-text input +- [x] Firewall "New Rule" button opens a dialog with action/protocol/source/dest/port fields that submits to PVE +- [x] Backup page renders all backup jobs configured in PVE with their storage target, schedule, VM list, and next-run time +- [x] AI chat with Qwen 3.5 (via LiteLLM) no longer throws `BadRequestError: System message must be at the beginning` +- [x] `cargo check`, `cargo clippy -D warnings`, `tsc --noEmit`, `eslint --max-warnings 0`, all Rust tests (432), all frontend tests (386) pass + +## Work Implemented + +### Issue 1 — VM Actions: Tauri param name mismatch + menu state + +**Root cause**: `VMList` internally re-fetched cluster data on its own, causing a race condition; all VM action Tauri commands used `node: String` but the frontend sent `nodeId` (Tauri 2.x maps camelCase `nodeId` → snake_case `node_id`, so no value arrived); action menu buttons had no `onClick` handlers. + +**Fix**: +- `src/pages/Proxmox/VMsPage.tsx`: pass `clusterId` and `clusters` props to ``. +- `src/components/Proxmox/VMList.tsx`: accept those props, remove internal cluster `useEffect`, wire all action buttons through `handleAction()` wrapper (closes menu, stops propagation). +- `src-tauri/src/commands/proxmox.rs`: renamed `node: String` → `node_id: String` (and body usages) in `get_proxmox_vm`, `start_proxmox_vm`, `stop_proxmox_vm`, `reboot_proxmox_vm`, `shutdown_proxmox_vm`, `resume_proxmox_vm`, `suspend_proxmox_vm`, `clone_vm`, `delete_vm`. + +### Issue 2 — Migration: no Target Remote option + +**Fix**: `VMList.tsx` `MigrationDialog` now receives `clusters` and `currentClusterId` props; when more than one cluster is configured a "Target Remote" `` with a `