Skip to content

Opt-out host integrations, D-Bus display, and bug fixes - #1

Merged
KitsuneSemCalda merged 4 commits into
masterfrom
integrations-opt-out-and-fixes
Sep 30, 2026
Merged

KitsuneSemCalda merged 4 commits into
masterfrom
integrations-opt-out-and-fixes

Conversation

@KitsuneSemCalda

Copy link
Copy Markdown
Collaborator

Summary

Host integrations are on by default and can be turned off per environment in Settings:

  • App launcher: one entry per environment, with an icon in its color. A Machine opened from the launcher reports failures as a desktop notification.
  • Nautilus: a Machine's color shows on its ~/OmaVM/<name> link.
  • Box terminal: mouse selection, Ctrl+Shift+C / Ctrl+Insert copy, write-only OSC 52. The window is tagged as a terminal, so Omarchy's Super+C copies instead of sending Ctrl+C.
  • Travel Mode for Boxes: podman update --cpus on start/open while on battery.
  • Open in an empty workspace: on by default. A personal Hyprland rule for dev.omavm.viewer takes precedence.
  • SSH into Machines over vsock: omavm ssh, and omavm exec now works on Machines. On by default; its reach (any process on the host, Boxes included) is stated in Settings, --help and omavm host.

This PR also includes the Machine display migration from VNC to QEMU's D-Bus display, plus the tests and docs accumulated since the last commit.

Fixes (each with a regression test)

  • A stale qemu.pid/virtiofs.pid whose pid had been reused made the Machine look running, turned Start into a no-op, and made Force Stop SIGTERM an unrelated process.
  • Snapshots of a running Machine always failed: virtio-sound and virgl block savevm on QEMU 11.1. They are now disk-only via QMP, and Go To requires a stopped Machine; the dialog says so.
  • Huge CSI parameters overflowed the terminal cursor and crashed it. Found by fuzzing under ASan. Parameters are now capped at 65535, and a seeded fuzz test runs with the suite.
  • The OSC buffer grew without limit on an unterminated sequence.
  • Creating a Box without an image hung forever in distrobox create --image "".
  • Environment names starting with - could not be addressed by the CLI.
  • Force Stop returned before QEMU exited, so a Delete right after it failed.

Test plan

  • go vet ./..., gofmt -l ., go test ./...
  • make test-terminal (33), make test-backend (10), make test-qml (22), make build-gui
  • End to end against real QEMU/KVM in an isolated state dir: vsock start, CID retry, omavm ssh reaching the guest through systemd-ssh-proxy, snapshots while running, stale-pidfile recovery
  • podman update behavior verified on a throwaway Distrobox (Podman 6.1, Distrobox 1.8)
  • SSH login into a real guest with systemd 256+ and sshd (not tested)
  • Mouse selection in the Box terminal and Box Travel Mode on real battery (logic tested, not used interactively)

Host integrations are now on by default and turned off per environment:

- One launcher entry per environment (internal/desktop), with an icon in
  its color; errors from a launcher run become desktop notifications.
- A Machine's color shows in Nautilus (GVFS custom-icon on ~/OmaVM links).
- Box terminal: mouse selection, Ctrl+Shift+C / Ctrl+Insert copy, write-only
  OSC 52; tagged as a terminal so Omarchy's Super+C copies instead of
  sending Ctrl+C.
- Travel Mode for Boxes (podman update --cpus; power moved to internal/power).
- "Open in an empty workspace" on by default; a personal Hyprland rule for
  dev.omavm.viewer takes precedence.
- SSH into Machines over vsock (omavm ssh, omavm exec on Machines), on by
  default, with its reach (any host process, Boxes included) stated in
  Settings, --help and omavm host.

Also includes the Machine display migration from VNC to QEMU's D-Bus
display, and the tests and docs accumulated since the last commit.

Fixes, each with a regression test:

- Stale qemu.pid/virtiofs.pid whose pid was reused made a Machine look
  running and Force Stop SIGTERM an unrelated process.
- Snapshots of a running Machine always failed (virtio-sound and virgl
  block savevm); they are now disk-only via QMP, and Go To requires a
  stopped Machine.
- Huge CSI parameters overflowed the terminal cursor and crashed it
  (found by fuzzing under ASan); parameters are capped at 65535 and a
  seeded fuzz test runs with the suite.
- Unbounded OSC buffer.
- Box without an image hung in distrobox create.
- Names starting with "-" could not be addressed by the CLI.
- Force Stop returned before QEMU exited, so a Delete right after failed.
- omastore.toml declares what the store's heuristics would get wrong: the
  executable is bin/omavm-gui (by the repository's name it would pick the
  CLI) and the icon is data/icons/dev.omavm.app.svg. Passes
  `omastore lint-manifest .` in strict mode.
- `make dist VERSION=x.y.z` builds a flat, portable tarball (static
  omavm, omavm-gui on the system's Qt 6, data/ next to bin/) plus its
  .sha256.
- .github/workflows/release.yml runs it on every v* tag in
  archlinux:latest (the GUI links the system Qt, and Omarchy follows
  Arch's) and uploads both to the release, creating it if needed. The
  same steps were run in a clean Arch container with podman; the
  workflow itself has not run on GitHub yet.
…bug fixes

Concurrency and asynchronous operations:
- The registry lock now only covers read-modify-write; operations that
  change one environment hold that environment's own lock across the
  backend call. Create and remove are two-phase (operation "creating" /
  "removing"), so a Box pulling its image for minutes no longer blocks
  the others; an operation whose process died shows as interrupted and
  can be removed.
- The GUI runs actions on different environments at once
  (busyEnvironments); a second action on the same one is refused, and
  quitting waits for all of them.
- `omavm list --status --json` returns every environment's state and
  guest tools in one process, asking Podman once for all Boxes (engine
  state field instead of parsing `distrobox list`), and Docker only for
  Boxes Podman doesn't have. The GUI polls with it: one process per
  cycle instead of 1 + N + M.

Machines:
- State lives under machines/<id>/, moved from machines/<name>/ the first
  time a Machine is seen stopped; the ~/OmaVM link follows.
- Every disk is a sparse 1 TiB qcow2, grown on Start when smaller
  (including after going to a snapshot taken before it grew). A full host
  disk shows as paused with the reason, and Resume continues.
- Running snapshots freeze the guest's filesystems through QGA when it
  answers, and are marked crash_consistent when not (tested against a
  fake agent only).
- The viewer places itself in an empty workspace and opens fullscreen
  (new opt-out setting) however it is opened: Experience Center, launcher
  entry or `omavm open`. Not validated in a live session.

Accessibility (WCAG 2.2 AAA):
- Status colors used as text (green, red, accent) reach 7:1 keeping their
  hue; checked against every installed Omarchy theme.
- tst_accessibility.qml audits the tree Qt gives AT-SPI: every control
  needs a name and keyboard reach. It found unnamed fields and the color
  selection never being announced with a screen reader active.

Fixes, each with a regression test:
- An installed Machine whose ISO was deleted or moved never started.
- A description the GUI accepted was refused for counting bytes.
- --shared-writable=false made the shared folder writable.
- Large pastes into the Box terminal lost their end (short writes).
- guest-sync failed on the stale replies it exists to skip.
- The registry keeps being written in the format older OmaVM reads;
  newer formats are refused instead of rewritten.

The CLI's JSON is covered by golden files (cmd/omavm/testdata). Docs and
docs/TODO.md record what is verified and what is not.
The QML UI tests never ran on CI: Ubuntu 24.04 lacked QtQml.WorkerScript
and QtQuick.Dialogs, so every test file failed to compile (already the
case on the previous commit). Reproduced in an ubuntu:24.04 container
with the same packages, then fixed there.

With the modules installed, Qt 6.4 differed from the Qt the app is
developed on in what it tells assistive technology:
- A SpinBox's focus lands on its text field, and only that part is
  marked focusable: the audit now accepts focus anywhere inside a
  control.
- A checkable ToolButton reported checked but not checkable. The color
  swatches are one choice among several, so they are radio buttons for
  screen readers, which every Qt version reports as checkable. The test
  reads that state from the accessibility interface, as a screen reader
  does, not from the QML attached property.

All 39 QML tests pass on Qt 6.4 (ubuntu:24.04 container) and 6.11.
@KitsuneSemCalda
KitsuneSemCalda merged commit d25a8d6 into master Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant