The GPUI shell repeated the Slint crate's connect, observe, gateway lookup, save and remove of a server, its default nickname, its FallbackSecrets and its settings opening and key registration. They now live once and both front ends call them: - voelin_ui_vm::servers::sequence: connect_voice(_to), observe, discover_gateway, gateway_found, select_server, save_bookmark, save_and_connect, delete_bookmark, bookmark_form and default_nickname, as transitions over the state, the Cx and a Backing (the store, the secrets, the identity a connection uses). The commands, the status line and what to keep go out through the Update as for every other transition; a new field, Update::discover, asks the front end to look a gateway up (the thread hop stays with each front end: Later in GPUI, later() in Slint). stream_peer is the one input a front end gives (Slint's codecs; GPUI passes none). - voelin_ui_vm::settings::open_settings and register_keys; a front end adds its own key (ui.window, studio.ui) through a function it passes, so Slint's settings page still lists what it listed. - voelin_store::FallbackSecrets (feature keyring) and Store::identity_for. - voelin-ui: the methods of servers/bind.rs, open_settings and default_secrets call them, so their call sites are unchanged; host.rs gets transition_with and the discover arm of perform. voelin-gpui: AppState's methods and the Backend call them. What cannot move is named in docs/ui.md. voelin-ui-vm now depends on tracing (the sequences log as the copies did): one line of Cargo.lock, THIRD_PARTY_NOTICES.md unchanged (scripts/notices.sh --check clean), cargo deny check clean. The sequences have ten tests over a fake front end (commands, status, store, secrets, gateways), open_settings and Store::identity_for one each; the GPUI and Slint suites pass unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
45 lines
1.8 KiB
TOML
45 lines
1.8 KiB
TOML
[package]
|
|
name = "voelin-ui-vm"
|
|
version = "0.0.1-alpha"
|
|
description = "Toolkit-free view models of the desktop client: engine state turned into plain rows, shared by the Slint and GPUI front ends."
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
publish.workspace = true
|
|
|
|
[lib]
|
|
name = "voelin_ui_vm"
|
|
path = "src/lib.rs"
|
|
|
|
# No UI toolkit here (no slint, no gpui): `cargo tree -p voelin-ui-vm -e normal`
|
|
# must show neither. The front ends convert these types (docs/ui.md).
|
|
[dependencies]
|
|
chrono = { version = "0.4.45", default-features = false, features = ["clock"] }
|
|
# Whether a picture file decodes, and its size; PNG and JPEG are listed as
|
|
# the front end's toolkit used to bring them.
|
|
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "gif", "webp", "bmp", "ico"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
# JSON values of the settings and the gateway's configuration keys.
|
|
serde_json = "1"
|
|
# Whether an SVG document is XML with an svg root (the vector renderers read
|
|
# it with this parser too).
|
|
roxmltree = { version = "0.21", default-features = false, features = ["std"] }
|
|
# The Twemoji archive's blocks (raw deflate).
|
|
miniz_oxide = "0.8"
|
|
# Grapheme clusters for emoji in chat text.
|
|
unicode-segmentation = "1.13"
|
|
# The sample pictures of the demo data (VOELIN_DEMO_UI) and the tests.
|
|
png = "0.18"
|
|
# What the shared server sequences (`servers::sequence`) log, as both front
|
|
# ends log it.
|
|
tracing = "0.1.44"
|
|
voelin-audio = { path = "../voelin-audio", default-features = false }
|
|
voelin-core = { path = "../voelin-core", default-features = false, features = ["media"] }
|
|
voelin-gateway-proto = { path = "../voelin-gateway-proto" }
|
|
voelin-model = { workspace = true }
|
|
voelin-store = { path = "../voelin-store" }
|
|
|
|
[lints]
|
|
workspace = true
|