wiki: mirror docs/ of main at ba224e1

faumaray committed 2026-10-27 15:22:41 +03:00
1 parent 77069b57e0
commit 0f845731f6
26 files changed
+469 -50

No files matched your search

+2
@@ -80,3 +80,5 @@ studio.md
testing%2Fload.md
testing%2Fmanual-matrix.md
ui.md
ui/gpui-swatch-dark.png
ui/gpui-swatch-light.png
+8 -1
@@ -48,6 +48,11 @@ Done so far (milestones M0–M4 and the first part of M5 of [the plan](architect
- `crates/voelin-ui-vm`: the view models and the app's state behind the UI, with no UI toolkit: engine state
as plain rows and forms, chat formatting, the Twemoji archive, and what the settings pages and the
Stream Studio decide; `voelin-ui` puts them on Slint windows ([docs/ui.md](ui))
- `crates/voelin-gpui` (`voelin-gpui`): the GPUI front end, under construction, on the same engine and
view models as the Slint one, which stays the app until it reaches parity: a window with the engine's
state in one line, the Voelin theme (every token of the Slint one's `theme.slint`, light and dark, in
Inter with the same Lucide icons; `VOELIN_OPEN=swatch` shows them) and a cost meter (`VOELIN_METER=1`)
([docs/ui.md](ui), "The GPUI front end")
- `crates/voelin-stream`: TeamSpeak 6 streams: stream commands and notifications, JSON signalling,
WebRTC peers (str0m) with host and STUN candidates. A live test streams VP8 + Opus between two
clients through a TS6 server
@@ -79,6 +84,8 @@ The UI (design system, desktop and phone layouts, emoji, how to add a screen) is
```sh
# Desktop app
cargo run -p voelin-ui --bin voelin
# The GPUI front end, under construction (Vulkan or OpenGL at run time)
cargo run -p voelin-gpui --release
# Local servers (use REGISTRY=mirror.gcr.io if Docker Hub rate-limits you)
docker compose -f dev/docker-compose.yml up -d
@@ -147,7 +154,7 @@ Security issues: see [SECURITY.md](https://git.faumaray.com/Voelin/VoelinClient/
## Documentation pages
Mirror of `docs/` on `main` (`296664f`). The repository files are the source; this wiki is regenerated by `.claude/wiki-sync.js`.
Mirror of `docs/` on `main` (`ba224e1`). The repository files are the source; this wiki is regenerated by `.claude/wiki-sync.js`.
- [android.md](android): Android app
- [architecture.md](architecture): Architecture
+1 -1
@@ -237,4 +237,4 @@ the source then says why).
---
*Mirrored from [`docs/android.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/android.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/android.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -753,4 +753,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/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/architecture.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/architecture.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -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/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/audio.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/audio.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+17 -2
@@ -119,10 +119,25 @@ the proxy is on localhost. If the proxy inspects TLS, set
## Locally without Docker
- **Rust:** 1.95, the channel `rust-toolchain.toml` pins; `rustup` installs it
on the first `cargo` run in the checkout. The workspace's `rust-version` is
1.95 too, the oldest Rust the GPUI front end's libraries build with (they
call `std::hint::cold_path`, stable since 1.95.0), so a distribution's older
`rustc` does not build the workspace.
- **Linux:** the packages from the table above need
`sudo apt install libasound2-dev libfontconfig1-dev libxkbcommon-dev libvpx-dev libdav1d-dev libpipewire-0.3-dev libspa-0.2-dev libclang-dev cmake dpkg-dev patchelf`,
`sudo apt install libasound2-dev libfontconfig1-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb1-dev libvpx-dev libdav1d-dev libpipewire-0.3-dev libspa-0.2-dev libclang-dev cmake dpkg-dev patchelf`,
then `cargo build --release --locked -p voelin-ui -p voelin-gateway`
and `scripts/package.sh linux`.
- **The GPUI front end** (`cargo build -p voelin-gpui --release`, under construction,
in no package yet) builds with the same development packages, which include
`libxkbcommon-x11-dev` and `libxcb1-dev` (it links `libxkbcommon-x11` and
`libxcb`, as `readelf -d` on the binary shows; the list above did not have
their development packages before). At run time it needs those libraries installed, opens `libwayland-client`,
the Vulkan loader (`libvulkan.so.1`) and `libEGL.so.1` by name, and draws
through wgpu: a Vulkan driver (Mesa's RADV, ANV or NVK, NVIDIA's) or OpenGL,
and in a virtual machine or a remote desktop Mesa's lavapipe
(`mesa-vulkan-drivers`) in software. X11 needs a window manager for
fullscreen and close requests.
- **Windows:** [packaging/windows/README.md](https://git.faumaray.com/Voelin/VoelinClient/src/branch/main/packaging/windows/README.md)
(MSVC, vcpkg libvpx and dav1d, NSIS), then
`bash scripts/fetch-ffmpeg-windows.sh ffmpeg && FFMPEG_DLL_DIR=ffmpeg bash scripts/package.sh windows`
@@ -208,4 +223,4 @@ voelin-model = { path = "../VoelinProtocol/crates/voelin-model" }
---
*Mirrored from [`docs/building.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/building.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/building.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+7 -6
@@ -89,9 +89,9 @@ the separate `release.yml` workflow below.
The workflow shares the repository's local system-dependencies action with
GitHub CI and bootstraps rustup if absent, then installs the toolchain and
components pinned in `rust-toolchain.toml`. Checkout uses a fully qualified
GitHub action URL rather than depending on the instance's action-source
configuration.
components pinned in `rust-toolchain.toml` (1.95: a channel change there is all
the runner needs). Checkout uses a fully qualified GitHub action URL rather
than depending on the instance's action-source configuration.
No GitHub cache/artifact service or reusable-workflow support is required.
The job does not need a Docker socket mounted inside its container; the
@@ -131,8 +131,9 @@ docker run --rm --init -v "$PWD":/src -w /src -e HOME=/root \
ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git
apt-get update && apt-get install -y --no-install-recommends \
build-essential ca-certificates cmake curl git jq pkg-config python3 \
libasound2-dev libfontconfig1-dev libxkbcommon-dev libvpx-dev \
libdav1d-dev libpipewire-0.3-dev libspa-0.2-dev libclang-dev xvfb xauth
libasound2-dev libfontconfig1-dev libxkbcommon-dev libxkbcommon-x11-dev \
libxcb1-dev libvpx-dev libdav1d-dev libpipewire-0.3-dev libspa-0.2-dev \
libclang-dev xvfb xauth
curl --proto =https --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y --profile minimal --default-toolchain none
. "$CARGO_HOME/env" && rustup toolchain install
@@ -351,4 +352,4 @@ runner; local shell/API fixtures do not establish deployment acceptance.
---
*Mirrored from [`docs/ci.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/ci.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/ci.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+131 -18
@@ -14,8 +14,25 @@ listed in "History"), and every figure and check below was run again on
the commits after it: nightly clippy is clean (`as_chunks` in `bgra.rs`, and
a second lint that the first hid), the video headline says "raw" with the
quiet-window pipeline figure beside it, and the `--no-drop` row's XDamage
exception is explained (a counter window longer than the case). `gpui-kit`
0.8.1 of 2026-10-26 is still unmeasured, as "The version to pin" says.
exception is explained (a counter window longer than the case). Step 3
(2026-10-27) rebuilt the three spikes on `gpui-kit` 0.8.1 of 2026-10-26 and
ran each README's measurement command once: they build, every check passes
and the per-frame cost is 0.8.0's, so the pin is 0.8.1 ("The version to
pin"); the figures on this page are still 0.8.0's, but for the two video
cases the foundation's review ran again on a quiet machine. The same day the
foundation of step 3 landed on `phase5/gpui-foundation` (items 1 to 4 and 6
of "What step 3's first slice must contain": Rust 1.95, ashpd on `async-io`,
the `voelin-gpui` crate with its root entity, the theme with Inter and Lucide,
the cost meter; item 5, the shell, is next): what exists, how to run it and
the slices that follow are in [docs/ui.md](ui), "The GPUI front end".
The foundation was reviewed and gated the same day (a Sonnet review, then the
Opus gate: no blocker and no major, six minors), and the minors are closed in
the commits after it: the meter's `/proc` test waits for a CPU tick instead of
burning 60 ms, zbus runs on `async-io` alone in every binary (with a test for
the order of ashpd's callers), the lock figures and the Lucide 1.43 credit are
corrected, the slice list points at "Open choices for step 3", and the parity
test sees a second brush or string. The risks the review and the gate left to
the slices that meet them are in docs/ui.md, "For the next slices".
| Spike | The plan's no-go | Seen (software rendering, see Setup) | Verdict |
|---|---|---|---|
@@ -25,7 +42,8 @@ exception is explained (a counter window longer than the case). `gpui-kit`
Before step 3 can start: Rust 1.95 for the client (no `gpui-kit` builds on
1.94) and the client's ashpd on `async-io` (GPUI's and the client's ashpd
features cannot be built together); both are under "Settled for step 3".
features cannot be built together); both are under "Settled for step 3", and
both are done (the first two commits of `phase5/gpui-foundation`).
## Setup
@@ -36,7 +54,7 @@ Every figure on this page comes from one machine and one software stack:
| Machine | AMD Ryzen 9 7950X3D (16 cores, 32 threads), 61 GiB, NixOS; no GPU was used |
| Display | Xvfb `:91`, 3840x2160x24, openbox, a private D-Bus bus (`spikes/gpui/headless.sh`); the Wayland runs on sway's headless backend with its pixman renderer (`headless-wayland.sh`) |
| Device | Mesa 26.2.5 lavapipe (`llvmpipe (LLVM 21.1.8, 256 bits)`) through wgpu's Vulkan backend, the only Vulkan driver (`VK_DRIVER_FILES` = its `lvp_icd.x86_64.json`); GPUI's log: "Selected GPU adapter: llvmpipe … (Vulkan)" |
| GPUI | `gpui-kit` 0.8.0 (`gpui-pre` 0.3.9, `gpui-component` 0.8.0, `gpui-kit-assets` 0.8.0) |
| GPUI | `gpui-kit` 0.8.0 (`gpui-pre` 0.3.9, `gpui-component` 0.8.0, `gpui-kit-assets` 0.8.0) for every figure on this page; the rebuild on 0.8.1 is under "The version to pin" |
| Rust | 1.95.0 (fenix, `spikes/gpui/shell.sh`); nixpkgs 02c087f3fe67 for the libraries and tools |
| Load | another task's load generator kept the machine busy for part of the day; every run records the load average before and after it (`<case>.load`), and the tables give it |
@@ -362,16 +380,67 @@ portal's, see "Dependencies").
### The version to pin
**`gpui-kit` 0.8.0, exactly**, the version measured here (gpui-pre 0.3.9).
0.8.1 (gpui-pre 0.3.10) came out on 2026-10-26, after these spikes were
built; step 3's first commit moves to the newest release only after
building the three spikes on it (`cargo update -p gpui-kit --precise` in
`spikes/gpui`, then the READMEs' runs). A pre-1.0 release may change any
API (the pin is exact for that reason, and `gpui-kit` pins its `gpui-pre`
exactly too); upgrades are commits of their own.
**`gpui-kit` 0.8.1, exactly** (`gpui-pre` 0.3.10, `gpui-component` 0.8.1,
`gpui-kit-assets` 0.8.1; wgpu 30 where 0.8.0 had 29), in the root workspace's
`[workspace.dependencies]` and in `spikes/gpui`. The figures on this page were
measured on 0.8.0 (`gpui-pre` 0.3.9), the version the spikes were built on;
0.8.1 came out on 2026-10-26, a day after, and step 3's first commits rebuilt
the three spikes on it before moving the client to it. A pre-1.0 release may
change any API (the pin is exact for that reason, and `gpui-kit` pins its
`gpui-pre` exactly too); upgrades are commits of their own.
**Rust 1.95 or newer.** No `gpui-kit` release builds on the client's Rust
1.94: every `gpui-pre` 0.3.x (0.3.0 to 0.3.10, which every `gpui-kit` from
**What the rebuild on 0.8.1 found** (2026-10-27, Xvfb `:96` with openbox and
a private D-Bus bus from `headless.sh`, Mesa 26.2.5 lavapipe through wgpu's
Vulkan backend: "Selected GPU adapter: llvmpipe (LLVM 21.1.8, 256 bits)
(Vulkan)"; Rust 1.95.0; one run of each README's measurement command):
- `cargo update -p gpui-kit --precise 0.8.1` (after `=0.8.1` in
`spikes/gpui/Cargo.toml`) moves 40 packages of the lock (1,069 entries
before, 1,065 after): `gpui-kit`, `gpui-base`, `gpui-component` and
`gpui-kit-assets` 0.8.0 to 0.8.1, the 19 `gpui-pre*` crates 0.3.9 to 0.3.10,
wgpu (and its `-core`, `-hal`, `-types` and `-naga-bridge`) 29.0.4 to 30.0.1,
naga 29 to 30, taffy 0.13 to 0.15, `bit-set` 0.9 to 0.10; `gpu-descriptor`,
`gpu-descriptor-types` and `hexf-parse` go, `gpui-pre-ios`, `naga-types` and
`objc2-ui-kit` come. **No source change**: the three spikes build as they
were (release, 8 min 54 s on 32 threads at a load average of 70).
- **Every check passes**: the composer's `drive.sh` 8 PASS (and the emoji
probe), `ime.sh` 3 PASS (X11 preedit with fcitx5 and Pinyin), the windows'
`drive.sh` 11 PASS (the second window, focus, fullscreen, the global hotkey
with the studio window active, both closes). The composer's screenshot of
the sample chat differs from the committed one in 579 of its 900,000 pixels
(ImageMagick `compare`; by eye, the input's caret).
- **The video cases cost what they cost on 0.8.0 per frame.** The machine was
busier than for the 0.8.0 runs (load average 64 to 80 against 28 to 53;
another task's builds), so the frame rates are lower and are not the
comparison: the CPU a shown frame costs is (the process's CPU in percent of
a core divided by the frames shown a second, which is 0.1 core-seconds a frame).
| Case (70 s, 10 not counted) | Shown fps | CPU, process | CPU % per fps shown | Load | 0.8.0's |
|---|---|---|---|---|---|
| static 2560x1440 (repaints) | 22.7 | 259 % (llvmpipe 250) | 11.4 | 71 / 76 | 11.7 (727 % at 62 fps) |
| raw 2560x1440, 60 fps source | 13.4 | 174 % (llvmpipe 149, main 13.7, converter 8.0) | 13.0 | 76 / 64 | 12.5 to 13.1 (525 % at 41.9; 642 % at 49.0) |
The raw case's memory stays flat (493.8 MiB at the start of the steady part,
473.3 at its end), so `cx.drop_image` keeps the atlas flat on 0.8.1 too; the
negative control without it (`nodrop-1440p`, 12 s: 2.7 pictures shown a
second at this load) grew by 408 MiB in its 10 s steady part, a 14 MiB
picture for each one shown, where 0.8.0 grew by 1.9 GiB at 13.9 shown a
second. The windows case with both windows open (`windows-both`, 45 s; the
other two cases were not run) took 123 % of a core, showed the preview 14.4
times of 15 a second, and its memory stayed flat. What the machine's load
hid is the absolute frame rate: the busy machine's table above does not
reproduce the 0.8.0 figures (62 fps static, 42 to 49 raw), only the cost per
frame. The review of the foundation ran the two cases again on a quiet
machine (load average 8 to 12, llvmpipe): **static 2560x1440 showed 61 fps
and raw 2560x1440 59.1 fps**, so the 1440p60 figures hold on 0.8.1 in
software (the raw case above 0.8.0's range); the first GPU run, in the
viewer slice, still measures the rates on a real device.
- Nothing in the spikes needed a patch for 0.8.1. The one-line emoji patch
(below) is still where it was: `load_family` is unchanged in gpui-pre-wgpu
0.3.10.
**Rust 1.95 or newer.** No `gpui-kit` release builds on the Rust 1.94 the
client used before 5ce5c0d: every `gpui-pre` 0.3.x (0.3.0 to 0.3.10, which every `gpui-kit` from
0.6.0 to 0.8.1 pins) calls `std::hint::cold_path`, stable since 1.95.0:
```text
@@ -407,9 +476,40 @@ the raw source's `for n in 0u64..` in `spikes/gpui/video/src/main.rs`, now
(X11 capture and hotkeys only). **Step 3 must move the client's ashpd use
to `async-io`** before `voelin-ui` can depend on gpui-kit with PipeWire
capture and the portal hotkey; zbus with `async-io` runs its own I/O
thread, so it does not need GPUI's executor.
- **Size and compile time.** The spikes' lock has 1,069 packages; the
release binaries are 390 to 480 MB with line tables. A full debug build
thread, so it does not need GPUI's executor. *Done:* voelin-media's
`pipewire` and voelin-platform's `portal` features ask ashpd for `async-io`,
and `voelin-gpui` holds both (it depends on `voelin-core` with
`media-desktop`, which brings PipeWire, and on `voelin-platform` with its
portal feature). What zbus 5.19 does with the features (read in its
source): with `async-io` and `tokio` both compiled in it picks an executor
once per connection, tokio when a tokio runtime is current on the thread that
builds it and `async-io` with an I/O thread of its own otherwise. ashpd keeps
one session connection for the whole process (a static in its `proxy.rs`), so
the first ashpd caller decides the executor of every later portal call: when
a tokio caller builds it first, a later `Proxy::new` from a thread 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 move of e325b65 left both compiled in
(voelin-platform's notify-rust asked zbus for `tokio`, `z-with-tokio`), and
the merged binary was safe only because GPUI's colour-scheme call builds the
connection before the engine's portal calls do. *Fixed* (the Opus gate's
option a): notify-rust asks for `z` (`async-io`), so zbus is compiled with
`async-io` alone in every binary, the Slint app's included, and every
connection has an I/O thread of its own whoever builds it first
(`cargo tree -e features -i zbus` names `tokio` nowhere; voelin-platform's
own test dependency on zbus is `async-io` as well, since a test binary with
both features shows the panic again). Two tests in voelin-platform
(`tests/proxy.rs`, each on a private D-Bus bus) call ashpd from a thread
with no tokio runtime and get the answer, the second after a tokio caller
built the connection; that one fails with the panic above on the tree
before the change.
- **Size and compile time.** In the root workspace, which already carries
Slint's and the codecs' dependencies, the foundation adds 292 entries to
`Cargo.lock` (218 new names; 279 from gpui-kit, 13 from its `test-support`
dev-dependency, which ships in no binary; gpui-kit's are about 195 packages
on Linux), and cargo deny needed two licences it had not allowed, 0BSD and
CC0-1.0. The spikes' lock has 1,069 packages; the release binaries are 390
to 480 MB with line tables. A full debug build
of the workspace with a toolchain it had not built with before (nightly)
took 3 min 14 s on the 32 threads at a load average around 90.
@@ -527,6 +627,19 @@ and size tokens.
Not in it: video (slice 6) needs the decision of spike 1's "What a real GPU
changes"; emoji need the patch above before the chat slice (4).
Items 1, 2, 3, 4 and 6 are done on `phase5/gpui-foundation` (2026-10-27), a
commit each (item 1 as two, item 2 as two: the spikes rebuilt on 0.8.1, then
the crate; item 4 with one small follow-up): Rust 1.95.0 and the seven lints
it adds; ashpd on `async-io`; `crates/voelin-gpui`
on `gpui-kit = "=0.8.1"`; the root `Entity<AppState>` with the engine's events,
the one-second tick and `Later`; `VoelinTheme`, Inter and the client's Lucide
set; the meter as `VOELIN_METER=1`. The crate is named `voelin-gpui` (binary
`voelin-gpui`), the choices below stayed as the report leaves them except
those named in docs/ui.md ("The GPUI front end"): the theme's second layer is
written as a `ThemeColor` mapping (a table there), and the client's Lucide set
is served under gpui-component's `icons/` paths. Item 5, the shell, is the
next task.
### The risks of plan section 6, against what was seen
| Risk (plan) | Seen |
@@ -539,7 +652,7 @@ changes"; emoji need the patch above before the chat slice (4).
| New: ashpd features | GPUI and the client's portals cannot share a binary until the client uses `async-io`. |
| New: short clicks on links | `InteractiveText` loses a click shorter than a frame. |
| New: video upload cost | Every new picture is a new atlas texture plus two copies (spike 1); a persistent texture needs a GPUI change. |
| New: Rust 1.95 | gpui-kit needs it; the client is on 1.94. |
| New: Rust 1.95 | gpui-kit needs it; the client moved to 1.95.0 in 5ce5c0d (seven lints fixed). |
### Open choices for step 3
@@ -595,4 +708,4 @@ it now does not.
---
*Mirrored from [`docs/design/gpui-spikes.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/design/gpui-spikes.md) at `296664f` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
*Mirrored from [`docs/design/gpui-spikes.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/design/gpui-spikes.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -456,4 +456,4 @@ with what they store locally.
---
*Mirrored from [`docs/gateway-admin.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/gateway-admin.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/gateway-admin.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -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/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/gateway-protocol.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/gateway-protocol.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -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/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/i18n.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/i18n.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -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/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/identity.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/identity.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+7 -4
@@ -869,9 +869,12 @@ Notes:
covered by other windows may be stale. MIT-SHM needs a local server with
MIT-SHM 1.2; otherwise GetImage is used. The only `unsafe` here is mapping
our memfd (`capture/x11/shm.rs`).
- Portal: `start` needs a tokio runtime (zbus runs on it) and may show the
desktop's picker. Choices persist with `PersistMode::ExplicitlyRevoked`: store
`PortalCapture::restore_token()` (e.g. in `voelin-store` settings) and pass it to
- Portal: `start` runs on any executor (ashpd uses zbus's `async-io`, with an
I/O thread of its own, in every binary of the workspace) and may show the
desktop's picker; `stop` closes the portal session only inside a tokio
runtime (elsewhere the session closes with the connection). Choices persist
with `PersistMode::ExplicitlyRevoked`: store `PortalCapture::restore_token()`
(e.g. in `voelin-store` settings) and pass it to
`PortalCapture::with_restore_token` next time. The cursor is embedded when
the portal supports it. Buffers: DMA-BUFs are offered first (a
mandatory modifier property we fixate: the sink's tiled modifiers, best
@@ -1457,4 +1460,4 @@ has not run on Windows yet.
---
*Mirrored from [`docs/media.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/media.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/media.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -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/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/protocol-notes/ts6-streaming.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/protocol-notes/ts6-streaming.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -238,4 +238,4 @@ After:
---
*Mirrored from [`docs/release.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/release.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/release.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -423,4 +423,4 @@ Voelin does needs them.
---
*Mirrored from [`docs/research/myteamspeak.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/research/myteamspeak.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/research/myteamspeak.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -82,4 +82,4 @@ repository.
---
*Mirrored from [`docs/research/stream-fps.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/research/stream-fps.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/research/stream-fps.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -239,4 +239,4 @@ between Voelin clients.
---
*Mirrored from [`docs/research/ts6-late-join.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/research/ts6-late-join.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/research/ts6-late-join.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -349,4 +349,4 @@ Discord:
---
*Mirrored from [`docs/research/ui-review.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/research/ui-review.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/research/ui-review.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -1963,4 +1963,4 @@ targets included.
---
*Mirrored from [`docs/session-seam.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/session-seam.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/session-seam.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -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/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/studio.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/studio.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -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/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/testing/load.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/testing/load.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+1 -1
@@ -224,4 +224,4 @@ noted.
---
*Mirrored from [`docs/testing/manual-matrix.md`](https://git.faumaray.com/Voelin/VoelinClient/src/commit/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/testing/manual-matrix.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/testing/manual-matrix.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
+280 -2
@@ -6,7 +6,9 @@ renderer, the Inter font, Lucide icons and Twemoji; the look follows the
design mockups (deep navy panels, a blue accent, a server rail, a top bar, a
sidebar with the user card, an optional right panel). What its screens show
is made by `crates/voelin-ui-vm`, which knows no UI toolkit ([Two
crates](#two-crates)).
crates](#two-crates)). `crates/voelin-gpui` is the second front end, on GPUI,
under construction and built on the same view models and the same engine; the
Slint one stays the app until it reaches parity.
![Server page](raw/screenshots/desktop-server.png)
@@ -46,6 +48,10 @@ crates/voelin-ui-vm/ view models and state, no UI toolkit
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-gpui/ the GPUI front end, under construction (binary voelin-gpui; gpui-kit
pinned exactly); it uses voelin-ui-vm and the engine, not voelin-ui:
the root state, the theme, Inter and Lucide, the swatch page, the
cost meter ([The GPUI front end](#the-gpui-front-end))
crates/voelin-ui/ the Slint front end
ui/
app.slint MainWindow: picks the shell, puts the page's screens in it, dialogs
@@ -943,6 +949,278 @@ renderer; the phone layouts are desktop renders, not Android device tests.
| ![Light chat and channel banners](raw/screenshots/banners-desktop-light.png) | ![Light server list](raw/screenshots/banners-mobile-servers.png) |
| ![Banner in the desktop voice header](raw/screenshots/banners-desktop-voice.png) | ![Banner in the mobile voice header](raw/screenshots/banners-mobile-voice.png) |
## The GPUI front end
`crates/voelin-gpui` (binary `voelin-gpui`) is the second front end, on GPUI
(`gpui-kit`, pinned exactly at `=0.8.1`: GPUI, gpui-component and their assets
behind one pre-1.0 dependency). Plan section 6 step 3 builds it slice by
slice next to the Slint front end, which stays the app: both are `[[bin]]`s of
one workspace on the same engine and the same `voelin-ui-vm` state until the
GPUI one reaches parity. It does not depend on `voelin-ui` (that would bring
Slint in), so the few lines of the Slint crate's `HostedEngine` are repeated
in `engine.rs`. The measured case for the migration, and the versions and
conditions it settled, are in [design/gpui-spikes.md](design%2Fgpui-spikes).
### What exists
```
crates/voelin-gpui/
build.rs the client's 147 Lucide icons as a table of include_bytes!
src/
main.rs lib.rs `run()`: logging, the engine's runtime, the window; closing it
tells the engine to close the sessions, ends the app and, when
there were sessions, waits 500 ms for the engine to send the
closes before the runtime goes (as the Slint front end does)
engine.rs HostedEngine: Engine::start on a tokio runtime, its events
forwarded into a channel the window reads
app.rs AppState, the root Entity: the voelin-ui-vm state and Social,
the three loops (events, tick, Later), the one line of state
view.rs MainView: the status line, the shell's page (empty), the swatch
swatch.rs the swatch page (every token, widgets, icons)
theme/ VoelinTheme: tokens.rs, components.rs, slint_parity.rs (test)
fonts.rs Inter, from crates/voelin-ui/ui/assets/fonts
assets.rs icons/<name>.svg: the client's set before gpui-kit-assets'
dev.rs the development switches
meter.rs the cost meter
```
- **The root state.** `AppState` (an `Entity`) holds `voelin_ui_vm::state::AppState<Vec<ChatLine>>`
and `Social`; `events::handle` is its one dispatch, as in the Slint front end,
and the `Update` it returns is carried out as far as this front end has the
parts: the engine's commands go out, the warnings are logged, the rest
(what to redraw, what to keep, the streams' capture and decoder) is for the
slices that have those parts. Three loops start with it and end when the
entity is released: **the engine's events** (a foreground task awaits the
tokio receiver, `this.update(cx, ...)`, `cx.notify()`; a tokio channel needs
no reactor, so GPUI's executor polls it); **the tick**, once a second, a loop
of `background_executor().timer`; and **`Later`**: GPUI's `AsyncApp` is not
`Send`, so a hotkey, camera or decoder thread holds a `Later` and calls
`later.run(|app, cx| ...)`, a queue a third foreground task drains with the
entity, as `later(|app| ...)` does in Slint. The window shows one line:
the version, the voice connections up, the engine events handled, the seconds
up; each part moves by one of the loops. The window's start shows no store:
the shell slice opens it with the settings and the bookmarks.
- **Tests**: the unit tests need no display (GPUI's test platform, `#[gpui::test]`, with
`gpui-pre`'s `test-support` as a dev-dependency beside gpui-kit's own pin: its
`test-support` feature would make Cargo lock the unused `gpui-fast` backend and
pin taffy 0.15.0): an injected engine event, a real engine's event, the tick
and a job from another thread reach the entity; the theme reaches
gpui-component, follows the window's appearance and the text size; the
Slint file's tokens equal the Rust ones (below); the icons and fonts load.
`tests/launch_failure.rs` starts the built binary where its window cannot
open (below): one of its two cases needs the test display of
`VOELIN_X11_TEST_DISPLAY` and is skipped without it, as the X11 tests of
the other crates are. `cargo test -p voelin-gpui`.
### Running it
```sh
cargo run -p voelin-gpui --release # the window and its one line of state
VOELIN_OPEN=swatch VOELIN_DEV_THEME=light cargo run -p voelin-gpui --release
```
GPUI draws through wgpu: it needs a Vulkan driver (Mesa's RADV, ANV or NVK,
NVIDIA's) or OpenGL at run time; in a virtual machine, a remote desktop or
CI, Mesa's lavapipe (`mesa-vulkan-drivers`) draws in software. The binary
links `libxcb` and `libxkbcommon-x11` (the build needs `libxkbcommon-x11-dev`
and `libxcb1-dev`, which the package lists before it did not name) and opens
`libwayland-client`, `libvulkan.so.1` and `libEGL.so.1` by name. Which device a
run took is in the log ("Selected GPU adapter: ..."; the default filter shows
GPUI's adapter lines: `VOELIN_LOG` or `RUST_LOG` change it). On Wayland and
on X11 (a window manager is needed there for fullscreen and close requests).
A window that cannot open ends the app with the reason and exit status 1; it
does not stay up without a window. With no usable driver (none installed, or
`VK_DRIVER_FILES` pointing nowhere) the message is
```
Error: cannot open the main window
Caused by:
Failed to create surface: Failed to create surface for any enabled backend: {}
```
and above it the log has the Vulkan loader's own lines (`vkCreateInstance:
Found no drivers!`); install a driver or lavapipe. With no display server
(neither `DISPLAY` nor `WAYLAND_DISPLAY` set, over ssh for one) it is `cannot
open the main window`, caused by `no display: neither DISPLAY nor
WAYLAND_DISPLAY names a display server`; GPUI alone would start its headless
platform there, which opens windows that draw nothing and runs until it is
stopped. `tests/launch_failure.rs` starts the binary both ways (the driver one
needs the test display of `VOELIN_X11_TEST_DISPLAY`; it hides the drivers
through `VK_DRIVER_FILES`, `__EGL_VENDOR_LIBRARY_DIRS` and
`LIBGL_DRIVERS_PATH`, and is skipped where the machine's driver is found
anyway).
| Switch | Does |
|---|---|
| `VOELIN_OPEN=swatch` | the swatch page in place of the shell; the Slint front end's other pages are not here yet and are named in a warning |
| `VOELIN_DEV_THEME=dark\|light\|system` | the theme mode (the settings' `ui.theme` will give it) |
| `VOELIN_FONT_SCALE=1.25` | the text size factor (`ui.font_scale`) |
| `VOELIN_WINDOW_SIZE=1440x960` | the window's size |
| `VOELIN_METER=1` | the cost meter: once a second a log line (`voelin_gpui::meter`) with the process's CPU, the CPU of each group of threads (`llvmpipe` is the software renderer, work a GPU takes over; `voelin-gpui` is GPUI's thread), the resident memory, the app's own counters per second (engine events, ticks, renders, `Later` jobs) and the voice connections up |
Screenshots are made headless, the way `scripts/shots.sh` makes the Slint
ones: `scripts/gpui-shot.sh out.png swatch 1440x960` runs the binary under
`xvfb-run`, takes the window with `xwd`, closes it with Alt+F4 when a window
manager is there (else TERM) and says how the app ended. On NixOS, with the
spikes' environment (a headless X display with openbox, lavapipe as the only
Vulkan driver, the XDG directories and the D-Bus bus private):
```sh
GPUI_SHOT_HEADLESS=1 DELAY=4 VOELIN_DEV_THEME=dark spikes/gpui/shell.sh \
spikes/gpui/headless.sh -- scripts/gpui-shot.sh docs/ui/gpui-swatch-dark.png swatch 1440x960
```
Wayland, the desktop's session bus and its portals are out of the environment,
and the state directories are temporary ones: a run never touches the desktop
or `~/.local/state/voelin`. `docs/ui/gpui-swatch-dark.png` and
`gpui-swatch-light.png` are two such pictures (truecolour: a reduction to 256
colours would change the tokens' values).
![The swatch page, dark](raw/ui/gpui-swatch-dark.png)
![The swatch page, light](raw/ui/gpui-swatch-light.png)
### The theme
Two layers (docs/design/gpui-spikes.md, "The theme against Theme tokens"):
1. **`VoelinTheme`**, a GPUI global with every token of
`crates/voelin-ui/ui/theme.slint` (the source of truth while Slint lives):
the 43 colours for light and dark, the backdrop gradient, the radii, the
spacing, the eight type sizes and four weights, the control, row and shell
sizes (the sidebar's `264 * max(1, scale)`, the top bar's `max(44, control +
8)`), the two durations, at the text size factor. The shell's own elements
(the server rail, presence, meters) read it. `theme/slint_parity.rs` reads
`theme.slint` at test time and compares every declaration of its `Theme`
global with `theme/tokens.rs` by name, with the file's own arithmetic, at
four text sizes; a colour, length, weight or duration on one side only, a
changed value or a kind of declaration it does not know fails the test, and
so does a brush other than `backdrop` or a string other than `mode` and
`font-family` in the Slint file (those three it compares by name against
the one gradient and the one family of `tokens.rs`, which it cannot
enumerate: a second brush or string only on the Rust side is not seen).
2. **gpui-component's `ThemeColor`**, which its widgets read, written from the
first on every change (`theme/components.rs`): the registered theme of the
mode first, then the mapped colours over it, the font (Inter, `font-body`),
the radii and the base size.
| Voelin token | gpui-component (`ThemeColor` field) |
|---|---|
| `bg-app`, `text` | `background`, `foreground`; `caret`; `window_border` is `border` |
| `surface` | `sidebar`, `title_bar`, `status_bar`, `list`, `list_even`, `table`, `table_even`, `tab_bar` |
| `surface-2` | `secondary`, `muted`, `group_box`, `list_head`, `table_head`, `tab_active`, `accordion` |
| `surface-3` | `accent` (gpui-component's "accent" is a hover background, not the brand colour), `popover`, `list_hover`, `table_hover`, `secondary_hover`, `skeleton` |
| `surface-4` | `secondary_active`, `switch` |
| `scrim` | `overlay` |
| `border`, `border-strong` | `border`, `sidebar_border`, `title_bar_border`; `input`, `scrollbar_thumb` |
| `glow` | `ring` |
| `accent`, `accent-hover`, `accent-pressed`, `on-accent` | `primary`, `primary_hover`, `primary_active`, `primary_foreground` (`accent` also `sidebar_primary`, `slider_bar`, `progress_bar`, `drag_border`, `list_active_border`; `on-accent` also `slider_thumb`, `switch_thumb`) |
| `accent-soft` | `list_active`, `table_active`, `selection`, `drop_target` |
| `accent-text` | `link`, `link_hover`, `link_active` (one colour for the three) |
| `danger`, `success`, `warning`, `info` | the same names with `_hover` and `_active` (mixed 14 % toward white in dark, black in light; 18 % toward black) and `_foreground`: white or the window's ink, whichever contrasts more |
| `text-secondary`, `text-muted` | `table_head_foreground`, `tab_foreground`; `muted_foreground`, `scrollbar_thumb_hover` |
| `danger`, `success`, `warning`, `info` with `danger-soft`, `success-soft`, `warning-soft`, `accent-soft` | also the base palette `red`, `green`, `yellow`, `blue` and their `_light` variants; `chart_1` to `chart_5` are `accent`, `success`, `warning`, `danger`, `info` |
| the `button_*` fields | written from `secondary`, `primary`, `danger`, `success`, `warning` and `info` (a theme file leaves them to fall back to these; without it they would keep the default theme's blue) |
| not mapped | `bg-rail`, the backdrop gradient, `scrim-light`, `border-popup`, `live`, `live-soft`, `idle`, `dnd`, `offline`, `gold`, `meter-*`, `text-disabled`, `icon`, `name-text`: read from `VoelinTheme` by the shell. GPUI's gradient has two colour stops and the Slint backdrop three, so `Backdrop::to_gpui` draws the first and the last |
The mode (`Choice`) is `ui.theme`: `system` follows the window's appearance
and its changes (`observe_window_appearance`), `light` and `dark` do not.
Where the platform draws the window's frame (macOS) the mode sets its
appearance; elsewhere that is a no-op. **Inter** (the five files the Slint
front end bundles) goes into GPUI's text system with `add_fonts` and is used by
family name. **Lucide:** `build.rs` embeds the client's 147 icons (Lucide
1.48) and `assets.rs` serves them as gpui-component's `icons/<name>.svg` paths
before gpui-kit-assets' Lucide 1.43 catalogue (1,830 icons), so every widget
draws the icons the client draws and the rest of the catalogue still answers.
### What is next
The slices of plan section 6 step 3, in order, with what each takes from the
Slint `Bridge` (`ui/bridge.slint:801-1206`; properties / callbacks):
1. the **desktop shell**: the server rail, the sidebar, the top bar, the empty
main area, window state (about 13 / 11, `bind/servers.rs`), the store and the
settings opened as in Slint's `run()`;
2. the channel tree and the members (about 13 / 6);
3. the voice page and the call bar (6 / 6);
4. chat, the composer and emoji (about 19 / 18, and the `Emoji` global 3 / 3):
first the two open choices of the report that it touches
(design/gpui-spikes.md, "Open choices for step 3"): emoji (the one-line
`gpui-pre-wgpu` patch for colour emoji, or Noto Color Emoji bundled with a
font setup that leaves out DejaVu's emoji range) and links (an `on_click`
per link, or a fix of `InteractiveText`); and a check of Wayland's preedit;
5. the settings pages (about 62 / 53), page by page;
6. the stream viewer and the share dialog (30 / 13): its first step is a run on
a GPU (design/gpui-spikes.md, "What a real GPU changes"), which decides `img()`
against a persistent texture;
7. home, friends, messages, events, the bell and the search (25 / 32,
`bind/social.rs`);
8. the Stream Studio (19 / 36) and its second window;
9. dialogs and overlays.
Phone layouts are dropped (decision 2). Around the slices: system-font emoji
and the removal of `twemoji.bin`; `tr!()` over the gettext catalogue (1,255
entries); the in-window keys as GPUI key bindings and the global ones through
`voelin-platform`, which now holds the portals and GPUI in one binary (ashpd on
`async-io`); and last the removal of Slint (`build.rs`, `ui/`,
`voelin-android`, `LicenseRef-Slint` of `deny.toml` and `about.toml`).
### For the next slices
What the foundation's review and the Opus gate (2026-10-27) found and left to
the slices that meet it; none of it is a defect of what exists today.
- **The engine-event task drains its channel without yielding** (`app.rs`,
`while let Some(event) = events.recv().await`): a burst of events (a server's
first sync) keeps the receiver ready, so the loop handles them back to back
without returning to GPUI's executor (a tokio receiver is cooperative only
inside a tokio runtime), and the window waits for the whole burst. The shell
slice takes what is queued in one go (`try_recv` after the first event, one
`update`, one `cx.notify()`) or yields between events.
- **The tick notifies the root every second** (`AppState::tick`), which draws
the window once a second whether or not anything changed. Notify only on a
change once the shell shows more than the uptime (the line of state moves
with it today, and it is how the loop is seen to run).
- **The hotkey portal calls `tokio::spawn`** (`voelin-platform`,
`hotkey/portal.rs`, `PortalBackend::new`): it panics where no tokio runtime
is current, and a GPUI foreground task has none. The GPUI front end starts
the hotkey task on the engine's runtime (`runtime.spawn(...)`), as the Slint
front end's `GlobalPtt::start(runtime, ...)` does, not from a foreground task.
- **`PortalCapture::stop` closes the portal session only inside a tokio
runtime** (`voelin-media`, `capture/portal.rs`: `Handle::try_current()`;
elsewhere the session closes only with the connection). Stop a capture inside
the engine's runtime, not on GPUI's thread.
- **gpui-component's `ThemeRegistry` observer overwrites `VoelinTheme`'s
mapping:** any change of the registry (loading JSON themes, `watch_dir`) runs
`Theme::change(mode, None, cx)` on the active theme, which puts the registered
theme's colours over the `ThemeColor` the second layer wrote. A slice that
offers JSON themes or watches a theme directory re-applies `VoelinTheme`
after the registry changed.
- **The parity test and `build.rs` read `crates/voelin-ui/ui`** (`theme.slint`
through `include_str!`, the icons directory), and `fonts.rs` the Inter files
there: they move with step 9, when Slint goes (the icons and fonts to this
crate, `tokens.rs` as the source of truth, the parity test removed).
- **System mode's first frame is Light** until the colour-scheme portal answers
(`cx.window_appearance()` before the window exists; `set_system_appearance`
follows the answer): a dark desktop sees a light frame at start. The shell
slice, which reads the settings, can start from the last resolved mode.
- **The gate's deviations from the mapping table** of the report ("The theme
against Theme tokens"): `bg-rail` is not mapped (the report has it with
`surface` on `sidebar.background`; the sidebar takes `surface` and the shell
reads `bg-rail` from `VoelinTheme`), one scrim stands for three (`scrim`,
`scrim-light` and `overlay` are three values in `theme.slint`; gpui-component's
`overlay` gets `scrim`), and gpui-base's non-colour tokens (radii, spacing,
type, shadows, motion) are not written: gpui-base 0.8.1 has no storage to
write them to, so those live in `VoelinTheme::metrics` only.
- **The close grace is not seen end to end** until a slice opens sessions:
`run()` waits `CLOSE_GRACE` (500 ms) for the engine to send the closes only
when the window's close found sessions to close, and the binary opens none
yet (the unit test counts the closes `shutdown` sends, and the engine ignores
a close for a session it never opened). The first slice that opens a session
checks against a server that no ghost client stays behind after the window is
closed.
## Limits
- No drop shadows or blur (the software renderer draws none): glows are
@@ -991,4 +1269,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/296664ffa966668e6c012de5287a1ce1a1820b2a/docs/ui.md) at `296664f` 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/ba224e1dff3a30ebd683dec94986274b84f2ef02/docs/ui.md) at `ba224e1` by `.claude/wiki-sync.js`. Edit the file in the repository, not this page: the next sync overwrites it.*
BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB