Add native self-hosted instance connection to fluxer_desktop

Trimmed monorepo checkout (fluxer_desktop + packages/voice_engine_v2 +
tools/ci) with a "Connect to a Different Server" menu item and popout
that lets the desktop app switch to any self-hosted Fluxer instance,
plus fixes for well-known discovery on single-domain self-hosted
deployments and a false-positive ERR_ABORTED on same-origin client
redirects during the switch. Defaults to chat.fluxr.chat and uses an
isolated userData directory from the official build.
This commit is contained in:
2026-07-01 18:22:43 -04:00
commit 682afacd30
1763 changed files with 613720 additions and 0 deletions
@@ -0,0 +1,143 @@
{
"status": "fail",
"mode": "smoke",
"strict": false,
"platform": "linux",
"arch": "arm64",
"hostname": "d4e5fefa7fc7",
"startedAt": "2026-06-07T14:52:39.689Z",
"endedAt": "2026-06-07T14:53:04.641Z",
"reportDir": "/workspaces/fluxer/fluxer_desktop/native-media-reports/2026-06-07T14-52-39-687Z",
"gates": [
{
"name": "mode-valid",
"status": "pass",
"mode": "smoke"
},
{
"name": "documentation-current",
"status": "pass",
"missing": []
},
{
"name": "strict-prerequisites",
"status": "skip",
"reason": "smoke mode"
},
{
"name": "strict-command-plan",
"status": "skip",
"reason": "smoke mode"
}
],
"plannedCommands": [
{
"name": "main-process-native-media-unit-tests",
"command": "node --test src/main/NativeVoiceEngine.test.mjs src/main/NativeScreenCapture.test.mjs",
"category": "shared",
"cwd": "."
},
{
"name": "desktop-typecheck",
"command": "pnpm typecheck",
"category": "shared",
"cwd": "."
},
{
"name": "webrtc-sender-build",
"command": "pnpm --dir native/webrtc-sender build",
"category": "native-sender",
"cwd": "."
},
{
"name": "webrtc-sender-tests",
"command": "pnpm --dir native/webrtc-sender test",
"category": "native-sender",
"cwd": "."
},
{
"name": "webrtc-sender-livekit-harness",
"command": "pnpm --dir native/webrtc-sender test:livekit",
"category": "livekit",
"cwd": "."
},
{
"name": "linux-screen-capture-build",
"command": "pnpm --dir native/linux-screen-capture build",
"category": "platform-native",
"cwd": "."
},
{
"name": "linux-screen-capture-tests",
"command": "pnpm --dir native/linux-screen-capture test",
"category": "platform-native",
"cwd": "."
},
{
"name": "linux-audio-capture-build",
"command": "pnpm --dir native/linux-audio-capture build",
"category": "platform-native",
"cwd": "."
},
{
"name": "linux-audio-capture-tests",
"command": "pnpm --dir native/linux-audio-capture test",
"category": "platform-native",
"cwd": "."
}
],
"commands": [
{
"name": "main-process-native-media-unit-tests",
"command": "node --test src/main/NativeVoiceEngine.test.mjs src/main/NativeScreenCapture.test.mjs",
"category": "shared",
"status": "pass",
"code": 0,
"signal": null,
"startedAt": "2026-06-07T14:52:39.690Z",
"endedAt": "2026-06-07T14:52:39.792Z",
"durationMs": 102,
"stdoutTail": "▶ NativeScreenCapture source identity and capability reporting\n ✔ normalizes display and window sources without changing source ids (1.614801ms)\n ✔ starts display and window captures with exact source id and kind and reports diagnostics (1.041547ms)\n ✔ fails fast when native frame sink is required but unavailable (0.500503ms)\n ✔ passes caller-provided capture id and native sink handle to the platform wrapper (0.467711ms)\n ✔ reports macOS and Linux display/window capture capabilities from platform backends (0.625753ms)\n✔ NativeScreenCapture source identity and capability reporting (4.771278ms)\n▶ NativeVoiceEngine connection lifecycle\n ✔ does not forward native events after disconnecting a pending connect (3.117018ms)\n ✔ disconnects stale native connect completion after a replacement connect starts (1.775302ms)\n✔ NativeVoiceEngine connection lifecycle (5.440365ms)\n▶ NativeVoiceEngine screen frame routing\n ✔ publishes screen share with source pacing and exposes a native frame sink handle (0.897838ms)\n ✔ keeps screen-share audio published when screen video is unpublished (0.634254ms)\n ✔ replaces screen captures without releasing screen-share audio or duplicating priority (0.502586ms)\n ✔ forwards watch and unwatch operations with source, enablement, and quality intact (0.563378ms)\n ✔ reports VideoToolbox hardware capability from the native addon (0.49767ms)\n ✔ reports native voice engine capabilities from the native addon (0.56267ms)\n ✔ maps native addon microphone not-connected errors to the typed operation code (0.639129ms)\n✔ NativeVoiceEngine screen frame routing (4.546943ms)\n tests 14\n suites 3\n pass 14\n fail 0\n cancelled 0\n skipped 0\n todo 0\n duration_ms 81.841144\n",
"stderrTail": ""
},
{
"name": "desktop-typecheck",
"command": "pnpm typecheck",
"category": "shared",
"status": "pass",
"code": 0,
"signal": null,
"startedAt": "2026-06-07T14:52:39.792Z",
"endedAt": "2026-06-07T14:52:40.133Z",
"durationMs": 341,
"stdoutTail": "\n> fluxer_desktop@0.0.0 typecheck /workspaces/fluxer/fluxer_desktop\n> tsgo --noEmit\n\n",
"stderrTail": ""
},
{
"name": "webrtc-sender-build",
"command": "pnpm --dir native/webrtc-sender build",
"category": "native-sender",
"status": "pass",
"code": 0,
"signal": null,
"startedAt": "2026-06-07T14:52:40.133Z",
"endedAt": "2026-06-07T14:52:57.557Z",
"durationMs": 17424,
"stdoutTail": "\n> @fluxer/webrtc-sender@0.0.0 build /workspaces/fluxer/fluxer_desktop/native/webrtc-sender\n> cargo run --locked --quiet --manifest-path ../../../tools/ci/Cargo.toml -- build-desktop-native-addon\n\n[buildRustNodeAddon] cwd=/workspaces/fluxer/fluxer_desktop/native/webrtc-sender\n+ /home/vscode/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/cargo build --release --target aarch64-unknown-linux-gnu --manifest-path Cargo.toml --features camera-native\n",
"stderrTail": " Compiling crossbeam-utils v0.8.21\n Compiling fluxer_screen_frame_bus v0.0.0 (/workspaces/fluxer/fluxer_desktop/native/screen-frame-bus)\n Compiling fluxer_voice_core v0.1.0 (/workspaces/fluxer/fluxer_voice_core)\nwarning: unused import: `enum_dispatch`\n --> vendor/libwebrtc/src/audio_source.rs:15:13\n |\n15 | use crate::{enum_dispatch, imp::audio_source as imp_as};\n | ^^^^^^^^^^^^^\n |\n = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default\n\nwarning: unnecessary `unsafe` block\n --> vendor/libwebrtc/src/native/apm.rs:32:25\n |\n32 | sys_handle: unsafe {\n | ^^^^^^ unnecessary `unsafe` block\n |\n = note: `#[warn(unused_unsafe)]` (part of `#[warn(unused)]`) on by default\n\nwarning: variable does not need to be mutable\n --> vendor/libwebrtc/src/native/desktop_capturer.rs:66:13\n |\n66 | let mut sys_handle = sys_dc::ffi::DesktopCapturerOptions {\n | ----^^^^^^^^^^\n | |\n | help: remove this `mut`\n |\n = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default\n\nwarning: hiding a lifetime that's elided elsewhere is confusing\n --> vendor/libwebrtc/src/native/audio_mixer.rs:30:34\n |\n30 | fn get_audio_frame_with_info(&self, target_sample_rate: u32) -> Option<AudioFrame>;\n | ^^^^^ the lifetime is elided here ^^^^^^^^^^ the same lifetime is hidden here\n |\n = help: the same lifetime is referred to in inconsistent ways, making the signature confusing\n = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default\nhelp: use `'_` for type paths\n |\n30 | fn get_audio_frame_with_info(&self, target_sample_rate: u32) -> Option<AudioFrame<'_>>;\n | ++++\n\nwarning: `libwebrtc` (lib) generated 4 warnings (run `cargo fix --lib -p libwebrtc` to apply 3 suggestions)\n Compiling crossbeam-queue v0.3.12\n Compiling fluxer_webrtc_sender v0.0.0 (/workspaces/fluxer/fluxer_desktop/native/webrtc-sender)\n Finished `release` profile [optimized] target(s) in 10.39s\n"
},
{
"name": "webrtc-sender-tests",
"command": "pnpm --dir native/webrtc-sender test",
"category": "native-sender",
"status": "fail",
"code": 1,
"signal": null,
"startedAt": "2026-06-07T14:52:57.557Z",
"endedAt": "2026-06-07T14:53:04.641Z",
"durationMs": 7084,
"stdoutTail": "\n> @fluxer/webrtc-sender@0.0.0 test /workspaces/fluxer/fluxer_desktop/native/webrtc-sender\n> cargo run --locked --quiet --manifest-path ../../../tools/ci/Cargo.toml -- test-webrtc-sender-rust && node --test index.test.mjs scripts/livekit-harness.test.mjs\n\n+ /home/vscode/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/cargo test --features \"publisher,camera-native\"\nELIFECYCLE Test failed. See above for more details.\nWARN Local package.json exists, but node_modules missing, did you mean to install?\n",
"stderrTail": " Compiling zerocopy-derive v0.8.50\n Compiling serde v1.0.228\n Compiling ring v0.17.14\n Compiling serde_urlencoded v0.7.1\n Compiling fluxer_screen_frame_bus v0.0.0 (/workspaces/fluxer/fluxer_desktop/native/screen-frame-bus)\n Compiling rustls v0.23.40\n Compiling pbjson v0.6.0\n Compiling os_info v3.15.0\n Compiling fluxer_voice_core v0.1.0 (/workspaces/fluxer/fluxer_voice_core)\n Compiling tinytemplate v1.2.1\n Compiling pbjson-types v0.6.0\n Compiling zerocopy v0.8.50\n Compiling rustls-webpki v0.103.13\n Compiling livekit-protocol v0.7.8\n Compiling ppv-lite86 v0.2.21\n Compiling half v2.7.1\n Compiling rand_chacha v0.9.0\n Compiling rand_chacha v0.3.1\n Compiling ciborium-ll v0.2.2\n Compiling tokio-rustls v0.26.4\n Compiling rand v0.8.6\n Compiling rand v0.9.4\nerror[E0786]: found invalid metadata files for crate `rustls`\n --> /home/vscode/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-rustls-0.26.4/src/lib.rs:49:9\n |\n49 | pub use rustls;\n | ^^^^^^\n |\n = note: failed to open rmeta metadata: '/workspaces/fluxer/fluxer_desktop/native/webrtc-sender/target/debug/deps/librustls-f66081aae860cdad.rmeta'\n\nFor more information about this error, try `rustc --explain E0786`.\nerror: could not compile `tokio-rustls` (lib) due to 1 previous error\nwarning: build failed, waiting for other jobs to finish...\nCommand failed with exit code 101: /home/vscode/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/cargo test --features \"publisher,camera-native\"\n"
}
]
}