vike
Desktop app

The desktop app

The window model of vike-desktop — a multi-window egui shell over one published core snapshot, twelve window kinds, two builds, and the crate split that decides what CI can test.

vike-desktop is the desktop face of Vike Trader: a native egui multi-window shell in which every window carries its own title toolbar — a chart-style menu, symbol and interval dropdowns, a LIVE badge, and clone / minimize / maximize controls. This page is written from crates/vike-desktop/src/main.rs's module header, crates/vike-desktop/Cargo.toml's [features] table and crates/vike-app-core/src/lib.rs, which together say what the app is made of and why it is split the way it is.

One snapshot, many windows

The GUI never touches trading state directly. crates/vike-desktop/src/main.rs's header states the data path: market data flows from feed threads into the core's ingest, the core owns the bar cache, and it publishes an arc-swapped CoreSnapshot that the GUI converts into its render model whenever the snapshot changes. In the header's own words, the GUI "is a lossy observer; it never touches the core's state directly." Every panel below — the chart, the DOM ladder, the trade panel, the Polymarket cockpit — reads that snapshot and hands its intents back as neutral actions that the frame loop turns into commands. The single-writer core behind it is described in The execution core.

The window kinds

crates/vike-app-core/src/workspace/state.rs's WinKind is the roster: Chart, Trade, Dom, Options, Greeks, News, Calendar, Data (labelled "Data Manager"), Studio, Connections, Tearsheet and Polymarket. WinKind::ALL holds all twelve; WinKind::LAUNCHERS is the nine-entry launcher row (Chart, Trade, DOM, Options, Greeks, News, Calendar, Data, Tearsheet). Each kind carries an icon, a per-tool accent colour, and a stable lowercase slug that is the VIKE_TOOL QA vocabulary — from_slug resolves over ALL, so the two directions cannot disagree.

The Studio IDE and the Data Manager are large enough to have their own sections: Studio and Data Manager.

What the tool windows fetch

crates/vike-app-core/src/tools.rs's header names the sources: News reads Cointelegraph RSS, Calendar reads ForexFactory's weekly JSON, and Options reads vike-deribit's chain provider (BTC, ETH and SOL book summaries). Two calendar fetches need a third-party key — ToolApiKeys carries FINNHUB_API_KEY for the weekly earnings calendar and FMP_API_KEY for dividends — and the module reads neither the environment nor the credential store itself: the app root resolves both once at startup and hands them in, so a key added afterwards needs a restart.

The bottom status strip carries two dots. crates/vike-app-core/src/status_dot.rs decides their colours: the feed dot is classified by vike_model::feed_status::parse_feed_status, the same parser the Connections tool and the headless daemon's health gate read, and the control dot takes a plain bool from the control handle rather than recovering one from a rendered string.

Two builds

crates/vike-desktop/Cargo.toml declares no [features] table. It used to carry a fat default — the local trading core reached through vike_run::build_node and the fourteen venue bridges, DataFusion-backed tick recording, the Studio's local store arm and bulk backfill — and a thin alias for its absence. fat was deleted with the local core, so vike-mount, vike-run and vike-backfill stand in the manifest as tombstone comments and there is nothing extra to turn on. Which of the three arms a launch composes is decided by crates/vike-app-core/src/split_plane.rs's app_mode, and Observe mode covers all three.

The window opens maximized and frameless

main.rs builds the native window with with_maximized(true) and with_decorations(false) — the app paints its own caption. A fixed size with no position once let the OS drop the frameless window partly off-screen on smaller displays. The OS title reads Vike Trader — OBSERVING <addr> on every run, not just under --observe: startup_backend has no "not connected" rung, so the address always resolves and window_title's — live arm is unreachable.

Why two crates

crates/vike-app-core/src/lib.rs is the eframe-free, wgpu-free logic extracted from vike-desktop so it runs in CI. crates/vike-ops/tests/ci_excluded_gui_shell_ratchet.rs's header states the split precisely: vike-desktop is compiled once and clippy-gated, but the only tests that execute inside it are the pure-logic byte-layout pins in crates/vike-desktop/src/chart_gpu.rs; everything else in main.rs is type-checked and then never run, because the crate sits outside the derived CI roster. Several of its modules arrived after a bug that shipped for exactly that reason: core_sync carries four silent-data-loss fixes that existed only as code comments because nothing compiled the file they lived in, order_dispatch closed a real hole where only three of five submit paths validated and the Trade window had no local notional cap at all, fonts had every candidate font path naming Windows, and window_spawn found six hand copies of the cascade arithmetic with two already drifted apart. Others — the workspace shell, the tool bodies in tool_views, the startup layout, the observe bridge — moved down so that code no gate compiled would finally be compiled, clippied and tested; the rest is simply newer work authored here rather than in the shell. The size of the unexecuted half is ratcheted by that same file, which fails a PR that grows it.

Two tool bodies still live in main.rs: crates/vike-app-core/src/tool_views/mod.rs's header says Options keeps its modal and poll-thread wake channel there, and Studio needs the feature.

On this page