Skip to content

Profiles tab: keep showing a running save after switching VMs - #131

Merged
A21-devs merged 1 commit into
mainfrom
fix/profiles-tab-work
Dec 2, 2026
Merged

A21-devs merged 1 commit into
mainfrom
fix/profiles-tab-work

Conversation

@A21-devs

@A21-devs A21-devs commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Closes #127

The Profiles tab kept its own busy state, and VmDetail is keyed by the VM name. Selecting another VM and coming back mounted a fresh tab with busy = null while the save was still running in the backend: Save, Launch, Edit and Delete were enabled again (and failed with "is still busy with another profile"), and while the VM was off mid-save the hint said it would save the disk only.

  • VmDetail now gets the work kind (VmWork) from App instead of the label, works out the label itself for the status and the Hardware lock, and passes the kind to the Profiles tab.
  • The Profiles tab disables everything while there is work, its own or the backend's. That includes disk work from Toolbar: show disk work (clone, compact, grow) like profile work #130, which the backend refuses profiles for too.
  • For work the tab didn't start itself, the hint says what's running ("Saving profile on Kali. Wait for it to finish.") and the Save button reads Saving… for a save. The tab can't tell which profile a launch or delete is for, so no single row says Launching…, they all just wait.
  • The list reloads when work ends as well as on status changes, since a disk-only save doesn't change the status.

Testing

  • npm run typecheck, npm test (143 passed), npm run build
  • dev:web: powered on Kali, started a profile save, selected Parrot Home and then Kali again, opened Profiles. The hint read "Saving profile on Kali. Wait for it to finish.", the button read Saving… and the name field, Launch, Edit and Delete were all disabled. When the save finished, the new profile showed up in the list and everything was enabled again.

VmDetail is keyed by the VM name, so selecting another VM and coming
back mounted a fresh Profiles tab with busy = null while a save was
still running. Save, Launch, Edit and Delete were enabled again and the
hint said the VM was off so it would save the disk only.

VmDetail now gets the work kind instead of its label and hands it to the
Profiles tab. Every button waits while there is work, the Save button
says Saving... for a save started before the tab was shown, and the hint
says what is running. The list also reloads when work ends, since a
disk-only save doesn't change the status.

@A21-devs A21-devs left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the whole diff and tried the switch-and-come-back case in dev:web.

  • held covers every control that starts a profile call: the name and note fields, Save (and its Enter key path through canTake), Launch, Edit and Delete.
  • While the tab's own save runs, busy and work are both set, so nothing changes for the normal case. When it ends there can be a moment where busy is cleared before the null work event arrives, and the hint reads "Saving profile on Kali" for that moment. That's still true at that point, fine.
  • Adding work to the load effect reloads once more when work starts. Cheap, and it's what makes a disk-only save show up.

No changes needed here. While checking whether Edit really has to wait, I found that the backend's Profiles.edit isn't exclusive and can lose a write to meta.json against a running save or delete. The UI can't reach it after this PR, so I filed it as #132 instead of growing this one.

@A21-devs
A21-devs merged commit 876f4cf into main Dec 2, 2026
1 check passed
@A21-devs
A21-devs deleted the fix/profiles-tab-work branch December 2, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Profiles tab forgets a running save after switching VMs

1 participant