Guest info screen: backups, backup now, network (read-only) #3

Merged
Duckboot merged 3 commits from feat/guest-info into main 2026-11-02 21:17:27 +01:00
Owner

What

Press i on a guest to open an info screen.

  • Backups: the guest's backups from every storage that holds backups, newest first, with date, storage, size, format and notes. The backup jobs that cover the guest are listed above them (schedule, storage, keep-last).
  • Backup now: press b in the info screen. It takes a snapshot backup compressed with zstd, like the scheduled job, to a storage you choose (the job's storage is preselected). It asks for confirmation, marks the guest busy and waits for the task to finish.
  • Network (read-only):
    • What is configured in netN: bridge, VLAN, MAC, IPv4 and IPv6 settings, firewall. For VMs the IP settings come from ipconfigN.
    • The addresses actually in use, read from the container, or for VMs from the guest agent.
  • Backups from earlier guests with the same VMID: Proxmox ties backups to the VMID only, so a deleted guest's backups showed up under the new guest. They are now hidden by default when their notes name another guest. A line says how many are hidden, and a shows them.

Design and the CLI output formats it relies on: the "Guest info screen" section of docs/plans/guest-tui-mvp.md. Editing the network is delivery B, which is not in this PR.

Bugs fixed before merge

  • Crash on real data: prune-backups arrives as a JSON string. The code treated it as a dict, which crashed the app; a read-only live check during review caught it.
  • Missing IPv6: for containers, the CLI's inet6 field only holds the link-local address, so the global SLAAC address was missing. Addresses are now read from ip-addresses.
  • Stale status: the info screen now uses the guest's live status instead of the table's.
  • Odd API data: a missing size or an unknown address type no longer crashes the app.

Verification

  • 164 tests pass; cv4pve-cli is mocked.
  • ruff check and ruff format --check report no issues.
  • betterleaks found no secrets.
  • Read-only live check of the info screen for CT 104 and VM 108.
  • "Backup now" tested by the user on CT 104: debian (manual) was created and listed first.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

## What Press `i` on a guest to open an info screen. - **Backups:** the guest's backups from every storage that holds backups, newest first, with date, storage, size, format and notes. The backup jobs that cover the guest are listed above them (schedule, storage, `keep-last`). - **Backup now:** press `b` in the info screen. It takes a snapshot backup compressed with zstd, like the scheduled job, to a storage you choose (the job's storage is preselected). It asks for confirmation, marks the guest busy and waits for the task to finish. - **Network (read-only):** - What is configured in `netN`: bridge, VLAN, MAC, IPv4 and IPv6 settings, firewall. For VMs the IP settings come from `ipconfigN`. - The addresses actually in use, read from the container, or for VMs from the guest agent. - **Backups from earlier guests with the same VMID:** Proxmox ties backups to the VMID only, so a deleted guest's backups showed up under the new guest. They are now hidden by default when their notes name another guest. A line says how many are hidden, and `a` shows them. Design and the CLI output formats it relies on: the "Guest info screen" section of `docs/plans/guest-tui-mvp.md`. Editing the network is delivery B, which is not in this PR. ## Bugs fixed before merge - **Crash on real data:** `prune-backups` arrives as a JSON string. The code treated it as a dict, which crashed the app; a read-only live check during review caught it. - **Missing IPv6:** for containers, the CLI's `inet6` field only holds the link-local address, so the global SLAAC address was missing. Addresses are now read from `ip-addresses`. - **Stale status:** the info screen now uses the guest's live status instead of the table's. - **Odd API data:** a missing size or an unknown address type no longer crashes the app. ## Verification - 164 tests pass; `cv4pve-cli` is mocked. - `ruff check` and `ruff format --check` report no issues. - `betterleaks` found no secrets. - Read-only live check of the info screen for CT 104 and VM 108. - "Backup now" tested by the user on CT 104: `debian (manual)` was created and listed first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Duckboot added 3 commits 2026-11-02 21:17:24 +01:00
Press i on a guest to see its backups and network. Backups from every
backup-capable storage are listed newest first, with the backup jobs
that cover the guest. The network part shows the netN settings
(bridge, VLAN, MAC, IPv4/IPv6 setting, firewall) and the addresses in
use.

Press b in the info screen to back the guest up now: snapshot mode and
zstd, like the scheduled job, to a storage you pick (the job's storage
is preselected). It asks for confirmation, marks the guest busy and
uses --wait.

Fixed after review and a read-only live check:
- prune-backups arrives as a JSON string; parsing it as a dict
  crashed the app.
- CT addresses come from ip-addresses. inet6 holds only the
  link-local address, so the global SLAAC address was missing.
- The info screen uses the guest's live status, and odd API data
  (null size, unknown address types) no longer kills the app.
- The test fake now copies guest dicts; a shared constant was being
  mutated across tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Proxmox ties backups to the VMID only, so a deleted guest's backups
were listed under the new guest with that VMID. CT 104 showed planka
backups next to debian's, and VM 108 showed vaultwarden backups.

Backups whose notes name another guest are now hidden by default. The
notes come from the job's {{guestname}}, so "debian (manual)" still
counts as debian. A line says how many are hidden, and the a key shows
them, marked "(earlier guest)". Backups without notes are always
shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Duckboot merged commit b874996b1d into main 2026-11-02 21:17:27 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Duckboot/cv4pve-cli-tui#3