Skip to content

[DRAFT_NOT_POSTED_TO_ORIGIN] Focus-safe Linux virtual desktop testing skill #9

Open

Description

@kvnloo

Staging copy for tester-army/e2e. Not posted to origin because the connected GitHub integration currently returns 403 for origin issue/PR creation.

Problem

Headed Linux GUI/TUI tests can steal the developer's workspace, keyboard focus, or pointer. e2e's shipped skill should teach agents to create a disposable test desktop first, prove host state is unchanged, and make cleanup part of the test.

Implementation:

Proposed guidance

Add a virtual-desktop topic with three isolation levels:

  1. reuse an existing KVM/microVM provider when strong process/input isolation is needed;
  2. use a nested Hyprland/Sway compositor for an independent Wayland session;
  3. use a live headless output for lightweight rendering, placement, capture, and ordinary headed tests.

Safety invariants:

  • freeze host workspace/focus/pointer before setup and verify them after teardown;
  • create the isolated display and focus rules before the first test window maps;
  • never launch on the human display and move the window afterward;
  • never drive the host pointer or focused monitor;
  • keep concurrent runs on unique outputs/sockets/workspaces/ports;
  • distinguish rendering evidence from compositor-placement evidence;
  • expose the current test display through a loopback, read-only VNC viewer (wayvnc --disable-input) that the user can open with their own keybind.

A live headless output isolates a display, not the human compositor's seat. Nested/KVM isolation remains the stronger path for independent input.

Relationship to existing work

This is complementary to e2e-inc#956's KVM-backed microVM work. It teaches agents how to choose and safely operate an isolation boundary; it does not duplicate a VM provider.

Credit

Adapted from Kevin Rajan's (@kvnloo) hyprland-ui-testing skill and nested Hyprland lease/isolation experiments, with an equivalent Sway lane.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions