studio.rs (62 Bridge writes) is split like the settings pages. What the
studio decides lives in voelin_ui_vm::studio::logic:
- StudioData, the state apart from the running parts (settings, scenes,
status, statistics, destination, stream, pickers, overlays), with the
bitrate and layers a stream starts with, the hidden-tick counter, the
preview size, the destination choice, the stream settings form and the
header/bottom-bar status (status_view, with the front end's side passed
in as a StatusContext), the overlays the switches ask for;
- where the stream goes (destinations, their names and rows, the channel
tab of the stream chat), the stream settings panel's edits, the output,
the layer, source, picker and mixer controls (source_action,
source_change, camera/screen/audio pickers, main_source_changes), the
studio settings dialog, event and ending texts;
- the studio's own settings type and key (StudioUi, STUDIO_UI), the demo
studio's sample scenes, viewers, stream and chat message.
voelin-ui keeps studio/mod.rs (StudioState: the models, the running
studio, the windows, the mixer handles, plus StudioData) and studio/bind.rs
(the engine tasks, the preview, the encoder, the two windows' StudioBridge
writes, the camera and screen listing, the chat and stream commands). The
demo settings return their problems instead of logging them. SessionView
and Tab methods that need no Default list type no longer ask for one.
28 new tests cover the logic.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
settings_pages.rs had 52 Bridge writes interleaved with what the pages
show and change. The decisions now live in
voelin_ui_vm::settings_pages::logic and work on the settings service, the
AppState and the plain bridge rows:
- the forms read from the settings (video, streaming, notifications,
privacy, advanced), the layer and audio-source rows and the filtered list
of all settings;
- the settings written from the forms (apply_video, apply_streaming,
layer, audio source, SRTP profile, notification, privacy and advanced
edits), each returning the messages for the status line instead of
writing them;
- the Integrations rows (gateways, configuration keys, permission rules,
encoders and decoders with their status texts) and the Profiles rows
(identities, bookmark pickers, what an import found, the account form);
- the pages' own state (PagesState, Improving), the layer, preset and
codec helpers, allowed_index/of and origin_label, with the tests that
went with them and tests for each of the above.
voelin-ui keeps settings_pages/{mod,bind}.rs: Pages (PagesState plus the
camera preview and the audio-app watcher), the Bridge and model writes, and
what a change sets going (camera, engine, identity store, threads). A
message the logic returns is logged and shown as before; the one visible
difference is that the "A layer needs a size" hint is logged with it.
serde_json becomes a regular dependency of voelin-ui-vm (the JSON typed into
the Advanced list); the lock file is unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The sessions and their chat tabs, the downloads, pins and linked pictures,
and the data the screens share (the servers, the settings, the dialogs'
targets, the share and watch bookkeeping) no longer live in the Slint
crate. `SessionView<L>` and `Tab<L>` are generic over the list type of a
tab's chat lines: the Slint app plugs in `Rows<ChatLine>`
(`app::ChatRows`), a GPUI view can use a plain `Vec`. `App` keeps one
`AppState` in `state` and the Slint models; every `self.sessions`,
`self.current`, `self.bookmarks`, ... becomes `self.state.<field>`.
server_icon and server_icon_for stay with the session: `ImageRef` is
toolkit-free now, so they need no adapter. Tests for the tab and session
logic (private chat focus, tab removal, read markers, the divider) are
new, since that logic could not be tested without the Slint crate before.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
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>
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>