fix(proxmox): resolve 7 dashboard and AI chat issues #129

Merged
sarman merged 6 commits from fix/proxmox-issues-v2 into beta 2026-06-21 21:35:29 +00:00

6 Commits

Author SHA1 Message Date
Shaun Arman
c3298b2d77 fix(fmt): apply cargo fmt to resolve CI formatting check failure
All checks were successful
Test / frontend-typecheck (pull_request) Successful in 1m51s
Test / frontend-tests (pull_request) Successful in 1m44s
PR Review Automation / review (pull_request) Successful in 6m43s
Test / rust-fmt-check (pull_request) Successful in 12m17s
Test / rust-clippy (pull_request) Successful in 14m1s
Test / rust-tests (pull_request) Successful in 15m36s
2026-06-21 16:18:23 -05:00
Shaun Arman
627373f433 fix(proxmox): address second PR review pass — menu positioning + code clarity
Some checks failed
Test / frontend-typecheck (pull_request) Successful in 2m22s
Test / frontend-tests (pull_request) Successful in 1m50s
PR Review Automation / review (pull_request) Successful in 7m30s
Test / rust-fmt-check (pull_request) Failing after 14m24s
Test / rust-clippy (pull_request) Successful in 15m51s
Test / rust-tests (pull_request) Has been cancelled
- VMList VMActionMenu: restore viewport-aware positioning using useEffect +
  ref (reads menuContentRef.current after render, avoiding the react-hooks/refs
  ESLint violation that blocked the previous ref-during-render approach);
  menu flips upward when less than 20px remain below the viewport bottom
- VMList MigrationDialog: extract disabled condition to canSubmitMigration()
  helper for clarity; removes the inline comment in favour of readable code
- proxmox.rs list_proxmox_datastores: add tracing::debug! for generated
  storage IDs and tracing::warn! + early return for entries with empty
  storage names (catches unexpected API edge cases)
2026-06-21 16:02:26 -05:00
Shaun Arman
58b4d59e6d fix(proxmox): address PR review findings
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m38s
Test / frontend-typecheck (pull_request) Successful in 1m46s
PR Review Automation / review (pull_request) Successful in 5m37s
Test / rust-fmt-check (pull_request) Failing after 12m26s
Test / rust-clippy (pull_request) Successful in 13m43s
Test / rust-tests (pull_request) Successful in 16m4s
- Storage: prevent double-slash ID when cluster/resources returns
  shared storage without a node field (e.g. "storage//PBS_TFTSR"
  → "storage/PBS_TFTSR")
- Firewall: add comment explaining why rule_num is omitted from
  add_rule — PVE assigns position (pos) automatically on creation
- Network: replace misleading "implementation pending" toasts with
  an immediate warning; dialog no longer opens since backend commands
  (POST/PUT/DELETE nodes/{node}/network) are not yet implemented
- Backup: same treatment for New Job — warns immediately instead of
  opening a form that silently does nothing
- VMList: add comment explaining handleVMAction receives clusterId
  from props (not a stale closure over state); add inline comment
  clarifying the migration button disabled conditions
2026-06-21 15:48:09 -05:00
Shaun Arman
671ee51626 fix(firewall): correct PVE API field names for rule listing and creation
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m40s
Test / frontend-typecheck (pull_request) Successful in 1m53s
PR Review Automation / review (pull_request) Successful in 6m27s
Test / rust-fmt-check (pull_request) Failing after 12m7s
Test / rust-clippy (pull_request) Successful in 13m31s
Test / rust-tests (pull_request) Successful in 15m12s
PVE firewall rules use pos (not rule_num), proto (not protocol), and
enable as 0/1 integer (not enabled bool). Fix list_firewall_rules and
add_rule in firewall.rs to use correct field names. Normalize Tauri
command response to include rule/status fields that FirewallRuleList
expects. add_rule now sends required type: in field and only includes
optional fields when non-empty.
2026-06-21 15:28:24 -05:00
Shaun Arman
37f729923b docs: add ticket summary for proxmox and AI chat fixes 2026-06-21 15:09:57 -05:00
Shaun Arman
577512562b fix(proxmox): resolve 7 dashboard and AI chat issues
1. VM Actions: pass clusterId/clusters props from VMsPage to VMList;
   rename node→node_id in 14 Rust Tauri command handlers to match
   Tauri 2.x camelCase→snake_case mapping; wire action menu items
   through handleAction so menu closes on click.

2. Migration: add Target Remote dropdown in MigrationDialog showing
   available clusters for cross-datacenter migration; targetCluster
   passed through to migrate_vm invoke.

3. Storage: switch list_proxmox_datastores to cluster/resources?type=storage
   (single API call, cluster-wide); normalize plugintype→type,
   disk/maxdisk→used/size, compute available via saturating_sub.

4. Network: replace free-text Interface Type Input with a Select
   dropdown listing all PVE network interface types.

5. Firewall New Rule: add onNewRule prop to FirewallRuleList, wire
   button; add full dialog in FirewallPage with action/protocol/
   source/dest/port fields that calls add_firewall_rule; rewrite
   Rust command to accept rule as serde_json::Value instead of
   flat params (matches frontend invoke signature).

6. Backup: normalize raw PVE cluster/backup fields (id, storage,
   node, schedule, enabled, next-run timestamp) to BackupJobInfo
   shape; update BackupJobList columns to show storage, vmid, mode.

7. AI chat: merge all system prompt sections into a single system
   message (fixes Qwen 3.5 / LiteLLM rejection of multiple system
   messages); push assistant message with tool_calls before tool
   result messages to satisfy OpenAI API contract.
2026-06-21 15:08:56 -05:00