Remote: right-click opens the desktop's menu, not the browser's
Deploy to the handset / build-and-deploy (push) Successful in 2m10s
CI / test (push) Failing after 2m45s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Opus 5.5 committed 2026-11-29 18:04:40 -08:00
1 parent 2aa3de5741
commit 30086562bc
2 files changed
+11 -1

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ Chandra includes KMS/libinput/compositor adaptations tailored for mainline Linux
- [`remote/chandra-remote.c`](../remote/chandra-remote.c) provides a zero-overhead shared-memory framebuffer mirror (`fb.shm` in [`wasmhost/bin/raster_stub.c`](../wasmhost/bin/raster_stub.c)) feeding both:
- **VNC (RFB 3.8, port `5900`)** with Tight-JPEG (`libturbojpeg`), Zlib, Raw, dynamic rotation resize (`ExtendedDesktopSize`), clipboard sync, and 1:1 pointer/touch/keyboard input (tested for Android **AVNC**).
- **Mobile Web UI / PWA (HTTP + WebSocket, port `6080`)** with 1:1 touch gestures (tap, drag, long-press right-click, two-finger scroll/right-click), optional trackpad mode, Android keyboard bridge, live rotation/brightness/OLED-off toggles, and adaptive JPEG streaming.
- **Mobile Web UI / PWA (HTTP + WebSocket, port `6080`)** with 1:1 touch gestures (tap, drag, long-press right-click, two-finger scroll/right-click), mouse right-click, optional trackpad mode, Android keyboard bridge, live rotation/brightness/OLED-off toggles, and adaptive JPEG streaming.
- **Paste (web UI):** `Ctrl+V`, `Ctrl+Shift+V`, `Shift+Insert` (`Cmd+V` on a Mac) put this device's clipboard, text or an image (up to 16 MB, sent as PNG), on the phone's and then press the same keys there. This works over plain HTTP. If something was copied on the phone since the page was last focused, that is pasted instead. The **Paste** button (`KB` bar) and **Paste Image…** (menu) do the same, with `Ctrl+Shift+V` for text in terminals. In the launcher and the password dialog the text is typed in. The browser uploads to `POST /api/clipboard`; the compositor gets the data as a memfd over the control socket (`clipboard-set-fd`, `input-paste`). VNC clients can send text only.
- `https://chandra-6t.tail.site.latha.org/` serves the web UI over HTTPS, tailnet only, from the `chandra-remote` chart in `nandi/cluster` (Caddy on the phone node, proxying to loopback `6080`).
- By default (`~/.config/chandra/remote.conf`), `bind=tailscale`, `bind_loopback=1`, and `auth=none`, binding strictly to the Tailscale `100.64.0.0/10` interface + `127.0.0.1` so any device on the same Tailscale tailnet can connect directly with zero password prompt (`http://<tailscale-dns>:6080/` or `<tailscale-dns>:5900`), even while the handset's physical OLED screen is turned off (`chandra-ctl screen off`). Run `chandra-remote status` to inspect endpoints or `chandra-remote passwd [PASS|--none]` to configure optional password auth.
+10
View File
@@ -419,6 +419,11 @@
document.activeElement.blur();
}
e.preventDefault();
if (e.button === 2) { /* a mouse's right button, or a pen's */
const [x, y] = trackpadMode ? [cursorX, cursorY] : clientToFb(e.clientX, e.clientY);
sendJson({ t: 'tap', x, y, b: 3 });
return;
}
stage.setPointerCapture(e.pointerId);
pointers.set(e.pointerId, { x: e.clientX, y: e.clientY });
@@ -535,6 +540,11 @@
stage.addEventListener('pointerup', onPointerFinish);
stage.addEventListener('pointercancel', onPointerFinish);
/* The desktop's own menu opens on right-click and long-press; keep the browser's off it. */
document.addEventListener('contextmenu', (e) => {
if (e.target !== passInput) e.preventDefault();
});
stage.addEventListener('wheel', (e) => {
e.preventDefault();
const [fx, fy] = trackpadMode ? [cursorX, cursorY] : clientToFb(e.clientX, e.clientY);