Add chandra-remote: VNC and web control over Tailscale
CI / test (push) Failing after 50s

- remote/: shared-memory framebuffer mirror served as RFB 3.8 (VNC, port 5900) and an HTTP/WebSocket PWA (port 6080), bound to the Tailscale interface and loopback by default
- Compositor: remote pointer, button, scroll, modifier, key, key-tap, text and clipboard input, routed past OLED blanking
- chandra-ctl: add status, refresh and osk commands; add input-* and clipboard-set for remote control
- Camera: debayer 10-bit CSI-2 Quad-Bayer frames for imx371 and high-quality still capture
- Camera: rotate frames by the libcamera mounting angle (CCW for 90), fix the expected test values, and restyle the UI for a dark theme
This commit is contained in:
nandi committed 2026-11-28 17:57:55 -08:00
1 parent de39b74282
commit bfc60ee0e5
24 files changed
+5310 -79

No files matched your search

+41
View File
@@ -166,3 +166,44 @@ test "a second compositor leaves a live control socket alone" {
assert_true(third.start_control(path))
third.close()
}
///|
test "remote status, refresh, osk, pointer/key/text/clipboard injection and OLED-off routing" {
let (comp, path) = control_comp("remote")
let st = ask(comp, path, "status")
assert_eq(st.length(), 1)
assert_true(st[0].has_prefix("ok 1280x720 rot=0 screen=on"))
assert_true(st[0].contains(" ptr="))
assert_true(st[0].contains(" osk="))
assert_eq(ask(comp, path, "refresh"), ["ok"])
assert_eq(ask(comp, path, "osk off"), ["ok off"])
assert_eq(ask(comp, path, "osk on"), ["ok on"])
assert_eq(ask(comp, path, "osk toggle"), ["ok off"])
// Turn screen off manually: remote pointer/key injection still moves the pointer and
// executes shortcuts WITHOUT unblanking the physical display.
assert_eq(ask(comp, path, "screen off"), ["ok off"])
assert_true(comp.manual_screen_off)
assert_eq(ask(comp, path, "input-ptr 240 180"), ["ok"])
assert_eq(comp.ptr_x.to_int(), 240)
assert_eq(comp.ptr_y.to_int(), 180)
assert_true(comp.manual_screen_off)
assert_eq(ask(comp, path, "input-btn 272 1"), ["ok"])
assert_eq(ask(comp, path, "input-btn 272 0"), ["ok"])
// Toggle launcher via Super tap (evdev 125 down/up) while screen is still blanked.
assert_eq(ask(comp, path, "input-key 125 1"), ["ok"])
assert_eq(ask(comp, path, "input-key 125 0"), ["ok"])
assert_true(comp.shell.launcher_open())
assert_true(comp.manual_screen_off)
// input-text types into the open launcher popup ("6869" = "hi").
assert_eq(ask(comp, path, "input-text 6869"), ["ok typed"])
// Close launcher with Esc tap ("1"), then check clipboard-set + input-text fallback.
assert_eq(ask(comp, path, "input-key-tap 1 0"), ["ok"])
assert_false(comp.shell.launcher_open())
assert_eq(ask(comp, path, "clipboard-set 616263"), ["ok"])
assert_true(comp.server.owns_selection())
assert_eq(ask(comp, path, "input-text 7879"), ["ok clipboard"])
assert_true(comp.server.owns_selection())
assert_eq(ask(comp, path, "screen on"), ["ok on"])
assert_false(comp.manual_screen_off)
comp.close()
}