Skip to content

Conversation

@raiden-staging
Copy link
Contributor

@raiden-staging raiden-staging commented Nov 4, 2025

  • Audio drivers + sockets support, live view with audio
  • Adapted the previous audio support PR ( Audio Support (v1) #51 ) to the new image setup
  • (also added client loader theme update from previous PR)

Note

Introduces PulseAudio-based audio support and a new /computer/cursor API, updates Docker/runtime (FFmpeg caching, BuildKit cache keys, Playwright engine switch), and refreshes the web client theme/loader with mute handling.

  • API/Backend:
    • Adds POST /computer/cursor with SetCursor to hide/show cursor via unclutter; OpenAPI and generated client/server updated.
    • Mouse actions remove --sync from xdotool calls; minor input handling refinements.
    • Playwright executor supports PLAYWRIGHT_ENGINE (playwright-core or patchright).
  • Audio (Headful image):
    • Integrates PulseAudio: installs packages, adds /etc/pulse/{default.pa,daemon.conf}, D-Bus policies, runtime env (PULSE_SERVER, XDG_RUNTIME_DIR), user groups; supervisord-managed PulseAudio with readiness checks.
    • Xorg input socket mode relaxed to 0666.
  • Images/Build:
    • Dockerfiles: add platform-aware cache IDs for Go/Node/Apt, new FFmpeg static downloader stage, global install patchright.
    • Headless image aligned (Chromium, FFmpeg, Node 22, patchright).
  • Runtime/Scripts:
    • Wrapper/start scripts: scale-to-zero handling, dynamic log aggregator, Xorg/Mutter startup flow, API readiness; run-*-sh accept PLAYWRIGHT_ENGINE and map recordings.
    • ensure-common-build-run-vars.sh: UKC vars required only when require-ukc-vars is passed.
  • Web Client:
    • Theme color switched to #7B42F6; loader replaced with spinning logo.
    • Video: mute pulse indicator and one-time unmute on first interaction; some controls disabled.
  • Docs:
    • README with local testing steps and curl example for new cursor endpoint.

Written by Cursor Bugbot for commit 2050f1f. This will update automatically on new commits. Configure here.

@mesa-dot-dev
Copy link

mesa-dot-dev bot commented Nov 4, 2025

Mesa Description

TL;DR

Enabled PulseAudio-based audio support in the headful Chromium image and updated the client UI with a new theme color and improved video unmute experience.

Why we made these changes

To provide audio drivers and socket support for a live view with audio, adapting previous audio support to the new image setup, and to update the client loader theme.

What changed?

Container/Runtime (chromium-headful)

  • PulseAudio Integration:
    • Installed rtkit and upower packages in Dockerfile.
    • Configured kernel user to audio, video, and pulse groups.
    • Set XDG_RUNTIME_DIR and PULSE_SERVER environment variables.
    • Added start-pulseaudio.sh script for robust PulseAudio daemon management.
    • Introduced daemon.conf for low-latency WebRTC PulseAudio configuration.
    • Added default.pa for virtual audio sinks/sources and Unix socket access.
    • Included dbus-mpris.conf and dbus-pulseaudio.conf for D-Bus service ownership.
  • Permissions and Paths:
    • Adjusted /etc/pulse directory permissions.
    • Updated xorg.conf to allow SocketMode "0666" for dummy_touchscreen input device.
  • Wrapper Script Enhancements:
    • Refactored wrapper.sh to explicitly set audio and display environment variables.
    • Improved PulseAudio startup reliability with a 10-second wait loop and explicit shutdown.

Client/UI

  • Brand Color Update:
    • Changed brand color to #7B42F6 across browserconfig.xml, index.html, site.webmanifest, and _variables.scss.
  • Loader Animation:
    • Added kernel.svg and updated connect.vue to use a spinning kernel.svg image as the loader.
  • Video Player Enhancements:
    • Implemented "unmute on first interaction" in video.vue with global event listeners.
    • Added a pulsating red border as a visual muted indicator.
    • Minor control template tweaks in video.vue.
  • Connect Component:
    • Retained auto-login hook and switched loader to the new logo spinner in connect.vue.

Validation

No explicit validation steps were provided in the PR description.

Description generated by Mesa. Update settings

Copy link

@mesa-dot-dev mesa-dot-dev bot left a comment

Choose a reason for hiding this comment

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

Performed full review of b51da91...947a021

Analysis

  1. Security Permission Issues: Multiple files have overly permissive settings (777/666) including xorg.conf, start-pulseaudio.sh, and Dockerfile configurations for /etc/pulse. These should be replaced with more restrictive 0660/0750 permissions with appropriate group ownership.

  2. Contradictory Configuration: PulseAudio has conflicting settings with daemon.conf setting allow-module-loading = yes while start-pulseaudio.sh uses the --disallow-module-loading flag, creating potential maintenance confusion.

  3. Environment Variable Redundancy: Environment variables are set in multiple places (Dockerfile, wrapper.sh), which could lead to maintenance challenges if values need to change.

  4. Code Redundancy: The video.vue component uses both { once: true } option AND manual cleanup in beforeDestroy, creating unnecessary code.

Tip

Help

Configure your agents

Mesa Docs

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

15 files reviewed | 0 comments | Edit Agent Settings

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