diff --git a/Home.md b/Home.md index f53c36d..0937381 100644 --- a/Home.md +++ b/Home.md @@ -147,7 +147,7 @@ Security issues: see [SECURITY.md](https://git.faumaray.com/Voelin/VoelinClient/ ## Documentation pages -Mirror of `docs/` on `main` (`3930ef2`). The repository files are the source; this wiki is regenerated by `.claude/wiki-sync.js`. +Mirror of `docs/` on `main` (`2e985d7`). The repository files are the source; this wiki is regenerated by `.claude/wiki-sync.js`. - [android.md](android): Android app - [architecture.md](architecture): Architecture diff --git a/android.md b/android.md index 6327266..7003b1a 100644 --- a/android.md +++ b/android.md @@ -237,4 +237,4 @@ the source then says why). --- -*Mirrored from [`docs/android.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/android.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/android.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/android.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/architecture.md b/architecture.md index ca8f0b3..84bfdb8 100644 --- a/architecture.md +++ b/architecture.md @@ -693,4 +693,4 @@ are defined in the core, which reads them on every use. --- -*Mirrored from [`docs/architecture.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/architecture.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/architecture.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/architecture.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/audio.md b/audio.md index b00533e..2eaf815 100644 --- a/audio.md +++ b/audio.md @@ -135,4 +135,4 @@ of it reappearing). The audio thread reports these changes as session errors. --- -*Mirrored from [`docs/audio.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/audio.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/audio.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/audio.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/building.md b/building.md index 089ede0..ddd0115 100644 --- a/building.md +++ b/building.md @@ -208,4 +208,4 @@ voelin-model = { path = "../VoelinProtocol/crates/voelin-model" } --- -*Mirrored from [`docs/building.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/building.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/building.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/building.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/ci.md b/ci.md index 6380708..6142b4b 100644 --- a/ci.md +++ b/ci.md @@ -351,4 +351,4 @@ runner; local shell/API fixtures do not establish deployment acceptance. --- -*Mirrored from [`docs/ci.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/ci.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/ci.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/ci.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/gateway-admin.md b/gateway-admin.md index 36f2038..0e1e527 100644 --- a/gateway-admin.md +++ b/gateway-admin.md @@ -456,4 +456,4 @@ with what they store locally. --- -*Mirrored from [`docs/gateway-admin.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/gateway-admin.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/gateway-admin.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/gateway-admin.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/gateway-protocol.md b/gateway-protocol.md index 74c2c32..992af49 100644 --- a/gateway-protocol.md +++ b/gateway-protocol.md @@ -194,4 +194,4 @@ for `react`, `pin`, `create_topic`, `create_event`, `rsvp`, `stream`, --- -*Mirrored from [`docs/gateway-protocol.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/gateway-protocol.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/gateway-protocol.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/gateway-protocol.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/i18n.md b/i18n.md index d552436..b205fee 100644 --- a/i18n.md +++ b/i18n.md @@ -141,4 +141,4 @@ therefore the translations. Texts outside Slint need their own mechanism: --- -*Mirrored from [`docs/i18n.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/i18n.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/i18n.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/i18n.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/identity.md b/identity.md index d4c412a..f3e1b26 100644 --- a/identity.md +++ b/identity.md @@ -253,4 +253,4 @@ the repository. Every fixture in the tests is generated by --- -*Mirrored from [`docs/identity.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/identity.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/identity.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/identity.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/media.md b/media.md index 5cb4e0e..c86ae80 100644 --- a/media.md +++ b/media.md @@ -1457,4 +1457,4 @@ has not run on Windows yet. --- -*Mirrored from [`docs/media.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/media.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/media.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/media.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/protocol-notes%2Fts6-streaming.md b/protocol-notes%2Fts6-streaming.md index ae0bc6b..8b7e8d8 100644 --- a/protocol-notes%2Fts6-streaming.md +++ b/protocol-notes%2Fts6-streaming.md @@ -426,4 +426,4 @@ itself with these decoders is still to be confirmed. --- -*Mirrored from [`docs/protocol-notes/ts6-streaming.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/protocol-notes/ts6-streaming.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/protocol-notes/ts6-streaming.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/protocol-notes/ts6-streaming.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/release.md b/release.md index 153ec37..6ca9dc8 100644 --- a/release.md +++ b/release.md @@ -238,4 +238,4 @@ After: --- -*Mirrored from [`docs/release.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/release.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/release.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/release.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/research%2Fmyteamspeak.md b/research%2Fmyteamspeak.md index 3b64db9..30e1a98 100644 --- a/research%2Fmyteamspeak.md +++ b/research%2Fmyteamspeak.md @@ -423,4 +423,4 @@ Voelin does needs them. --- -*Mirrored from [`docs/research/myteamspeak.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/research/myteamspeak.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/research/myteamspeak.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/research/myteamspeak.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/research%2Fstream-fps.md b/research%2Fstream-fps.md index 2f05461..522c9a0 100644 --- a/research%2Fstream-fps.md +++ b/research%2Fstream-fps.md @@ -82,4 +82,4 @@ repository. --- -*Mirrored from [`docs/research/stream-fps.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/research/stream-fps.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/research/stream-fps.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/research/stream-fps.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/research%2Fts6-late-join.md b/research%2Fts6-late-join.md index c64032f..cea29d7 100644 --- a/research%2Fts6-late-join.md +++ b/research%2Fts6-late-join.md @@ -239,4 +239,4 @@ between Voelin clients. --- -*Mirrored from [`docs/research/ts6-late-join.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/research/ts6-late-join.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/research/ts6-late-join.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/research/ts6-late-join.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/research%2Fui-review.md b/research%2Fui-review.md index 0c884c2..05276fc 100644 --- a/research%2Fui-review.md +++ b/research%2Fui-review.md @@ -349,4 +349,4 @@ Discord: --- -*Mirrored from [`docs/research/ui-review.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/research/ui-review.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/research/ui-review.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/research/ui-review.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/session-seam.md b/session-seam.md index 87c6233..a4e841a 100644 --- a/session-seam.md +++ b/session-seam.md @@ -1923,4 +1923,4 @@ targets included. --- -*Mirrored from [`docs/session-seam.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/session-seam.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/session-seam.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/session-seam.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/studio.md b/studio.md index aac84a3..5f8b9dd 100644 --- a/studio.md +++ b/studio.md @@ -376,4 +376,4 @@ two threads) takes about 3 ms at its own rate (15 fps by default). --- -*Mirrored from [`docs/studio.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/studio.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/studio.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/studio.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/testing%2Fload.md b/testing%2Fload.md index 22b6cbc..beacda2 100644 --- a/testing%2Fload.md +++ b/testing%2Fload.md @@ -262,4 +262,4 @@ What the smoke still does not do reliably, and was not changed for: --- -*Mirrored from [`docs/testing/load.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/testing/load.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/testing/load.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/testing/load.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/testing%2Fmanual-matrix.md b/testing%2Fmanual-matrix.md index 789d62c..803e8c3 100644 --- a/testing%2Fmanual-matrix.md +++ b/testing%2Fmanual-matrix.md @@ -224,4 +224,4 @@ noted. --- -*Mirrored from [`docs/testing/manual-matrix.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/testing/manual-matrix.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/testing/manual-matrix.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/testing/manual-matrix.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* diff --git a/ui.md b/ui.md index 2cea62d..16754c6 100644 --- a/ui.md +++ b/ui.md @@ -22,11 +22,29 @@ crates/voelin-ui-vm/ view models and state, no UI toolkit studio_bridge.rs the same for the Stream Studio state.rs AppState, SessionView, Tab, Msg: what the client knows apart from the window, generic over the list type of a chat tab's lines - servers.rs tree.rs chat.rs social.rs home.rs streams.rs avatar.rs studio/mod.rs + host.rs Host (what a transition asks of its front end), Update (what it + tells: Refresh, status, commands, Persist, ...), Cx + events/ events::apply: what an engine event does to the AppState + (mod.rs; gateway.rs: the gateway's events and directory) + previews.rs pictures linked in chat: which to fetch, the transfers + servers/mod.rs tree.rs chat/mod.rs social/mod.rs home.rs streams/mod.rs avatar.rs studio/mod.rs pure view models (engine state → bridge structs), unit-tested + chat/logic.rs chat tabs, messages and what is read, pins and topics, files; the + chat view (tabs, lines, divider, drawers) and the user's moves + streams/logic.rs the streams we share and watch: their state, the events and the + user's choices, the streams panel's, the share card's and the + viewer's rows and texts + servers/logic.rs which server is shown and how it is observed, joining a channel; + the rail, the server card and the channel tree as plain data settings.rs the UI's settings keys, the audio form settings_pages/logic.rs, studio/logic.rs the decisions of the settings pages and of the Stream Studio + dev/logic.rs the sample data of `VOELIN_DEMO_UI` as plain values and events + social/logic.rs the friends, the bell and the search as rows, what the user's moves on + them do, and what an event does to the friends, pokes and notices + settings_page/logic.rs + the audio settings page (devices, form, microphone test, push to + talk), the crash notice and the volume dialog of a client bbcode.rs emoji.rs chat formatting; the Twemoji archive, text → runs of text and emoji crates/voelin-ui/ the Slint front end ui/ @@ -53,20 +71,32 @@ crates/voelin-ui/ the Slint front end phone layout) assets/ fonts/ (Inter, OFL), icons/ (Lucide, ISC), logo.svg src/ - app.rs setup, the Slint models (`Models`), event dispatch; `App` holds + app.rs setup, the Slint models (`Models`), the event loop; `App` holds a `voelin_ui_vm::state::AppState` and the window - servers.rs chat.rs members.rs streams.rs settings_page.rs appearance.rs - home.rs social.rs messages.rs events.rs previews.rs popout.rs - the Slint side of each area (social.rs: contacts, the bell and the - search; previews.rs: pictures in chat; popout.rs: the stream's own - window) + host.rs SlintHost (the answers the transitions ask for), `App::handle_event`, + `transition` and `perform`: doing what an `Update` says + members.rs appearance.rs + home.rs messages.rs events.rs previews.rs popout.rs + the Slint side of each area (previews.rs: pictures in chat; + popout.rs: the stream's own window) + chat/ mod.rs, bind.rs: the chat view's Bridge writes and models + servers/ mod.rs, bind.rs: connecting and observing (store, secrets, engine), + the rail, the server card and the tree on the Bridge + social/ mod.rs (the models), bind.rs: contacts, the bell and the search on + the Bridge, the desktop toasts, the navigation after a move + settings_page/ mod.rs, bind.rs: the audio devices, the hotkey, the codec download, + the crash reports and the Bridge writes of the settings page settings_pages/ mod.rs (Pages), bind.rs: the settings pages on the Bridge + streams/ mod.rs (Share: the capture), bind.rs: the streams panel, the share + dialog and the viewer on the Bridge, the capture and the decoder studio/ mod.rs (StudioState), bind.rs: the Stream Studio's windows and engine bind/ callbacks of each area, wired once; convert.rs, convert/items.rs (plain values → Slint values), rows.rs (a Slint model kept in step with a plain list) images.rs the image cache (LRU, bounded by `ui.image_cache_mb`) - dev.rs development switches (screenshots, sample data) + dev/ mod.rs (the switches, listed), bind.rs: the window's size, the + screenshot, the screens opened at start, the sample data fed through + the app's own events ``` Models are created once (`app::Models`) and updated row by row with @@ -87,12 +117,18 @@ this file is `voelin_ui_vm::chat`. The boundary: - **Values.** A picture is an `ImageRef` (`Arc`: a file of the engine's cache with its stamp, decoded RGBA pixels, SVG or memory bytes, - or none; `size()` reads a file's header). A colour is an `Rgb(u32)`, a + or none; `size()` decodes a raster file once to tell it shows, and parses an SVG, so a + picture with a size is one a front end can draw). A colour is an `Rgb(u32)`, a shared string an `Arc`, a list a `Vec`. The bridge structs (51 in `bridge.rs`, 10 in `studio_bridge.rs`) are plain `Clone + PartialEq + Debug` structs with the field names of the Slint structs in `bridge.slint` and `studio-bridge.slint`; `MytsBadge` and `MytsForm`, which have no data source - in this build, stay Slint-only. + in this build, stay Slint-only. The crate warns about undocumented public + items (`#![warn(missing_docs)]`) and has none, the mirror modules' 559 + fields (460 in `bridge.rs`, 99 in `studio_bridge.rs`) included: 210 carry + the comments of the `.slint` files, and the other 349 (288 in `bridge.rs`, + 61 in `studio_bridge.rs`), which had none there, were described from the + code that fills them. No module is exempt from the lint. - **Lists.** `list::diff(old, new)` gives `Changes`: updates, removals and insertions by index, in the order to apply them. `bind/rows.rs` applies them to a `VecModel` and converts only the changed rows; a GPUI view @@ -106,44 +142,124 @@ this file is `voelin_ui_vm::chat`. The boundary: `voelin_ui_vm::state`, generic over the list type `L` of a chat tab's lines: the Slint app plugs in `Rows` (`app::ChatRows`), a front end that re-renders can use a `Vec`. `App.state` is the one `AppState`. +- **Events.** `voelin_ui_vm::events::handle(state, social, host, event)` is + the one dispatch: it lets `social::logic::event` look at the event first + (the friends, pokes, offline messages and the notices, which need the state + as it was before the event), then `events::apply` changes the `AppState`, + and returns an `Update`, which says what the front end has to do: the parts + to draw again (`Refresh`, each once however many events set it), the status + line, the engine commands in order, what to keep (`Persist`: a bookmark, + the UI's settings, the audio settings, the clients' volumes), pictures to + decode again, the password dialog, notices for the bell, the chats that + changed and a stream to watch. `Host` is what the transitions ask while + they run: whether the chat or a private chat is on screen, the store's read + markers, the preview limit, the time. The Slint client's + `App::handle_event` is `handle` and then `perform`, which carries the update + out in `host.rs`; a GPUI client calls `handle` and draws what + `Update::refresh` names. The vm tests replay tapes of events against a fake + `Host` (`events/tests.rs`, `social/logic.rs`). `Update::rest` hands back the + events whose state is not in the `AppState`: the Stream Studio's stream + (`StreamState` and `StreamViewers` while `Host::studio_streams_to`), + `SettingChanged`, the answers to the offline message requests + (`RequestDone`, a list that failed; `messages.rs` keeps those for now), and + the rest that no screen looks at. `perform` handles `rest` before it draws + what `Update::refresh` names, as what the front end keeps may be on screen. + The text of an offline message is not in `rest`: `Event::OfflineMessage` + changes the `Social` state (`mail`, and the inbox row turns read) in + `social::logic::event`, so the redraw shows it (a tape test in + `social/logic.rs`). The streams we share and watch are in the `AppState` + (`share`, `watch`; the capture and the decoder are the front end's, and an + update says when to attach or drop them). The friends, the pokes, the + bell's notices, the text of the open + offline message and what the friends page and the search keep are in + `Social` (`social::logic`), which a front end passes to `handle` besides + the `AppState`. - **Logic and bind.** An area that interleaves decisions with Bridge writes is split into `/logic.rs` in `voelin-ui-vm` (functions over the settings service, the `AppState` and plain rows; they return rows, commands or messages for the status line, and write no Bridge) and `/bind.rs` in `voelin-ui` (the Bridge and model writes, windows, - timers, threads, engine commands). Done: `settings_pages` and `studio`. + timers, threads, engine commands). Done: `settings_pages`, `studio`, `streams`, `chat`, `servers`, `settings_page`, `social` and `dev`. The pure code is tested in `voelin-ui-vm` (`cargo test -p voelin-ui-vm`, no display); the Slint crate's tests are what needs the window types. ### Controllers still to split -Counted as `.set_` calls per file (`grep -c '\.set_'`, the status line's -`set_status` included) before this round's splits; Bridge writes alone are -about four fifths of each. Each one is a slice of the same shape as -`settings_pages` and `studio`: move the decisions into -`voelin-ui-vm/src//logic.rs`, keep the writes in -`voelin-ui/src//bind.rs`. +Plan section 6 step 2 (the toolkit-free `voelin-ui-vm` crate) is done: the +view models, the state, the state transition of every engine event and the +decisions of every area controller that interleaved them with Bridge writes +are in `voelin-ui-vm`, and the Slint crate keeps the writes. What is left +for step 3 (the GPUI front end) is the list at the end of this section. + +Status at the merge of main 6e0df51 (2026-10-24): the branch carries the +session seam of main (c60acf9) and, since, the CI deploy key, the media codec +test and the seam follow-ups. None of them touches `voelin-ui` or +`voelin-ui-vm`, and the `.set_` counts below were counted again on the merged +tree and are as stated. The colour of a chat's avatar (the server's own for a +server's chat, the title's colour for any other and for a server that is +gone, never black) is `servers::logic::conversation_tint`, which `messages.rs` +calls and a test pins. + +The measure is the number of `.set_` calls in the file (`grep -c '\.set_'`): +every setter counts, those of the Bridge, `Nav`, the window, models and the +engine, and the status line's `self.set_status(…)`, which writes the Bridge's +status text too. In the seven largest files before this round's splits +(230 calls: `streams.rs`, `chat.rs`, `app.rs`, `servers.rs`, `settings_page.rs`, +`social.rs` and `dev.rs`) 150 are direct writes to the Bridge (140 written as +`bridge.set_…`, ten as `ui.global::().set_…` or a chained setter; +one of the ten is `set_status_text`, the write inside `set_status`, so it is +not one of the 36) and 36 go through the status line, so Bridge writes are 186 +of the 230, about four fifths of those files, and direct ones about two +thirds; the rest are `Nav`, window and engine setters (in `dev.rs` mostly +those). Each controller was a slice of the same shape as `settings_pages` and +`studio`: the decisions moved into +`voelin-ui-vm/src//logic.rs`, the writes stayed in +`voelin-ui/src//bind.rs`. The `.set_` calls of each file before and +after, every number counted with that command: + +| Area | Before | After | +|---|---|---| +| Stream Studio | `studio.rs` 64 (62 once the view models had moved) | `studio/bind.rs` 58 | +| Settings pages | `settings_pages.rs` 52 | `settings_pages/bind.rs` 51 | +| Streams | `streams.rs` 45 | `streams/bind.rs` 38 | +| Chat | `chat.rs` 38 | `chat/bind.rs` 31 | +| Servers | `servers.rs` 37 | `servers/bind.rs` 31 | +| Audio settings page | `settings_page.rs` 26 | `settings_page/bind.rs` 26 | +| Friends, the bell, search | `social.rs` 23 | `social/bind.rs` 5 and `social/mod.rs` 15 (the models handed to the Bridge once) | +| Development switches | `dev.rs` 23 | `dev/bind.rs` 21 | +| Event dispatch and setup | `app.rs` 38 | `app.rs` 31 and `host.rs` 8 (carrying out an `Update`) | + +The Bridge and model writes stay where the toolkit is, and what each write +says now comes from `logic.rs`, which has tests of its own. + +Why the studio went before `streams.rs`: it had the most calls, and it is +self-contained. It has its own state (`StudioState`), windows and bridge +(`studio-bridge.slint`), so its decisions moved without touching the event +dispatch of `app.rs`. `streams.rs`, `chat.rs` and the rest of the list were +driven by that dispatch (the watch, share and history events), so they +followed it: the state transition of every engine event came first +(`events::apply`), then the controllers that show the result, `streams` first +as the one whose events were still the front end's. + +Still to split before or while the GPUI front end is written (the files as they +stand): | File | `.set_` calls | What it mixes | |---|---|---| -| `streams.rs` | 45 | the streams panel, viewer and share dialog: what the voice card, the viewer header and the share form say, with the watch and share bookkeeping | -| `chat.rs` | 38 | the chat view: lines, the unread divider, pins, topics and downloads, with the engine's history batches | -| `app.rs` | 38 | event dispatch and the status line, the toolbar and tree refreshes | -| `servers.rs` | 37 | the rail, the server dialog and the channel tree's refresh | -| `settings_page.rs` | 26 | the audio settings page and the devices | -| `social.rs` | 23 | home's contacts, the bell and the search | -| `dev.rs` | 23 | development switches and the sample data (the switches stay with the window; the sample rows can move) | +| `app.rs` | 31 (4 in tests) | setup and the model hand-off, the status line, `setting_changed` (which setting touches what); the event dispatch itself is `vm::events::handle` and `events::apply`; the toolbar and tree refreshes are `servers/bind.rs` (`refresh_toolbar`, `refresh_tree`), which `app.rs` only calls | | `images.rs` | 13 | the decoded-picture cache | -| `messages.rs` | 12 | direct messages | +| `messages.rs` | 11 | direct messages | | `appearance.rs` | 11 | theme, font scale and breakpoints | | `popout.rs` | 8 | the viewer's own window | | `members.rs`, `links.rs`, `inbox.rs`, `home.rs`, `events.rs` | 6, 5, 5, 5, 4 | small; split with their neighbours | -Before this round: `studio.rs` had 62 and `settings_pages.rs` 52 (the two -with the most). Their `bind.rs` files still show 58 and 51 `.set_` calls: the -Bridge and model writes stay where the toolkit is, and what each write says -now comes from `logic.rs`, which has tests of its own. +The gate that accepted `voelin-ui-vm` asked for the `app.rs`/`events.rs` split +before the GPUI client. The dispatch is what moved (the `app.rs` part: +`handle` and `apply` in the crate, `host.rs` here); `events.rs` of +`voelin-ui` is no dispatch but the controller of the gateway's events page +(the event form, RSVP, the channels an event can be in), and it is not split. +Neither is the rest of `app.rs` named above: they are the next slices. ## Theme tokens @@ -423,14 +539,16 @@ with the sample studio's sources, live at once with sample viewers. ## Adding a server The add-server dialog (`BookmarkDialog` in `screens/dialogs.slint`, logic in -`servers.rs`) asks for the address (host, host:port, IP or server +`servers/`: the decisions in `voelin-ui-vm`'s `servers::logic`, the Slint side +in `servers/bind.rs`) asks for the address (host, host:port, IP or server nickname; the resolver finds the port through SRV records and TSDNS) and an optional server password. *Advanced* (open when editing) has the name and the nickname, and empty fields there are filled in: the name is the address until the first connection, then the server's own name -(`adopt_server_name`); the nickname is the default identity's (one imported -from TeamSpeak keeps its nickname there), else the system user's, else -"Voelin user"; the identity is the default one, there is no default channel. +(`adopt_server_name` in `voelin-ui-vm`'s `events`); the nickname is the +default identity's (one imported from TeamSpeak keeps its nickname there), +else the system user's, else "Voelin user"; the identity is the default one, +there is no default channel. There are no gateway or ServerQuery fields: the gateway is looked up from the address (DNS SRV records, else the gateway's `/.well-known/tsgw`) when the server is saved, selected or connected @@ -515,7 +633,7 @@ for importing the official clients' identities on start the Slint side as `impl App` in `voelin-ui/src/.rs`, with the decisions in the view-model crate (`/logic.rs`, [Two crates](#two-crates)). -5. A development switch to open it (`dev.rs`, `VOELIN_OPEN=`), a +5. A development switch to open it (`dev/bind.rs`, `VOELIN_OPEN=`), a screenshot (below) and a line in this file. ## Settings @@ -601,7 +719,7 @@ notifications and the home's news show the text on one line ## Development switches and screenshots -Environment variables (see `src/dev.rs`): +Environment variables (see `src/dev/mod.rs`): - `VOELIN_DEMO_UI=1`: sample servers, channels, members, chat with formatting and emoji (and two pages of older messages, which load when @@ -873,4 +991,4 @@ renderer; the phone layouts are desktop renders, not Android device tests. --- -*Mirrored from [`docs/ui.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/3930ef2945bf12771c5ff85364e4883db3ebba14/docs/ui.md) at `3930ef2` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.* +*Mirrored from [`docs/ui.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/2e985d793cb48a0bcbec7fa308d1ed28e9b4c566/docs/ui.md) at `2e985d7` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*