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,25 @@
{
"measured_at": "85e057a273fd",
"host": "darwin-arm64-apple-silicon",
"regression_budget_percent": 5.0,
"criterion_args": {
"warm_up_time_sec": 2,
"measurement_time_sec": 5
},
"benches": {
"staging_pair_submit_map_cycle_1080p_rgba": {
"median_ns": 76243.0,
"low_ns": 72391.0,
"high_ns": 81080.0,
"budget_percent_override": 20.0,
"note": "1080p RGBA copy + map; observed cross-run sigma ~10% on a loaded dev host. Wider budget absorbs that without hiding real 1.3x slowdowns."
},
"frame_pool/acquire_release/cpu_1080p_rgba": {
"median_ns": 11.874,
"low_ns": 11.811,
"high_ns": 11.941,
"budget_percent_override": 10.0,
"note": "~12ns op; tiny absolute deltas easily exceed 5% percent. 10% trades sensitivity for noise floor."
}
}
}
@@ -0,0 +1,26 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
use std::hint::black_box;
use criterion::{Criterion, criterion_group, criterion_main};
use fluxer_screen_frame_bus::frame_pool::{CpuFrameBuilder, FRAME_BYTES_MAX};
fn bench_acquire_release_cpu_1080p_rgba(c: &mut Criterion) {
assert_eq!(FRAME_BYTES_MAX, 1920 * 1080 * 4);
let pool = CpuFrameBuilder::build_pool(FRAME_BYTES_MAX)
.expect("pool must allocate at construction time");
assert!(pool.capacity() > 0);
c.bench_function("frame_pool/acquire_release/cpu_1080p_rgba", |b| {
b.iter(|| {
let frame = pool
.try_acquire()
.expect("steady state single-threaded never starves");
black_box(frame.slot_index());
});
});
assert_eq!(pool.currently_in_flight(), 0);
}
criterion_group!(benches, bench_acquire_release_cpu_1080p_rgba);
criterion_main!(benches);
@@ -0,0 +1,50 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
use criterion::{Criterion, black_box, criterion_group, criterion_main};
use fluxer_screen_frame_bus::{CpuStagingBackend, StagingSurfacePair};
const BENCH_WIDTH: usize = 1920;
const BENCH_HEIGHT: usize = 1080;
const BENCH_BYTES_PER_PIXEL: usize = 4;
const BENCH_FRAME_LEN: usize = BENCH_WIDTH * BENCH_HEIGHT * BENCH_BYTES_PER_PIXEL;
fn build_pair() -> StagingSurfacePair<CpuStagingBackend> {
let backends = [
CpuStagingBackend::new(BENCH_FRAME_LEN),
CpuStagingBackend::new(BENCH_FRAME_LEN),
];
assert_eq!(backends[0].len(), BENCH_FRAME_LEN);
assert_eq!(backends[1].len(), BENCH_FRAME_LEN);
StagingSurfacePair::new(backends)
}
fn submit_map_cycle(c: &mut Criterion) {
let mut pair = build_pair();
pair.submit(0, |buf| fill_pattern(buf, 0))
.expect("warm submit zero");
let mut sequence: u64 = 1;
c.bench_function("staging_pair_submit_map_cycle_1080p_rgba", |b| {
b.iter(|| {
pair.submit(sequence, |buf| fill_pattern(buf, sequence as u8))
.expect("submit ok in steady state");
let mapped_sequence = sequence - 1;
let first_byte = pair
.try_map(mapped_sequence, |buf| buf[0])
.expect("cpu backend is always ready");
black_box(first_byte);
sequence = sequence.wrapping_add(1);
});
});
}
fn fill_pattern(buf: &mut [u8], seed: u8) {
assert_eq!(buf.len(), BENCH_FRAME_LEN, "bench backend has fixed size");
let chunk = seed.wrapping_add(1);
for byte in buf.iter_mut() {
*byte = chunk;
}
}
criterion_group!(benches, submit_map_cycle);
criterion_main!(benches);