112 Commits
Author SHA1 Message Date
faumaray daa2111ea1 Merge remote-tracking branch 'origin/main' into phase5/gpui-shell-minors 2026-10-27 22:50:14 +03:00
faumarayandClaude Sonnet 5.5 6938dbed3a Pin VoelinProtocol at the tag v0.2.0
The three entries of [workspace.dependencies] (voelin-identity, voelin-proto,
voelin-model) were pinned by rev c5bb6b9 and are now { git, tag = "v0.2.0" }
(a45c154), and so is voelin-model in spikes/gpui. Cargo.lock of both
workspaces changes in those packages only: the three sources, and
voelin-model 0.1.0 -> 0.2.0 (the crates' manifests are otherwise the same
at both revisions, so the lock was edited by hand and checked with
--locked; `cargo update -p` also moved eleven unrelated edges, such as
windows-sys 0.61.2 -> 0.52.0, and was discarded). One revision of each
crate in both locks. THIRD_PARTY_NOTICES.md is unchanged
(scripts/notices.sh --check is clean).

What "For consumers" of the protocol's CHANGELOG lists for this pin:
- KeyStore::sign_out lists a device key once. The test that unbinds a device
  key whose row carries a device-only binding counted it with `contains`; it
  now counts one entry in `unbound` and none in `removed`, and a new test
  does the same for Forget (one entry in `removed`, none in `unbound`). Both
  fail with the pin at c5bb6b9.
- Debug of Hello, Welcome, Server and others prints <redacted>: no test of
  the client compares a Debug text of a protocol message.
- The conformance suite still has 17 cases; the two places that named the old
  rev in a string or a comment name the tag.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 21:03:05 +03:00
faumarayandClaude Sonnet 5.5 a77ccc0415 voelin-ui-vm: the server sequences both front ends ran twice are one
The GPUI shell repeated the Slint crate's connect, observe, gateway lookup,
save and remove of a server, its default nickname, its FallbackSecrets and its
settings opening and key registration. They now live once and both front ends
call them:

- voelin_ui_vm::servers::sequence: connect_voice(_to), observe,
  discover_gateway, gateway_found, select_server, save_bookmark,
  save_and_connect, delete_bookmark, bookmark_form and default_nickname, as
  transitions over the state, the Cx and a Backing (the store, the secrets,
  the identity a connection uses). The commands, the status line and what to
  keep go out through the Update as for every other transition; a new field,
  Update::discover, asks the front end to look a gateway up (the thread hop
  stays with each front end: Later in GPUI, later() in Slint). stream_peer is
  the one input a front end gives (Slint's codecs; GPUI passes none).
- voelin_ui_vm::settings::open_settings and register_keys; a front end adds
  its own key (ui.window, studio.ui) through a function it passes, so Slint's
  settings page still lists what it listed.
- voelin_store::FallbackSecrets (feature keyring) and Store::identity_for.
- voelin-ui: the methods of servers/bind.rs, open_settings and default_secrets
  call them, so their call sites are unchanged; host.rs gets transition_with
  and the discover arm of perform. voelin-gpui: AppState's methods and the
  Backend call them. What cannot move is named in docs/ui.md.

voelin-ui-vm now depends on tracing (the sequences log as the copies did): one
line of Cargo.lock, THIRD_PARTY_NOTICES.md unchanged (scripts/notices.sh
--check clean), cargo deny check clean. The sequences have ten tests over a
fake front end (commands, status, store, secrets, gateways), open_settings and
Store::identity_for one each; the GPUI and Slint suites pass unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 20:05:46 +03:00
faumarayandClaude Sonnet 5.5 e66238847d voelin-gpui: the store at start, the shell's actions on the root state, quiet loops
The window opens the client's store as the Slint front end's run() does
(backend.rs): the database in the platform's data directory (VOELIN_DATA_DIR
moves it), the settings service on it with the UI's keys, the secrets (the OS
keyring, memory when it refuses), the default identity (made and kept when the
store has none), the chat history and the settings handed to the engine. The
state starts from the store's bookmarks, the settings' theme and text size
(a development switch still wins), and the sample servers of VOELIN_DEMO_UI
through the app's own events with nothing sent to the engine or kept.

AppState gains the callbacks of bind/servers.rs that the shell has: select a
server (and observe it through its gateway or query login, the gateway looked
up on the engine's runtime and handed back through Later), connect and
disconnect voice, mute the microphone and the sound, hold to talk, copy an
invite, and add, edit, save-and-connect and remove a bookmark, all through
voelin-ui-vm's logic; perform() carries out an Update as far as this front end
has the parts (commands, status, what to keep, the theme settings). It keeps
the window's place in ui.window at the tick and at close, and opens the window
where it was left if a screen still shows its corner.

The engine-event task takes what is queued (BATCH, 64) in one update with one
notification and yields to GPUI's executor between steps; the tick counts and
notifies nobody, since nothing the shell shows moves with the clock.

Tests: one per behaviour on GPUI's test platform (the store's servers, select,
save, edit, remove, connect, the other commands, observe, the sample servers,
the theme settings, the window's place, the burst and the quiet tick), and a
connect through a real engine with no connector, which answers that none
serves the address.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 16:34:14 +03:00
faumarayandClaude Sonnet 5.5 ed49c283a2 voelin-platform: zbus on async-io alone in every binary (notify-rust z), and a test for the order of ashpd's callers
ashpd 0.13.13 keeps one session connection per process (a static in its
proxy.rs), and zbus 5.19 picks that connection's executor once, from
Handle::try_current() on the thread that builds it, when both its `tokio` and
`async-io` features are compiled in. The first ashpd caller therefore decided
the executor of every later portal call: a tokio caller first, then a caller
with no runtime (a GPUI foreground task), panics with "there is no reactor
running" (get_property("version") sets up zbus's property cache, which calls
tokio::task::spawn). The merged binary was safe only because GPUI's
colour-scheme call builds the connection before the engine's portal calls.

voelin-platform's notify-rust asks for `z` (async-io) in place of
`z-with-tokio`, and the stand-in portal's zbus dev-dependency for `async-io`
instead of `tokio`: a test binary with both features shows the panic even when
the binaries do not have it. `cargo tree -e features -i zbus` now names
`tokio` nowhere; Cargo.lock loses zbus's tokio edge and tokio's tracing edge
(THIRD_PARTY_NOTICES.md is unchanged).

tests/proxy.rs gets the gate's probe shape on a private dbus-run-session bus
(skipped with a printed reason where none can be made): a tokio caller first,
then a caller with no runtime. It fails with the panic on the tree before this
change, and still did with only notify-rust moved, which is why the
dev-dependency moved too.

The four records that described the move wrongly are corrected:
docs/design/gpui-spikes.md "Dependencies", the comment of
PortalCapture::start, voelin-media's Cargo.toml and CHANGELOG.md (whose
Slint-only sentence goes: the Slint app's zbus connections move to async-io
threads too).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 12:24:19 +03:00
faumarayandClaude Sonnet 5.5 109e1d1839 voelin-gpui: the cost meter as a development switch (VOELIN_METER=1), logged once a second
meter.rs is spike_common::meter of the GPUI spikes
(spikes/gpui/common/src/meter.rs, docs/design/gpui-spikes.md) without the
measuring run's summary and exit: once a second, on a thread of its own, a
log line (target voelin_gpui::meter, level info) with the process's CPU in
percent of one core, the resident memory, the CPU of each group of threads
(a thread's name without its trailing number: `llvmpipe-12` is `llvmpipe`,
which tells the software renderer's share, work a GPU would take, from
GPUI's thread, the engine's runtime and the codecs; the busiest first, groups
under 0.5 % left out), the app's own counters per second and the voice
connections as a gauge:

  cpu 11.9% rss 250.4 MiB | threads llvmpipe 5.9 voelin-gpui 5.0 |
  engine_events 0.0/s ticks 1.0/s renders 1.0/s later_jobs 0.0/s | connections 0

The counters (`Counters`: engine events handled, ticks, renders, jobs run
through `Later`, connections up) are shared with the root state and the main
view, which count in `handle_event`, `tick`, the later task and `render`; the
numbers come from /proc/self (a note and a warning say so where there is none;
rustix's `param` for the page size and the clock tick, Linux only, no new
package: the lock gains the edge). The line is a pure function with a test,
as are the thread grouping and the stat parser (a name with spaces and
parentheses), and one test reads this process and checks it has threads and
memory. The root state's tests now also check the counters (events, the
connection gauge, three ticks, a job from another thread).

`VOELIN_METER=1` starts it (dev.rs parses it with the other switches).
Running the debug binary on the swatch page on Xvfb :97 logs the lines above
(about 12 % of a core when idle, the software renderer 6 to 11 % of it, one
frame a second); the window closes with exit code 0. The default log filter
now leaves out GPUI's "failed to load font .SystemUIFont" warning, which
every start printed (gpui-component asks for the platform UI font before the
theme names Inter; the text system falls back).

Checked on Rust 1.95.0: fmt, clippy -D warnings --no-deps (all targets),
`cargo test -p voelin-gpui` (30 tests), cargo deny, `scripts/notices.sh
--check`.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 07:12:56 +03:00
faumarayandClaude Sonnet 5.5 27a13fcc7c voelin-gpui: the root Entity<AppState>, the engine's events through a foreground task, the one-second tick, later()
crates/voelin-gpui/src/app.rs holds the root entity: the toolkit-free
voelin_ui_vm state (`AppState<Vec<ChatLine>>`) and `Social`, with
`events::handle` as the one dispatch of an engine event (the entry point
both front ends use; its Update's engine commands are sent, its warnings
logged, the rest belongs to the slices that draw it). Three loops, spawned by
`AppState::new` and ended when the entity is released:
- the engine's events: a foreground task awaits the tokio receiver of the
  hosted engine (no reactor needed, as the plan says), `this.update` and
  `cx.notify()`: spike 3's hotkey task;
- the tick: a loop of `background_executor().timer(1 s)`;
- `Later`, for other threads: GPUI's `AsyncApp` holds an Rc-based weak
  handle and is not Send (read in gpui-pre's async_context.rs), so a thread
  that wants to touch the entity holds a Send handle that queues a boxed
  closure; a third foreground task, which owns the cloned AsyncApp, runs it
  with the entity. This is the Slint front end's `later(|app| ...)`.
engine.rs repeats the ~25 lines of voelin-ui's `HostedEngine::start` (the
engine on a tokio runtime, its events forwarded into an unbounded channel):
that type lives in the Slint crate (crates/voelin-ui/src/app.rs), which this
crate cannot depend on and this task does not touch. dev.rs reads
VOELIN_WINDOW_SIZE. lib.rs `run()` logs through tracing (`VOELIN_LOG`, else
`RUST_LOG`, else a filter that shows GPUI's adapter line), starts the engine's
runtime, opens the window on the entity and, on close, tells the engine to
close the sessions and ends the app. view.rs shows the one line of state the
task asked for: version, voice connections up, engine events handled, seconds
up; each part moves by one of the loops.

Seven tests, none needing a display (GPUI's test platform): an injected
engine event (a voice state) reaches the entity and its status line, the
entity notifies its observers, the tick runs once per advanced second, a job
from another thread runs on the entity, and a real engine (HostedEngine on a
tokio runtime) delivers a real event (a setting changed by a command) to the
entity through the same task; the window-size switch parses and refuses
nonsense. The real-engine test calls `allow_parking`, as GPUI's test
scheduler calls a wake from a tokio thread a non-deterministic test
otherwise. The tests use `gpui-pre` (renamed `gpui`) with its `test-support`
as a dev-dependency, pinned `=0.3.10` beside gpui-kit's own pin: gpui-kit's
`test-support` feature names the optional `gpui-fast` backend in weak
features, which makes cargo lock gpui-fast and its tree and pins taffy to
0.15.0 for every build (reproduced in a scratch project: 793 packages
without the feature, 820 with it). The lock gains only gpui-pre's own
test-support crates (proptest and its few, futures-concurrency, postage);
THIRD_PARTY_NOTICES.md does not move (dev-dependencies are out of it) and
cargo deny passes.

Run on Xvfb :97 (headless.sh) with the debug binary: the window opens in
0.1 s, shows "Voelin 0.0.1-alpha · 0 connections · 1 engine event · 2 s up"
and, four seconds later, "... · 6 s up" (the one engine event is the real
engine's own at start); Alt+F4 ends the app with exit code 0 in 132 ms.
Checked on Rust 1.95.0: fmt and clippy -D warnings (all targets, --no-deps),
`cargo test -p voelin-gpui` (3 runs, 7 tests each), cargo deny.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 06:56:08 +03:00
faumarayandClaude Sonnet 5.5 8f234e0051 voelin-gpui: the GPUI front end's crate on gpui-kit 0.8.1, a window titled Voelin that opens and closes
The second front end of plan section 6 step 3: crates/voelin-gpui with
the binary voelin-gpui, in the workspace's members and default-members next
to voelin-ui (two binaries until parity; voelin-ui stays the app).
gpui-kit is a workspace dependency pinned `=0.8.1` (the version the three
spikes were rebuilt on in the commit before). The crate asks for gpui-kit
and the app's name and id from voelin-platform (APP_NAME as the window's
title, APP_ID as its app id); `run()` opens one window whose
`on_window_should_close` ends the app, and returns the error when the
window cannot be opened (no display).

Checked on Xvfb :97 (headless.sh: openbox, a private bus, lavapipe through
wgpu's Vulkan backend, state under .scratch): the debug binary opens a
window named "Voelin" (xdotool search) in 0.3 s and ends with exit code 0
when openbox sends the close request (Alt+F4).

Cargo.lock: 279 more package entries (208 new names; no existing version
moved, other versions of 61 names were added beside theirs): GPUI's
gpui-pre family, wgpu 30, gpui-component with its Markdown, HTML, chart and
table support, cosmic-text, the Linux platform crates. The root workspace
already carried Slint's and the codecs' dependencies, so this is 195 new
packages on Linux, not the ~1,000 of the spikes' lock (which has the root's
packages too). deny.toml and about.toml name the two licences no crate of
the tree had: 0BSD (enum-iterator and enum-iterator-derive, under
gpui-component) and CC0-1.0 (notify 8, the file watcher of gpui-component,
and tiny-keccak, under the X input method client of gpui-pre-linux); no
other licence, no advisory, no ban and no source is new (`cargo deny
--locked --workspace check`: advisories, bans, licenses and sources ok).
THIRD_PARTY_NOTICES.md is regenerated (scripts/notices.sh, cargo-about
0.9.2, no warning; `--check` clean). There is no new clarification: cargo-about
finds every text.

Docs: CHANGELOG, docs/ui.md (the structure tree names the crate and the
intro the second front end), docs/building.md (the dependency list: Vulkan
or OpenGL at run time, what GPUI loads by name, a window manager on X11; no
new development package), README (the crate list and the run command) and
CLAUDE.md, which had no crate sentence (it only says "own crates"): it now
says there are two front ends on one engine and what they share.

Checked on Rust 1.95.0: cargo fmt and cargo clippy -D warnings --no-deps
over the own crates (all targets); cargo deny; scripts/notices.sh --check.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 06:46:59 +03:00
faumarayandClaude Sonnet 5.5 e325b65d42 ashpd on async-io in voelin-media (pipewire) and voelin-platform (portal)
GPUI's Linux backend enables ashpd's `async-io` feature, and ashpd 0.13.13
refuses `async-io` and `tokio` at once (compile_error! in its lib.rs), so
a binary could not hold the portals and gpui-kit. voelin-media's `pipewire`
feature (the screen-cast and camera portals) and voelin-platform's `portal`
feature (global shortcuts, file chooser, proxy resolver) now ask ashpd for
`async-io`; Cargo.lock loses ashpd's edge to tokio and nothing else (the
package set is the same: THIRD_PARTY_NOTICES.md is unchanged and
`scripts/notices.sh --check` clean).

What zbus 5.19 does with the features (read in its abstractions/mod.rs):
with both `async-io` and `tokio` compiled in it picks per connection, tokio
when a tokio runtime is current on the calling thread, else async-io with an
I/O thread of its own. The workspace has both on already (notify-rust asks
for zbus/tokio, secret-service and others for its defaults), so the engine's
portal calls, which run inside its tokio runtime, still use tokio; a caller
with no runtime (GPUI's foreground executor) gets the I/O thread. Built on
its own, voelin-media has `async-io` only.

The source needed no change beyond a doc comment (capture/portal.rs said
the connection needs a tokio runtime). tests/proxy.rs gains a second test on
the same stand-in portal: ashpd's ProxyResolver called from a thread with no
tokio runtime, polled by hand, gets the answer. Both tests run again under
`dbus-run-session` on a bus of their own (the harness takes the test's name).

Checked on Rust 1.95.0: fmt and clippy (-D warnings, --no-deps) of the own
crates; `cargo test -p voelin-platform -p voelin-media`: all pass, including
tests/proxy.rs (2 tests), the portal-less-bus tests of both crates run with
no session bus (`unavailable_without_session_bus`, the `proxy::tests` that
need none), and tests/pipewire_apps.rs against a private PipeWire and
WirePlumber (found on PATH, ran: 2 passed in 2.7 s). The live portal
(a desktop's screen-cast dialog, the shortcut binding) was not exercised:
no desktop session is used by these runs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 06:18:00 +03:00
faumaray 9c4bd29cb2 Merge remote-tracking branch 'origin/main' into phase4/keystore-task34
# Conflicts:
#	CHANGELOG.md
2026-10-27 04:34:14 +03:00
faumarayandClaude Fable 5.1 4491ecee25 Merge main (3930ef2) into phase5/ui-vm-2
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 10:45:33 +03:00
faumarayandClaude Sonnet 5.5 4bd3d7a971 deps: voelin-identity, voelin-proto and voelin-model at VoelinProtocol c5bb6b9 (Phase 2 task 34)
The three protocol crates move together, as docs/building.md says: the
identity crate depends on voelin-proto of the same revision, so moving it
alone would put two voelin-proto packages in the lock.

c5bb6b9 is the protocol's main with task 34 (open question 10): the provided
KeyStore::sign_out keeps the device key whatever AccountRecord.bound_existing_key
says (only DeviceKeyChoice::Forget deletes it), and the crate gains Adoption,
Release and REVOCATION_KIND_RELEASED. Nothing in the workspace needed a source
change to compile (cargo check --workspace --all-targets --locked is clean on
1.94); the conformance Fixture of voelin-proto now holds an Arc<dyn Backend>,
and FakeHandle implements it, so the two callers build as they were. The
suite still has 17 cases, in the same order, so the two comments that named
the old revision name c5bb6b9.

Cargo.lock: the three source lines only. `cargo update -p ...` also flips
windows-sys 0.52 to 0.61 and itertools 0.14 to 0.13 in unrelated entries;
those are not taken, `--locked` accepts the file without them.
THIRD_PARTY_NOTICES.md regenerated (scripts/notices.sh): unchanged, the
workspace and git crates are not in it.

The voelin-store tests that pinned the old sign-out (a key made for the
account is deleted by Auto) are turned around here, in the same commit,
because they cannot pass with the new trait: the key stays, unbound, and only
Forget deletes it. The rest of the sign-out follow-up (the module documents,
the refusal wording, the new tests) is the next commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 06:53:29 +03:00
faumarayandClaude Fable 5.1 de89fddcb6 deps: crypto-bigint 0.7.7, ctutils 0.4.5, rustls-webpki 0.103.16, tokio 1.54.1, webpki-root-certs 1.0.11 (RUSTSEC-2026-0382, -0383, -0385, -0386, -0387); notices regenerated
CI / Linux checks (push) Successful in 37m31s
RUSTSEC-2026-0387 stays on the crypto-bigint 0.5 and 0.6 lines that the
tsclientlib fork pins (p256 0.13 in tsproto-types, crypto-bigint in tsproto);
ignored until 2026-12-20 with the fork's move to p256 0.14 as the follow-up.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 02:44:31 +03:00
faumarayandClaude Sonnet 5.5 371e4d77c8 Merge main (c60acf9, the session seam) into phase5/ui-vm-2
The engine of main runs on voelin_proto::link::Session; this branch had split
the Slint controllers into <area>/logic.rs (voelin-ui-vm) and <area>/bind.rs
(voelin-ui) before that merge and was never reviewed. One conflict, the one
the Opus gate of the seam merge predicted:

- crates/voelin-ui/src/servers.rs (modify/delete): this branch had split the
  file into servers/bind.rs and voelin-ui-vm's servers/logic.rs; main had
  changed the file for the seam (docs/session-seam.md 17.3). The file stays
  deleted and the changes of main are made where the code now is:
  servers/bind.rs sends ts::identity::to_blob(&identity) in ConnectVoice and in
  both ObserveGateway sends, builds voelin_core::QueryLogin {address,
  allowlisted: false} with voelin_core::QueryTransport for ObserveQuery, names
  ts::identity::DEFAULT_NICKNAME, and its tests import ts::identity::{Found,
  LaunchImport}; servers/logic.rs imports ts::identity::LaunchImport (and
  links ts::identity::import_new), and voice_options keeps the eager
  ts::versions::resolve for the message and assigns Some(spec.clone()) to
  VoiceOptions::client_version (the engine resolves the spec when it
  connects).

Cargo.lock merged without a conflict and differs from main's only by the edge
of voelin-ui-vm to roxmltree, which this branch added (d9de95b).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 14:18:43 +03:00
faumarayandClaude Sonnet 5.5 e13d401b9c Merge main (ad20979) into phase4/session-seam
Main brings the merge of phase5/ui-vm: the toolkit-free crates/voelin-ui-vm
crate and the logic/bind split of crates/voelin-ui. Conflicts, and what each
resolution keeps:

- crates/voelin-ui/src/settings_pages.rs: main deleted it (it is
  settings_pages/{mod,bind}.rs and voelin-ui-vm's settings_pages/logic.rs
  now), this branch had changed its voelin_core::identity paths. Deleted; the
  paths are voelin_core::ts::identity:: in bind.rs and in logic.rs.
- crates/voelin-ui/src/identities.rs: the module comment names
  voelin_core::ts::identity::import_new (this branch) and settings_pages/
  (main).
- docs/architecture.md: the voelin-core row of this branch with the
  voelin-ui-vm and voelin-ui rows of main.

Not conflicts, but needed to compile: voelin-ui-vm named the in-tree
voelin-model by path, which this branch moved to the protocol repository
(workspace dependency), and imported voelin_core::identity::Found, which is
voelin_core::ts::identity::Found. Cargo.lock merged without a conflict and
resolves with --locked; THIRD_PARTY_NOTICES.md is up to date
(scripts/notices.sh --check).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 10:32:05 +03:00
faumarayandClaude Sonnet 5.5 be84874a09 Take the gateway's identity as a blob and the query login as the engine's own type
Command::ObserveGateway.identity is a Box<IdentityBlob> (a TeamSpeak
identity as the key store keeps it; voelin_core::ts::identity::to_blob and
from_blob convert) and gateway::connect takes the blob too; gateway.rs reads
it itself, and one it cannot read ends the observation with its reason
instead of reaching the gateway. Command::ObserveQuery.connect is a
QueryLogin (transport, address, user, secret, server port and id) that
query.rs turns into voelin_query::Connect with the query crate's own line
options, which is what the UI always passed. voelin_core re-exports
IdentityBlob; voelin-identity is a dependency of voelin-core now, so
Cargo.lock gains that edge (the crate was in the graph already, and no
third-party package is added: THIRD_PARTY_NOTICES.md is unchanged).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 06:29:50 +03:00
faumarayandClaude Sonnet 5.5 d9de95b985 Make a picture's size mean it shows, and keep pixels the size they say
ImageSource::size() read a raster file's header, so a cache file that was
cut short or garbled after the header counted as showable, where the Slint
version's decoded image was empty. A raster picture is now decoded to tell
(the first frame, with the limits the Slint side uses) and an SVG must parse
as XML with an svg root (roxmltree, already in the tree through the vector
renderer); the answer is kept per file stamp, and per key and content hash for
a downloaded picture, and decoding runs outside the lock. The size check of
the pixel count no longer overflows on a header that claims u32::MAX.

ImageSource::Rgba holds a Pixels value that can only be made with the right
length, so the Slint conversion cannot hand clone_from_slice bytes that do
not fit (it panics on that).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 05:52:16 +03:00
faumarayandClaude Fable 5.1 ad2097963e Merge phase5/ui-vm: the toolkit-free voelin-ui-vm crate (plan section 6 step 2)
CI / Linux checks (push) Failing after 1m7s
Shared view-model types (ImageSource, Rgb, list diffing), the view models,
the BBCode reader and the Twemoji archive, SessionView/Tab/Msg and the App
state moved out of the Slint crate into voelin-ui-vm; the Slint crate keeps
adapters and bindings (studio and settings split into logic and bind).
Opus gate accepted with five minors left as follow-ups (server_tint falls
back to black, ImageSource::size reads headers only, convert::image does
not check the RGBA length, docs/ui.md metric wording, field docs on the
mirrored bridge structs).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-21 02:16:48 +03:00
faumarayandClaude Sonnet 5.5 fb8e6b63dd Take voelin-model from VoelinProtocol and add voelin-proto
voelin-identity, voelin-proto and voelin-model now come from one revision of
the protocol repository (main c8e0e5a: the session seam voelin_proto::link
with its account types, and the replica in voelin-model). The client's own
crates/voelin-model is removed: the protocol's crate is a superset, identical
in presence, server, chat and percent, and differs in badges.rs, link.rs and
tree.rs only by a doc comment and two equivalent expressions, and adds the
perms and replica modules. Every crate that used it takes
voelin-model.workspace = true. voelin-core depends on voelin-proto (and, in
its dev-dependencies, on the test-util fakes), which the engine will consume
in the next commits.

Manifests, the lock file and docs only: no source change. THIRD_PARTY_NOTICES.md
is unchanged (scripts/notices.sh --check: up to date).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 21:26:06 +03:00
faumarayandClaude Sonnet 5.5 ce7ec3afb7 Move the view models into voelin-ui-vm; the Slint models take plain rows
vm/{avatar,tree,servers,streams,home,chat,social,studio} and the UI
settings (settings.rs: keys, UiSettings, LastVoice, ClientPlaybackMap,
the audio form) move into voelin-ui-vm with their tests (102 there now;
the 86 view-model tests of voelin-ui all survive, the old list::sync test
became the list::diff tests). They produce the plain bridge structs, with
Rgb for colours and ImageRef for pictures:

- a file picture is ImageSource::File { path, stamp }: the engine writes
  a picture that arrives again into the same file, so the length and
  write time are part of the reference and a changed file redraws its
  row; size() reads the header once per stamp (no toolkit decoder);
- pictures held in memory (chat previews) are ImageSource::Memory;
- the line cache of the chat no longer keeps Slint models alive for
  pointer equality: plain lines compare by value, so an unchanged
  message makes the same line with or without the cache.

voelin-ui keeps every model as bind::rows::Rows<T>: the plain rows last
shown plus the VecModel, synced with list::diff, converting only the rows
that changed (bind/convert has the From impls). The controllers hand the
view-model rows to Rows::sync and convert forms at the bridge
(`.into()`); crate::vm is now `voelin_ui_vm as vm`, so paths stay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 10:20:55 +03:00
faumarayandClaude Sonnet 5.5 8e6838a00f Move the BBCode reader and the Twemoji archive into voelin-ui-vm
Both are pure (no Slint): vm/bbcode.rs and emoji.rs with their tests and
the packed archive (assets/twemoji.bin, with its license note; the
packing script writes it there). voelin-ui keeps the paths
crate::vm::bbcode and crate::emoji as re-exports until the callers move.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 09:15:44 +03:00
faumarayandClaude Sonnet 5.5 4dc8272c64 Add voelin-ui-vm: toolkit-free view-model types and the Slint adapter
New crate voelin-ui-vm with no UI toolkit in its tree: ImageRef
(Arc<ImageSource>: File, Rgba, Svg, Memory, None, with size()), Rgb for
colours, list::diff(old, new) -> Changes (updates, removals and
insertions by index) and the bridge structs as plain Clone + PartialEq
values (the 51 of bridge.slint without the account's two, and the 10 of
studio-bridge.slint). Strings are Arc<str>, lists Vec.

voelin-ui keeps the temporary seam: From impls between every bridge
struct and its Slint twin (bind/convert), and bind/rows.rs, which applies
Changes to a VecModel and converts only the rows that changed. The
viewer's quality list is the first model on it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 08:53:13 +03:00
faumarayandClaude Sonnet 5.5 2e026a043c Update rustls and yoke-derive for cargo deny, ignore wasapi until 0.25
cargo deny check failed on the advisories of the base lock:

- rustls 0.23.45 (RUSTSEC-2026-0346 to 0349: Debug output of client session
  values, buffered data after ECH rejection, unbounded brotli certificate
  decompression, ServerHello downgrade): cargo update -p rustls --precise
  0.23.46, which the advisories name as the fix.
- yoke-derive 0.8.3 was yanked: cargo update -p yoke-derive --precise 0.8.4.
- wasapi 0.24.0 (RUSTSEC-2026-0332, unsound WaveFormat::parse): the fix is
  wasapi 0.25.0, a breaking release of a Windows-only dependency of
  voelin-media, which the Linux CI can neither build nor test, so it is not a
  semver update. voelin-media never calls WaveFormat::parse (it only builds
  formats with WaveFormat::new). deny.toml ignores the advisory with that
  reason and a date: remove by 2026-12-20, by upgrading wasapi on a Windows
  machine. cargo-deny cannot enforce the date; the comment and the reason say it.

Cargo.lock changes only those two packages (cargo's re-resolution also moved
tempfile to getrandom 0.3.4; that is put back to 0.4.3 by hand so the diff is
the advisories' and nothing else; cargo metadata --locked accepts it).
THIRD_PARTY_NOTICES.md is regenerated (scripts/notices.sh, cargo-about 0.9.2)
for the two version numbers.

cargo deny --locked --workspace check: advisories, bans, licenses and sources
ok.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 08:46:58 +03:00
faumarayandClaude Sonnet 5.5 4944a0694b Let a sign-out finish when a row's binding columns cannot be read
SqliteKeyStore::list() failed on the first row whose binding columns were
damaged outside this crate (synced = 2 on the account record, say), and
KeyStore::sign_out starts with list() through bound_to(): it never reached the
record, so it could never finish, and DeviceKeyChoice::Forget did not delete
the key it was given either. get() failed the same way where sign_out reads
the record and the device key.

A row whose binding columns cannot be read (refused by
AccountBinding::from_columns, or a value of the wrong type) is now listed and
read as unbound, with a tracing warning that names the row and the reason and
quotes no content. Unbound is the reading that never deletes on a guess: such
a row is not deleted as a synced copy, and a put of it writes four good
columns. A data column that is not text is read as text with the odd bytes
replaced, so a record that cannot be read is deleted by the trait's sign_out
instead of its read failing; a row whose kind or uid is not text cannot be
addressed and the list leaves it out with a warning. list() now fails only
when the database does.

Tests: the gate's probe (UPDATE identities SET synced = 2 WHERE kind =
'account', then sign_out with Auto and with Forget on a store with
bound_existing_key true and false), more damage to the record row, the device
key row and a synced copy, and the unreadable data and kind/uid cases; the
test that asserted the old precise errors of get() and list() now asserts the
unbound reading. The six new tests fail on the previous keystore.rs.

voelin-store gets the tracing dependency (already in the lock); Cargo.lock
changes, THIRD_PARTY_NOTICES.md is unchanged by it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 08:23:55 +03:00
faumarayandClaude Sonnet 5.5 015c938212 Depend on voelin-identity from the private VoelinProtocol repository
voelin-store will keep Voelin identities and the signed-in account next to
the TeamSpeak ones (Phase 4 step 2, protocol Phase 2 tasks 7 and 28), through
the identity blobs and the KeyStore trait of voelin-identity.

The dependency is a workspace git dependency on the SSH URL that the
protocol's docs/development.md names, pinned by commit (64808cc, the head of
its main when task 28 was accepted), so that a per-developer
.cargo/config.toml [patch] can redirect it to a sibling checkout. The recipe
is in docs/building.md; .cargo/ is ignored so it is never committed.
deny.toml allows that one git source. CI and the Docker builds need read
access to the private repository (a deploy key or a token); docs/ci.md and
docs/building.md say so.

Cargo.lock gains voelin-identity, voelin-proto, x509-cert 0.3 and
der_derive 0.8.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 05:41:52 +03:00
faumarayandClaude Sonnet 5.5 da372dfe10 Give the stream API core-owned types
Command and Event no longer carry voelin-stream's types. voelin-core owns
StreamInfo, ViewerInfo, StreamSetup, StreamKind, ViewerState, EndReason and
LeaveReason (stream_types.rs) with u16 client ids, a viewer's SRTP profile
as its name and its codec as voelin_media::Codec; stream.rs converts at the
boundary. Command::SetSrtpProfiles takes profile names, which the stream
task parses.

EncodedFrame, LayerSpec, LayerId and LayerSet move into voelin-media
(stream::EncodedFrame, layer); voelin-stream depends on it and re-exports
them, so the engine, the stream sessions and voelinctl share one type. The
crate is now a plain dependency of voelin-core (feature media keeps the
module and WHIP), and its str0m feature is gone with str0m always there.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 15:01:24 +03:00
faumarayandClaude Sonnet 5.5 df7be67d4c Move voice packet types into voelin-audio
voelin-audio no longer depends on tsclientlib or tsproto-packets. Its
boundary is now plain types in packet.rs: TalkerId, VoiceCodec, VoicePacket
(talker, seq, codec, whisper, payload) and EncodedVoice (codec, payload; an
empty payload ends the transmission). The jitter buffer moves from
tsclientlib::audio into jitter.rs and reads VoicePacket fields; the encoder
returns EncodedVoice and the mixer is keyed by TalkerId.

In voelin-core, voice.rs is the only place that wraps EncodedVoice into a
TeamSpeak audio packet and reads one into a VoicePacket (codecs other than
Opus are dropped there, where the jitter buffer rejected them before);
audio.rs and session.rs work on the new types. voelinctl converts at its
own edge. Behaviour is unchanged: the one-hour drift simulation gives the
same latencies as before.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 13:06:46 +03:00
faumarayandClaude Sonnet 5.5 1bee9c94e8 client: myTeamSpeak support leaves the client
CI / Linux checks (push) Failing after 1s
The public client repository must not carry third_party/schema-api:
TeamSpeak's non-public myTeamSpeak API protocol definitions, which came
without a licence. The account sign-in built on them (crates/voelin-myts)
goes with it, since nothing else in the client used that snapshot.

Removed: third_party/schema-api, crates/voelin-myts, the account module of
voelin-ui (sign-in, saved session, profile, avatar, badges, User Tag), the
login page at start and the live account test of voelin-core. The workspace
members, default-members and exclude lists, both manifests and Cargo.lock
no longer name them (tonic, prost-build and their dependencies drop out of
the lock file and THIRD_PARTY_NOTICES.md; about.hbs has no schema-api
section).

Settings -> My Account keeps the identity in use and shows a note that
account sign-in is not available in this build. The Slint account screens
stay, fed neutral values (Bridge.myts keeps its default: signed out, not
available, no prompt), so the account can return without redoing them. The
TeamSpeak protocol parts in tsproto/tsclientlib (myTS ID, other users'
badges and avatars) are untouched.

The account returns later through the gateway library (VoelinGateWay); the
research notes in docs/research/myteamspeak.md stay and say so. CHANGELOG,
docs/ui.md, docs/identity.md and SECURITY.md no longer describe the account
as present. A session an earlier build saved stays in the system keyring
(item myts/session) until the user deletes it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 00:17:05 +03:00
Claude 7ab43bbf60 Merge PR #11: myTeamSpeak avatar, badges and User Tag; banners; gateway speed and logs
Conflicts and how they were resolved:
- CHANGELOG.md: both sides' lines kept under [Unreleased], each in its
  section; the badges line says TeamSpeak 6's verified badges come first.
- crates/proto/UPSTREAM.md: #11's myTeamSpeak presentation stays patch 15;
  this branch's privilege key (default_token) patch becomes 16.
- voelin-core web.rs: #11's downloader (retry hints, revalidation, proxies,
  per-host limits) as it is. The chat pictures' size limit sits on top as
  web::fetch_chat_picture, which narrows #11's Limits; fetch_within takes
  them by value. The badge pictures go through #11's fetch like banners.
- voelin-core session.rs: both sides' fields kept (chat_pictures and
  unfetchable). Chat pictures ([img]) are an ImageRequest of their own
  (ChatPicture) instead of sharing Picture with banners, so #11's banner
  policy (retried every 15 minutes while shown, logged by address) does
  not apply to them: they keep the 1, 4, 16 s retries and are checked
  against the size they were asked for; their failures are logged by host
  at debug level. Badge pictures stay Pictures next to #11's banner loop
  (with its unfetchable-scheme log).
- voelin-ui servers.rs: #11's imports (Instant, debug) with this branch's
  (no SharedString).

Where the two badge features meet: the presence's badges are now
voelin_model::shown_badges, TeamSpeak 6's client_signed_badges (what #11
sends for our account, and other TS6 users' verified badges) first, then
client_badges, each once; so the badges chosen in Settings → My Account
show in the tree and on the member card like other people's.

Also: docs/ui.md describes My Account's badge choice and User Tag, the
new ui.image_cache_mb default (256), and the picture downloads as #11 left
them (16 at once, 6 per host, 128 MiB, the new timeouts, banner and badge
retries, proxies, BMP and ICO, scaling down past 4096 pixels) with the
chat pictures' own retries; the demo's login:account switch fills in a
badge choice and a User Tag for screenshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
2026-10-08 02:14:08 +00:00
Claude 4940966538 ui: a New line above the first unread message, and read markers kept on disk
Messages count as read only while their chat is on screen (Nav.chat-shown)
in the focused window: winit's focus events, through slint's
unstable-winit-030 on the desktop; Android counts a chat on screen as
read. A tab keeps the newest message read and counts what came after it,
not our own. Entering a tab with new messages puts a red New line above
the first one until the tab is left (so does a stored or gateway page
that brings them while the tab is on screen), and while that line is
above the view a bar over the list counts them, with Jump and Mark as
read.

voelin-store migration 5 adds chat_reads (Store::chat_read, set_chat_read,
chat_reads). Markers are loaded once a session's server is known and
written when a tab is left, marked read, its session ends and on exit,
never per message; a restart counts what came while away again, gateway
pages included. Dev switch VOELIN_OPEN=unread[:end].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
2026-10-07 09:01:15 +00:00
Claude 79a12654c8 myTS avatar, badges and User Tag from a saved session; banners; gateway logs and speed
Own account on TeamSpeak 6 servers:
- With only a saved session, the account's avatar and its certificate come
  from myTeamSpeak's avatar service (requestContactsAvatar for the own myTS
  ID), the signed badges from getSignedBadges and the User Tag's token from
  /tschat requestSignedAllowedIdentifierList; no password sign-in needed.
- tsproto::myts::Certificate checks a certificate chain as the server does
  (block types 4-7, leaf type 6, validity, key from the root, cofactorless
  Ed25519); each part is sent with a certificate that verifies it, in
  separate updatemytsdata commands when they differ, and cleared on sign-out.
- client_user_tag is set as the official client sets it
  ({"myts_token","tag","updated"}) on TeamSpeak 6 servers, after a
  self-check of the token; cleared on sign-out or an account change.
- Settings -> My Account shows the User Tag and lets the user choose up to
  three badges to show. The log says what the server published.

Banners:
- The URL (without query) is logged on the first failure; stalls, connect
  failures and missing answers are named; 400/404/410 are retried after
  15 minutes, then hourly; 429/503 honour Retry-After.
- Cached pictures are revalidated (ETag, Last-Modified); at most 6
  downloads per host; a User-Agent with the app version.
- The desktop portal's proxy (Linux) and the system proxy (Windows, macOS)
  are used, SOCKS included; redirects are followed hop by hop.

Gateway, client side:
- Only a refused login stops observing; retries after 1, 2, 5, 10, 20, then
  30 s with jitter, at once when voice connects; a 30 s keepalive.
- Discovery asks DNS and the well-known endpoints at once; observing is not
  restarted when the found list still holds the gateway in use.
- Info logs for discovery, attempts (with the stage that hung), connections,
  losses and the first presence.

tsgw:
- Logging setup (log.level, log.file with size rotation, colour only on a
  terminal) and lifecycle logs: startup summary, the address the server
  sees for queries, WebSocket connections, logins, refusals, slow requests,
  ServerQuery failures, relays and the observer.
- The lookup query connection reconnects after a TeamSpeak restart; query
  connects time out after 10 s; a silent server cannot wedge a connection;
  SIGTERM, startup while TeamSpeak is down and /health are handled.
- TCP_QUICKACK and one write per line: ~45 ms -> <2 ms per SSH command.
- One flood guard shared by all query connections (9 per 3 s, SSH auth
  counted, every connection holds on a 524).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
2026-10-06 18:28:09 +00:00
Claude 22c8623218 Release 0.0.1-alpha
The apps (voelin-ui, voelin-android) are 0.0.1-alpha; the gateway keeps
its own version. A pre-release version broke three package builds, now
handled:
- Android: versionCode took "1-alpha" as a number (Gradle failed); it
  counts the version without the pre-release (0.0.1-alpha: 1).
- Windows installer: VIProductVersion must be numeric; makensis refused
  "0.0.1-alpha.0". package.sh passes VERSION_NUMERIC (0.0.1).
- Debian: "0.0.1-alpha" reads as revision "alpha" and sorts after 0.0.1;
  the package version is 0.0.1~alpha.
Draft releases of such tags are marked as pre-releases (GitHub, Gitea).

Changelog: the Unreleased section is 0.0.1-alpha, with myTeamSpeak sign-in,
banners and a known issue. AppStream: the never-released 0.1.0 entry is the
0.0.1-alpha development release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEpqsPES27Eacue91u3d2Q
2026-10-04 19:30:32 +00:00
Claude b28802efa2 schema-api: tonic TLS on aws-lc-rs, so rustls has one crypto provider
schema-api enabled tonic's tls-ring, which turns on rustls' ring next to the
aws-lc-rs that reqwest and str0m use. With two providers rustls cannot pick
a process-wide one, and every TLS client built without an explicit provider
panics: tokio-tungstenite's for wss:// gateways ("Could not automatically
determine the process-level CryptoProvider"), leaving observation stuck at
Connecting. tonic uses tls-aws-lc now (second local patch, VOELIN-PATCH.md);
ring is gone from rustls in Cargo.lock.

voelin-core's one_rustls_crypto_provider test builds a rustls client config
with the app's TLS dependencies (voelin-myts is a dev-dependency there); it
panics as above with tls-ring and passes with tls-aws-lc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEpqsPES27Eacue91u3d2Q
2026-10-04 18:48:11 +00:00
Claude 9db6937489 Merge branch 'codex/myteamspeak-account': myTeamSpeak account sign-in
Conflicts with the channel banners on main, both kept:
- crates/proto/UPSTREAM.md: myTeamSpeak's local patch is number 14, after
  the channel banners' 13.
- voelin-core/src/voice.rs: both test modules.
- ui/app.slint: the mobile shell hides behind the account prompt and keeps
  the channel chat's banner.
- ui/shells/common.slint: the user card counts a signed-in account as named
  and shows our avatar, the person icon only without one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEpqsPES27Eacue91u3d2Q
2026-10-04 17:55:31 +00:00
faumaray 24acc1910a account
Signed-off-by: Faumaray <faumaray@gmail.com>
2026-10-04 19:11:37 +03:00
selikhov 02693a0f7f Complete channel banners across desktop and mobile
Finish banner rendering, image cache invalidation, avatar/icon wiring and image-format support. Bound raster decoding, retain readable text contrast, and recover failed downloads while stopping obsolete reload timers.

Validated with 168 library tests, a private TS6 banner lifecycle test including the real 60-second reload, desktop builds, strict scoped Clippy, formatting, license notices, independent source review and six headless desktop/mobile renders.
2026-10-04 17:05:25 +03:00
selikhovandClaude Opus 5.5 1318a9db3b Fetch banners from the web into the image cache
The host banner (virtualserver_hostbanner_gfx_url) and TeamSpeak 6
channel banners are http(s) addresses on any host, not files on the
server, so the voice file transfer that fetches avatars and icons cannot
get them. A new engine path (web.rs) downloads them with the workspace's
reqwest client (rustls, system proxies and certificate store) into the
same cache, keyed by the MD5 of the address (pictures/<md5>), only for
http and https, at most 4 MiB, with a 10 s connect and 30 s overall
timeout, and keeps a download only if its content is a picture the UI
decodes (PNG, JPEG, GIF, WebP, SVG), whatever the address or the server
say; an error page is not cached as a banner.

The session fetches the banners of the presence it shows, from any
source, when cache.fetch_images allows (it contacts hosts the server
chose, as the official client does), and reports each as PictureReady.
When the server sets virtualserver_hostbanner_gfx_interval, a timer asks
the session to fetch the host banner again (never more often than once a
minute, as TeamSpeak 3 and 6 servers enforce) and the new file replaces
the old one; Cache::fetch takes `fresh` for that.

Tests: a local HTTP server on 127.0.0.1 for the download, the size cap
(announced and unannounced), refused pages and the cache; the cache keys;
a live test that sets both banners on the TeamSpeak 6 dev server through
ServerQuery, sees them arrive and puts the server back. voelinctl engine
prints the pictures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:12:34 +03:00
selikhovandClaude Opus 5.5 55440a202d Merge the development branch: stream negotiation, best first then fall back
No conflicts. From the development branch: stream connections step down
when they connect but carry no media or never decode (another codec,
H.264 profiles, SRTP fallback), mDNS host candidates, larger stream
sockets, and the smoke test waiting for clients instead of pausing.
Nothing in the UI crate changed; this wave's screens are as they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 09:02:09 +03:00
selikhovandClaude Opus 5.5 fe9d468d71 Merge the negotiation work: best first, then fall back, everywhere
The user's rule for every negotiation: try the best option first and step
down for compatibility when it is not accepted.

- H.264 is offered in Constrained High, then Constrained Baseline; the
  streamer encodes each viewer in the profile its answer took (headless
  Chromium, which answers Baseline only, now decodes our H.264 streams).
- A connection that connects but carries nothing steps down at runtime:
  the viewer reconnects without the failing SRTP profile, or without the
  codec when audio came; the streamer offers a new connection when its
  viewer reports nothing; video of one codec that never decodes makes the
  viewer ask for another codec. Proven with a UDP relay that breaks SRTP
  and against Chromium.
- mDNS host candidates (`<uuid>.local`) are resolved, so peers that hide
  their addresses still connect on a LAN.
- Peer sockets get 4 MB send and receive buffers: bursts at 9 Mbit/s no
  longer drop datagrams in the kernel; NACK and retransmission repair
  losses before frames reach the pipeline.
- docs/architecture.md, "Negotiation: best first, then fall back": every
  negotiation point, its ladder, what counts as refused, and why AES_CM
  stays first for SRTP and DTLS stays at 1.2 until the official client is
  shown to take the alternatives.

Checked on the merged tree (with the decoders and servers work): fmt,
clippy, the tests of stream, media, core, ui, voelinctl, gateway and
tsclientlib, the browser interop tests (7 and 3) and scripts/it-smoke.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 04:45:52 +03:00
selikhovandClaude Opus 5.5 356bb0c6ac Merge the development branch: add a server by its address, TSDNS, gateway DNS
Both sides kept. From the development branch: the add-server dialog
asks for the address and an optional password (the rest under Advanced
when editing), servers are found through TSDNS and their gateways in
DNS, wss:// gateways, the official client's identities imported on
every start, and a bookmark built from the form over the old one.

The dialog keeps this wave's join mode for Home's "Join a Server": its
title says so, the button reads Join and connects once saved; adding
and editing read as on the development branch. Saving takes the
development branch's bookmark_from_form, which keeps the bookmark's
identity as this wave's code did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 04:29:59 +03:00
selikhovandClaude Opus 5.5 559ec01fee Reach wss:// gateways: TLS in the gateway client
The gateway client was built without TLS, so every wss:// gateway, the
setup docs/gateway-admin.md recommends and what a _tsgws._tcp record
names, failed with "TLS support not compiled in". tokio-tungstenite now
uses rustls with the system's certificates; rustls and its crates were
in the tree already (reqwest), so nothing new is downloaded.

Checked end to end against the TeamSpeak 6 dev server: tsgw behind a
TLS terminator with a certificate from a throwaway CA, the login over
wss:// works when the CA is trusted (SSL_CERT_FILE) and is refused with
UnknownIssuer when it is not. Android has no system store to read, so
wss:// stays out of reach there; the docs say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 03:25:24 +03:00
selikhovandClaude Opus 5.5 cd5ac614ef Merge the development branch: Wave 5B's phone screens and quick-share sound
Both sides kept. From the development branch: the phone's voice channel
screen, the pages over it (pins, topics, members), the voice button in
the phone's top bar, the quick share's mixer and picker, invite links,
viewer counts, the studio's cameras and RTMP output, and the Android
pieces.

The phone's top bar keeps this wave's search button next to the voice
button and the bell (the bell opens the notifications panel); its tabs
mark Home also on the friends, messages and Library pages and Servers on
a server's events page. The phone shell shows both sides' pages: this
wave's friends, messages, events and Library pages with their back
button, and the development branch's voice channel screen, which hides
the bottom navigation as before.

Home keeps this wave's page, which maps the design onto TeamSpeak as
decided for it (friends' presence across servers, the latest chats of
every server, live streams of all servers); the development branch's
interim home (people on the current server, its chats, its streams)
gives way to it. Its server cards still switch the phone to the Servers
tab through Nav.show. A server item keeps this wave's detail and flavor
with the development branch's wording of `live` (streams on the server).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 03:20:20 +03:00
selikhovandClaude Opus 5.5 d7940f846a Merge claude/gifted-lovelace-1crlx2 (Wave 5B) into the negotiation work
The base moved on (the phone and Android wave, the quick share's sound,
voelinctl subscribing to every channel); it merges without conflicts
and the negotiation changes build and pass on top of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 23:25:00 +03:00
selikhovandClaude Opus 5.5 5aea8ef673 Find a server's gateway in DNS, like TeamSpeak finds the server
Users should not have to type a gateway URL: a server added by its address
should bring its tsgw along, the way TeamSpeak finds the voice server with
SRV _ts3._udp and TSDNS. voelin_core::discover::gateway looks at the
address's host and then each parent domain down to the registered domain,
the most specific first, for SRV _tsgws._tcp (wss) and _tsgw._tcp (ws)
records, TLS first at the same name, with the path from an optional TXT
record ("path=/v1" by default).

Without records, as TSDNS has its port 41144, the gateway itself is asked
on tsgw's default port: tsgw now answers GET /.well-known/tsgw with the URL
apps should use (listen.public_url, else the address the request came in
on), so a tsgw next to the server is found with no setup at all.

docs/gateway-admin.md says which records to publish, with examples. The
DNS lookups are injectable in the module: tests with fake SRV/TXT answers
and a local responder; the gateway's own test fetches the well-known URL
from the real router and logs in there. hickory-resolver is the version
the voice resolver already uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 23:24:57 +03:00
selikhovandClaude Opus 5.5 d715444abd Merge Wave 5B: the phone, Android, and the quick share's sound
The phone's voice channel screen (mockup 02), Home and bottom navigation;
Android cameras through Camera2, the screen shared into MediaCodec's input
surface without a copy, notifications with working actions, "Share to
Voelin"; the multi-select audio picker with app icons; and, asked by the
user, the quick share's sound: the share dialog shows the studio's mixer
rows (meter, gain, mute) for `stream.audio_sources` and its picker, and a
running share follows changes live. docs/android.md rewritten.

Conflicts: both waves gave studio cameras a new backend (Windows Media
Foundation from Wave 6A, Android Camera2 here); both are kept, in the
docs and code. The Windows build caught what the merge could not: each
side's `Capture` initializers lacked the other's field, and Media
Foundation cameras lacked `Camera::mirrored` (webcams face the user, so
true). Checked: fmt, clippy (host, x86_64-pc-windows-gnu for voelin-media,
both Android runs), and the tests of stream, media, core, ui, android and
voelinctl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 23:20:29 +03:00
selikhovandClaude Opus 5.5 ba6142e12e Give the stream sockets room for high-bitrate bursts
Watching an official client's 1440p60 H.264 stream (6-9 Mbit/s) showed a
very bad frame rate. The peer sockets used the system's default buffers
(208 KB on Linux, about 90 full-size packets once the kernel's per-packet
overhead is counted), so a keyframe of hundreds of packets that arrives
while the peer task is busy overflows them, and every packet the kernel
drops costs the viewer a retransmission or a keyframe.

Each peer socket now asks for 4 MB of receive and send buffer
(PeerConfig::udp_buffer; the kernel caps it at rmem_max/wmem_max). What
the system granted is logged, and once per process with a sysctl hint
when it is less than asked.

Measured on loopback, 9 Mbit/s of noise at 60 fps with a 400 KB keyframe
every second, unpaced (high_bitrate_bursts, --ignored): with the default
buffers the kernel dropped 118-209 datagrams per 5 s and 3 of 300 frames
arrived after a gap; asking for 212992 bytes (what a default rmem_max
allows, doubled by Linux) or for 4 MB, nothing was dropped and every
frame arrived whole.

Also checked: our answer to a real libwebrtc offer (headless Chromium
152, H.264 first, stored as a fixture) keeps nack, nack pli,
transport-cc and an RTX payload type for every H.264 variant, and a relay
that loses one media packet in 25 shows str0m's NACK and retransmissions
repairing every loss before its depacketizer gives up (30 frames). The
relay (tests/relay) also serves the fallback tests that follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:56:14 +03:00
selikhovandClaude Opus 5.5 56c7bd98fb Merge the development branch: share menu, portal rows, every channel's streams
Both sides kept. From the development branch: the share dialog's portal
rows ("Same as last time" restores the portal's last choice), the Share
button's menu with the Stream Studio in it instead of a button of its
own in the desktop top bar and the phone header, the codec order,
person segmentation for the studio, and streams of every channel.

The phone header keeps this wave's search button next to the bell; the
studio button goes as on the development branch. video.rs keeps the
development branch's imports without EncoderReport, which the
Integrations page now asks the codecs for itself. The Devices page
lists the capture sources without the restore row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:16:48 +03:00
selikhovandClaude Opus 5.5 698e5f911e Merge the development branch: share menu, codec order, segmentation
Brings in the Share button's menu (Share screen / Stream Studio) and the
removal of the separate Stream Studio button from the headers, the
codecs every TeamSpeak client decodes ahead of H.264, the portal fix
and person segmentation.

The phone header keeps this branch's voice-channel button and hides the
bell on the voice screen, and loses the Stream Studio button as the
development branch wants. The studio's test table takes the
segmentation rows and the Android camera row. MediaCodec follows the new
codec order with no code change (Codecs orders every hardware factory's
codecs); its description and docs/media.md now say so, including what
that means on a phone without a hardware VP8, VP9 or AV1 encoder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:02:47 +03:00
selikhovandClaude Opus 5.5 5460927975 Merge branch 'claude/gifted-lovelace-1crlx2' into worktree-agent-a96f452184d5988cc
Brings in the portal dialog entry, the studio's person segmentation
(tract-onnx) and the Share button's menu. In docs/studio.md's status
table the segmentation rows join this branch's camera and RTMP rows
(RTMP is no longer a seam). docs/ui.md no longer says the engine cannot
tell a viewer the layers (a Voelin streamer lists them) nor that the
background effect has no segmentation model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 19:48:17 +03:00
selikhovandClaude Opus 5.5 146502c9ca voelin-media: find the person for the studio's background replacement
Blur, image and colour backgrounds were cut around a centred oval: no
segmentation model was in the build. `segment::HumanSeg` (feature
`segment`, on by default) now runs PP-HumanSeg, PaddleSeg's portrait
segmentation model as OpenCV Zoo ships it (Apache-2.0, 6 MB, bundled in
crates/voelin-media/models with its licence and SHA-256), on the CPU with
tract-onnx: the frame squeezed to 192x192 RGB, the probability of a person
per pixel out as the mask. It is the default segmenter; the model is
parsed and optimised once per process on the segmentation thread, and if
it does not load the oval stands in. Builds without the feature keep the
oval.

One mask takes about 50 ms on one core (tract is optimised in dev builds
too, as voelin-media already is; unoptimised it took 430 ms), so the 10
masks a second cost about half a core. A new test checks the model loads,
the mask size, that an empty evenly lit room has next to nobody in it, and
the time per mask; the frame-path tests now use the oval explicitly, since
they need a mask known in advance. On a photo of a person the mask
follows the silhouette, arms and legs included (checked by eye; the photo
is not committed). Not yet tried with a camera.

The notices list the model and its licence; THIRD_PARTY_NOTICES.md is
regenerated for tract and its dependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:22:56 +03:00