[Tether 0.1.15, bundled open-terminal 0.17.17, Open WebUI 0.13.3] [macOS 27.2.1, Apple M2 (Mac mini), 1920×1080] Desktop view lags when the mouse moves and windows can't be dragged
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- macos, python, typescript
Línea de trabajo
Start with open_terminal/desktop/native.py, where the issue identifies the input handler and locally tested changes; check how position() and handle() pass button state and how commands() processes input and frame acknowledgements. Reproduce the lag and failed window drag on macOS, then verify both behaviors are fixed and desktop frames continue while the pointer moves.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Version
Tether 0.1.15, bundled open-terminal 0.17.17, Open WebUI 0.13.3
Platform
macOS 27.2.1, Apple M2 (Mac mini), 1920×1080
Description
The desktop view (native frames transport, open_terminal/desktop/native.py) has two macOS problems:
1. Laggy, stalling stream while the mouse moves
pyautogui's macOS backend sleeps DARWIN_CATCH_UP_TIME (default 10 ms) after every mouse event, so each moveTo/scroll takes about 12–15 ms. The browser sends pointer moves up to 60 times a second (one per animation frame), and all input runs on the same single-thread executor as screen capture (max_workers=1). The commands() loop awaits each input in turn, and frameAck arrives on that same loop, so acks queue behind mouse events and frames stop while the mouse moves.
Measured on the Mac: moveTo takes 11.9 ms by default, 1.75 ms with DARWIN_CATCH_UP_TIME = 0.001, and 0.25 ms with 0. The relay on the server side was not the bottleneck (≤6% CPU, empty socket send queues).
2. Windows cannot be dragged
While a button is held, position() still calls moveTo(), which posts kCGEventMouseMoved. macOS only drags windows, selects text and drags files on kCGEvent*MouseDragged events, so press, move and release never drags.
Steps to reproduce
- Connect Tether on macOS and open the computer's desktop from Open WebUI.
- Move the mouse quickly: the picture freezes or jumps.
- Try to drag a window by its title bar: it doesn't move.
Additional context
Fix tested locally in open_terminal/desktop/native.py; both problems went away:
self.input = pyautogui
self.input.PAUSE = 0
+ self.input.DARWIN_CATCH_UP_TIME = 0.001
@@
- def position(self, x, y):
+ def position(self, x, y, buttons=()):
...
- self.input.moveTo(
+ target = (
self.origin[0] + round(x * self.screen_width / self.width),
self.origin[1] + round(y * self.screen_height / self.height),
)
+ if sys.platform == "darwin" and buttons:
+ self.input.platformModule._dragTo(*target, next(iter(buttons)))
+ else:
+ self.input.moveTo(*target)
@@ def handle(self, message, keys, buttons):
- self.position(message.x, message.y)
+ self.position(message.x, message.y, buttons)
Suggested longer-term fixes:
- Handle
frameAckdirectly incommands()instead of behind input work, so input can't stall frames. - Coalesce queued
mousemoves so only the latest position is applied. - Post Quartz drag events directly instead of using the private
_dragTo.
- Lenguaje dominante
- TypeScript
- Estrellas
- 168
- Forks
- 10
- Merge medio
- 1 min
- PR fusionados (30 d)
- 15
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de open-webui/tether
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
open-webui/tether#57 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
open-webui/tether#52 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 1-2 días Aptitud para principiantes 52/100
open-webui/tether#59 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
open-webui/tether#58 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
open-webui/tether#56 · 3 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
Todos los issues de open-webui/tether
Issues similares
-
P2
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
bug ready-for-human
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100
LucasSantana-Dev/Lucky#3150 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue priority: low size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
area: testing bug priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
snapotter-hq/SnapOtter#5099 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
EveryInc/compound-engineering-plugin#2091 ·
Los mantenedores suelen responder en 1 día