mirror of
https://github.com/TencentCloud/Octop.git
synced 2026-10-21 06:29:24 +08:00
* feat: add remote desktop streaming for Linux, Windows, and macOS Introduce dashboard remote desktop with WebSocket JPEG streaming, host input injection, and admin control panel shortcuts. Add backend desktop domain modules, Linux install scripts, native capture on Win/Mac, session supersede, and unit tests. Co-authored-by: Cursor <cursoragent@cursor.com> * fix: stop misleading Mac remote-desktop setup prompts Only surface Linux install/start commands on Linux, probe macOS TCC for missing permissions, and hide setup banners once streaming. Co-authored-by: Cursor <cursoragent@cursor.com> * fix: make desktop setup mypy-clean on Windows and Linux CI Use posix_compat.geteuid instead of os.geteuid, and drop unused type: ignore on optional macOS TCC imports. Co-authored-by: Cursor <cursoragent@cursor.com> * fix: make desktop capture/input unit tests CI-safe Force linux platform for virtual-display paths and avoid requiring Pillow/pynput extras in the default test environment. Co-authored-by: Cursor <cursoragent@cursor.com> * feat: polish remote desktop install/uninstall UX and bundle Linux scripts Ship virtual-desktop scripts in the package, add localized SSE install/uninstall flows with viewport progress, and fix uninstall success detection on hosts that keep a usable display after the virtual stack is removed. Co-authored-by: Cursor <cursoragent@cursor.com> * fix: harden desktop install SSE streaming and clear dashboard lint Read apt/subprocess output in chunks to avoid asyncio readline crashes, surface friendly apt-lock errors, and fix three dashboard eslint issues. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: jubaoliang <jubaoliang@tencent.com> Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
782 B
Python
21 lines
782 B
Python
"""Tests for native vs virtual desktop capture paths."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from octop.infra.desktop.capture import ScreenCapture
|
|
from octop.infra.desktop.input import InputInjector
|
|
|
|
|
|
def test_mac_uses_mss_not_import(monkeypatch) -> None:
|
|
monkeypatch.setattr("octop.infra.desktop.capture.sys.platform", "darwin")
|
|
cap = ScreenCapture(display=None, monitor=0)
|
|
assert cap._prefer_import_capture() is False
|
|
assert cap._mss_kwargs() == {}
|
|
|
|
|
|
def test_windows_input_uses_pynput_path(monkeypatch) -> None:
|
|
monkeypatch.setattr("octop.infra.desktop.capture.sys.platform", "win32")
|
|
inj = InputInjector(display=None)
|
|
monkeypatch.setattr("octop.infra.desktop.input.shutil.which", lambda _: "/usr/bin/xdotool")
|
|
assert inj._use_xdotool() is False
|