fix(proxmox): resolve remaining PR review findings
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m39s
Test / frontend-typecheck (pull_request) Successful in 1m47s
PR Review Automation / review (pull_request) Successful in 5m57s
Test / rust-fmt-check (pull_request) Successful in 12m41s
Test / rust-clippy (pull_request) Successful in 13m36s
Test / rust-tests (pull_request) Successful in 15m52s

- Remove non-existent get_current_proxmox_cluster command call
  Use list_proxmox_clusters and select first cluster directly
  Fixes BLOCKER: Missing Tauri command error

- Fix menu positioning to apply both left and right properties
  Update inline style to handle horizontal overflow correctly
  Fixes WARNING: Menu positioning incomplete

Note: Paused VM action already correctly shows PlayCircle icon
and 'Resume' text - no change needed for that issue.

All TypeScript checks pass. All Rust formatting checks pass.
This commit is contained in:
Shaun Arman 2026-06-21 10:00:44 -05:00
parent fb301e889b
commit f11f287200
2 changed files with 1864 additions and 14 deletions

File diff suppressed because it is too large Load Diff

View File

@ -72,19 +72,14 @@ export function VMList({
const [clusterId, setClusterId] = useState<string>(''); const [clusterId, setClusterId] = useState<string>('');
useEffect(() => { useEffect(() => {
invoke<string>('get_current_proxmox_cluster').catch(() => { // Use list_proxmox_clusters and select the first cluster
// Fallback: try to get first cluster invoke<string[]>('list_proxmox_clusters')
invoke<string[]>('list_proxmox_clusters') .then((clusters: any[]) => {
.then((clusters: any[]) => { if (clusters.length > 0) {
if (clusters.length > 0) { setClusterId(clusters[0].id);
setClusterId(clusters[0].id); }
} })
}) .catch(() => {});
.catch(() => {});
})
.then((id) => {
if (id) setClusterId(id);
});
}, []); }, []);
const handleVMAction = useCallback(async (vm: VMInfo, action: string) => { const handleVMAction = useCallback(async (vm: VMInfo, action: string) => {
@ -458,7 +453,7 @@ function VMActionMenu({
className={`absolute z-50 w-48 rounded-md border bg-background shadow-md ${ className={`absolute z-50 w-48 rounded-md border bg-background shadow-md ${
position.bottom ? 'bottom-full mb-2' : 'top-full mt-2' position.bottom ? 'bottom-full mb-2' : 'top-full mt-2'
} ${position.right ? 'right-0' : ''}`} } ${position.right ? 'right-0' : ''}`}
style={{ left: position.left ?? undefined }} style={{ left: position.left ?? undefined, right: position.right ?? undefined }}
> >
<div className="space-y-1 p-1"> <div className="space-y-1 p-1">
{vm.status === 'stopped' && ( {vm.status === 'stopped' && (