feat(proxmox): implement full feature parity with snapshot and network CRUD #131
No reviewers
Labels
No Label
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sarman/tftsr-devops_investigation#131
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/proxmox-full-parity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves all 6 Proxmox issues for full DCM parity
Automated PR Review:This PR was reviewed in 3 batches (1 batch(es) failed).
Batch 1 of 3
Review unavailable — LLM returned HTTP 400.
Batch 2 of 3
Code Review Summary
This PR implements snapshot and network interface CRUD operations for Proxmox VMs, completing feature parity goals. The implementation appears functionally correct with proper Tauri command registration, TypeScript bindings, and frontend integration.
Findings
[WARNING] src-tauri/src/commands/proxmox.rs:2379 - Duplicate NetworkInterfaceConfig struct definition
NetworkInterfaceConfigstruct andserde_bool_as_inthelper module are defined in bothsrc-tauri/src/commands/proxmox.rs(lines 2379-2414) ANDsrc-tauri/src/proxmox/network.rs(lines 37-66)proxmox.rsand import fromproxmox::network::NetworkInterfaceConfiginstead[SUGGESTION] src/components/Proxmox/VMList.tsx:215 - Missing snapshot display in list operation
listcase logs snapshots to console but only shows toast with count:toast.success(\Found ${snapshots.length} snapshot(s) for ${vm.name}`)` without displaying the actual snapshot list to the user[SUGGESTION] src/components/Proxmox/VMList.tsx:229,244 - Blocking UI dialogs
window.prompt()andwindow.confirm()which block the UI thread and don't match the app's design patternsVerdict: APPROVE WITH COMMENTS
The implementation is functionally complete and passes all stated tests. The duplicate struct definition is a maintainability concern that should be addressed. The UI suggestions are minor enhancements that could be handled in a follow-up PR.
Batch 3 of 3
Summary
This batch shows the TypeScript client additions for Proxmox network interface and snapshot operations. The code follows the established Tauri command pattern and appears structurally sound. However, there are a few type safety and error handling concerns worth addressing.
Findings
[SUGGESTION] src/lib/proxmoxClient.ts:1086 -
listProxmoxSnapshotsreturnsPromise<any[]>instead of a typed interfaceEvidence:
invoke<any[]>("list_proxmox_snapshots", { clusterId, nodeId, vmid });Fix: Create a
ProxmoxSnapshotinterface with fields likename,vmid,snapshot,ctime,snaptypeand usePromise<ProxmoxSnapshot[]>[SUGGESTION] src/lib/proxmoxClient.ts:1098, 1112, 1126 - Snapshot and network functions return
Promise<void>without error propagationEvidence:
invoke<void>("create_proxmox_snapshot", { clusterId, nodeId, vmid, snapshotName });Fix: Consider returning operation status or task ID if the backend provides it, to enable frontend polling for completion status
[SUGGESTION] src/lib/proxmoxClient.ts:1005 -
NetworkInterfaceConfighas inconsistent optionality withNetworkInterfaceEvidence:
NetworkInterfacehas requiredactive: booleanandautostart: boolean, whileNetworkInterfaceConfighas them as optionalFix: This is actually correct for create/update semantics, but consider adding a comment explaining the distinction between read and write models
Verdict: APPROVE WITH COMMENTS
The changes are functionally correct and follow the project's established patterns. The findings above are suggestions for improved type safety and error handling that could be addressed in a follow-up PR without blocking this merge.
Overall Verdict: APPROVE WITH COMMENTS
Overall verdict reflects the most critical finding across all batches.
Automated PR Review:This PR was reviewed in 3 batches (1 batch(es) failed).
Batch 1 of 3
Review unavailable — LLM returned HTTP 400.
Batch 2 of 3
Summary
This PR batch implements Proxmox snapshot and network interface CRUD operations. The code follows established patterns with proper Tauri command registration and TypeScript bindings. However, there is one critical compilation issue that must be resolved before merge.
Findings
[BLOCKER] src-tauri/src/commands/proxmox.rs:2379-2397 - Duplicate NetworkInterfaceConfig struct definition causing compilation failure
Evidence: The file imports
use crate::proxmox::network::NetworkInterfaceConfig;at line 2379, then immediately redefines the same struct at lines 2380-2397. This creates a naming conflict in the same scope.Fix: Remove the duplicate struct definition (lines 2379-2414) from
proxmox.rsand keep only the import statement. TheNetworkInterfaceConfigstruct already exists insrc-tauri/src/proxmox/network.rs(lines 37-66) with proper serde_bool_as_int serialization.[SUGGESTION] src-tauri/src/proxmox/network.rs:123 - NetworkInterfaceConfig serialization may fail on missing optional fields
Evidence: The
serde_bool_as_intmodule usesi8::deserialize(deserializer)?which will fail if the field is missing from the JSON. The struct has#[serde(default)]but the custom serializer/deserializer may not respect it properly.Fix: Consider using serde's
#[serde(default, with = "serde_bool_as_int")]pattern or ensure the deserializer handles missing values gracefully.Verdict: REQUEST CHANGES
The duplicate struct definition is a compilation-blocking issue that must be fixed before this PR can be merged. The serialization concern is minor and can be addressed in a follow-up if needed.
Batch 3 of 3
Summary
This batch shows the TypeScript client layer for Proxmox snapshot and network interface operations. The implementation follows established Tauri command patterns and integrates properly with the VMList component. The code is functionally correct with proper TypeScript interfaces and error handling in the UI layer.
Findings
[SUGGESTION] src/lib/proxmoxClient.ts:1086 -
listProxmoxSnapshotsreturnsPromise<any[]>instead of a typed interfaceEvidence:
invoke<any[]>("list_proxmox_snapshots", { clusterId, nodeId, vmid });Fix: Replace
any[]withProxmoxSnapshot[]using the interface defined in VMList.tsx[SUGGESTION] src/lib/proxmoxClient.ts:1098, 1112, 1126 - Snapshot and network functions return
Promise<void>without error propagationEvidence:
invoke<void>("create_proxmox_snapshot", { clusterId, nodeId, vmid, snapshotName });Fix: Consider returning operation status or task ID if the backend provides it, to enable frontend polling for completion status
Verdict: APPROVE WITH COMMENTS
The changes are functionally correct and follow the project's established patterns. The findings above are suggestions for improved type safety and error handling that could be addressed in a follow-up PR without blocking this merge.
Overall Verdict: REQUEST CHANGES
Overall verdict reflects the most critical finding across all batches.
- Add ISO upload via OS file picker: multipart POST to nodes/{node}/storage/{storage}/upload, returns task UPID; Upload ISO button in CreateVmDialog triggers dialog filtered to .iso files - Add cluster/datacenter selector to CreateVmDialog (shown when >1 cluster configured) - Replace ISO text input with dropdown populated from listIsoImages; falls back to text input when storage has no ISOs - Rewrite NetworkPage with full CRUD: add/edit/delete interfaces via dialog, Checkbox toggles for active/autostart, per-row Edit/Delete buttons - Fix serde_bool_as_int deserializer to accept both bool and integer using visitor pattern - Fix Content-Type conflict: remove pre-set header from build_headers(), let .json()/.form() manage it (root cause of 400 Bad Request on VM start/migrate) - Fix migration: remove invalid targetcluster/targetstorage params, switch to JSON body - Security: wire validate_pve_identifier() into all 9 path-interpolating commands (list/create/update/delete network interfaces, all 4 snapshot commands, list/upload ISO) — previously only create_proxmox_vm was guarded - Add post_multipart() method to ProxmoxClient for multipart form-data requests - Add uploadIsoImage TypeScript wrapper and update proxmoxClient exports - Update IPC-Commands wiki with all new and previously undocumented commandsAutomated PR Review:This PR was reviewed in 3 batches (1 batch(es) failed).
Batch 1 of 3
Review unavailable — LLM returned HTTP 400.
Batch 2 of 3
Summary
This PR implements Proxmox snapshot and network interface CRUD operations to achieve feature parity with Proxmox Datacenter Manager. The code follows established Tauri command patterns with proper validation. However, there is a critical compilation-blocking issue that must be resolved before merge.
Findings
[BLOCKER] src-tauri/src/commands/proxmox.rs:2379-2397 - Duplicate NetworkInterfaceConfig struct definition causing compilation failure
Evidence: The file imports
use crate::proxmox::network::NetworkInterfaceConfig;at line 2379, then immediately redefines the same struct at lines 2380-2397:Fix: Remove the duplicate struct definition (lines 2380-2397) and the associated
serde_bool_as_intmodule fromproxmox.rs. Keep only the import statement. TheNetworkInterfaceConfigstruct already exists insrc-tauri/src/proxmox/network.rswith proper serialization.[SUGGESTION] src/components/Proxmox/VMList.tsx:215 - Missing snapshot display in list operation
Evidence: The
listcase logs snapshots to console but only shows toast with count:toast.success(\Found ${snapshots.length} snapshot(s) for ${vm.name}`)` without displaying the actual snapshot list to the userFix: Consider showing snapshot names in a toast, modal, or console output that users can actually see
[SUGGESTION] src/components/Proxmox/VMList.tsx:229,244 - Blocking UI dialogs
Evidence: Uses
window.prompt()andwindow.confirm()which block the UI thread and don't match the app's design patternsFix: Consider using React-based dialog components consistent with the rest of the application (e.g., similar to migration dialog)
Verdict: REQUEST CHANGES
The duplicate struct definition is a compilation-blocking issue that must be fixed before this PR can be merged. The UI suggestions are minor enhancements that could be handled in a follow-up PR.
Batch 3 of 3
Summary
This batch implements the TypeScript client layer for Proxmox snapshot and network interface operations, along with the corresponding React UI components. The code follows established Tauri command patterns with proper type definitions and error handling in the UI layer.
Findings
No findings.
The code in this batch is functionally correct:
src-tauri/src/proxmox/vm.rscontains complete snapshot CRUD operations (create, delete, rollback, list) with proper error handlingsrc/lib/proxmoxClient.tshas theProxmoxSnapshotinterface properly defined (resolving the Batch 3 review suggestion aboutany[]return types)src/components/Proxmox/VMList.tsxcorrectly implements snapshot dialogs with user confirmations for destructive actionssrc/pages/Proxmox/NetworkPage.tsxproperly uses theNetworkInterfaceConfigtype with appropriate field optionalityThe duplicate
NetworkInterfaceConfigstruct issue identified in Batch 2 is insrc-tauri/src/commands/proxmox.rs, which is not included in this batch. This batch's TypeScript and frontend code is clean.Verdict: APPROVE
The changes are functionally complete and follow established project patterns. No blocking issues exist in this batch.
Overall Verdict: REQUEST CHANGES
Overall verdict reflects the most critical finding across all batches.
(line 9 import), not window.confirm.