feat(tui): per-VM display preference (auto/window/vnc) - #25
Conversation
Add config.VM.Display: "", "auto", "window", or "vnc". Empty means auto, so existing vm.toml files keep their current behavior. qemu.DisplayKind takes the preference as its first argument. It stays a host veto: a "window" preference still falls back to VNC on a host with no graphical session, since qemu exits 1 on -display gtk there. core.validateDisplay is the one place that checks the value, called from Create/Plan and Update.
Add a display row (auto/window/vnc) to the create form and the edit form, next to the mode and console-password rows they already show as a radio group. Add a "d" key on the detail screen: it cycles auto -> window -> vnc -> auto, saves through core.Update, and toasts the new value with a note that it applies at next start. A running VM's toast also says to restart, matching the wording edit.go already uses for a deferred field.
|
Warning Review limit reached
Next review available in: 25 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (19)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Lets an installed desktop VM opt into a real qemu window. Today only the uninstalled-disk installer console gets a window; a provisioned XFCE VM renders to the VNC socket and shows nothing on the host until you attach a viewer by hand.
Schema. A
displayfield invm.toml:auto(default),window,vnc.config.VM.Displayempty reads asauto, so older vm.toml files are unaffected.validateDisplaygates both create and update; a bad value fails loudly.Rule.
qemu.DisplayKindgains the preference as its first argument:graphical(the host session check, plusSTOAT_GRAPHICAL) stays the veto, so awindowpreference degrades to VNC on a headless host instead of crashing qemu's-display gtk. Threaded throughNeedsWindow,core.DisplayKind/DisplayFor,qemu.Args, and the JSON DTO.Surfaces. A three-way selector in the create and edit forms (mirrors the existing
moderadio row). Adkey on the detail screen cycles auto → window → vnc, saves, and notes "display: (applies at next start)" — with "restart to apply" when the VM is running, since-displayis a launch argument.Tests:
DisplayKindtable across pref × mode × installed × graphical; config Save/Load round-trip; invalid-value rejection; form and detail behavior.just checkandjust testpass.