Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ The last-played game's art, heavily blurred and saturated, tints the whole windo
- **Base:** `bg`, `surface`, `surface-2` and `line`, a near-black blue-violet. Text is `text`, `text-2` (white 75%), `text-3` (white 50%) and `muted`.
- **Glass:** `glass`, `glass-strong`, `glass-hover`, `glass-line`, `glass-on`, `glass-on-line` fill and border every bar, chip, field, notice and panel. Don't invent a new alpha.
- **White pill** (`pill`, `pill-hover`): the primary action only (Play, Install, Log in). Written as literals in `app.css` (`button.pill`).
- **Accent violet** (`accent`, `accent-2`): toggles that are on, links in Settings, progress bars and the Update chip's arrow. Never the main call to action.
- **Accent violet** (`accent`, `accent-2`): toggles that are on, links in Settings, progress bars, the Update chip's arrow and the Proton build that is in use (Settings → Wine). Never the main call to action.
- **Status:**
- `play` green: a running game only (the Playing badge and the card ring).
- `warn` amber: a store needs attention.
Expand Down Expand Up @@ -218,8 +218,12 @@ No UI text below 11px. Counts and numbers use tabular figures. Folder paths in t
| Title | none |

- **Toolbar,** left to right: search, store selector, Installed, active filter chips, Filters, spacer, Sort, Update (only when one is ready), Downloads (only while something downloads), Add a game, Settings. No sidebar.
- **Settings:** a modal panel, max 760px wide, with a 190px section list on the left (stacked under 640px) that works as vertical tabs: only the chosen section shows, from its top. Sections: Accounts (Stores, then Game data with IGDB and SteamGridDB), General, About. Each section is a title, then Label headings over one rounded `glass` group per heading, its rows split by `glass-line` rules. Never a box per row. On Linux a Wine section sits between General and About (Windows never shows it): umu-launcher, with Install only while it is missing; Proton, one row per build found with Default and From Steam as the only labels, Make default (Use newest on an explicit default), and Remove with an inline confirm for builds Guild installed only; Install Proton with GE-Proton and Proton-CachyOS chips that fold out their releases, each with Install (its percent while it runs) or Installed; Prefixes, one row per game prefix with its name (the copy key once the game is gone), its size once measured, Open folder, winecfg, winetricks (disabled with a one-line reason when neither the system nor any Proton build has it) and Remove, whose inline confirm says saves in it are lost unless cloud saves are on. About opens with the 64px app logo beside Guild and its version, the acronym in small italic `text-3`, one line on what Guild is for, and Source code · GPL-3.0 · Credits (the README's Thanks); its Updates row then says only what the last check found.
- **Game page:** covers the content area while the library stays mounted underneath, so its scroll position survives. A column up to 1360px: the 300px hero, a tab row (Overview, DLC, Saves, Launch options, Installation); on Linux, Launch options adds a Proton menu chip (Default follows Settings), also for added games, where it is the only row, and never for a native Linux GOG build. A Windows game's first launch on Linux shows Setting up… in the busy pill, the card badge and Continue until its program runs. Its uninstall confirm offers an Also remove its Wine prefix checkbox, off by default, then three fact tiles and an About / Details grid (1.7fr / 1fr).
- **Settings:** a modal panel, max 760px wide, with a 190px section list on the left (stacked under 640px) that works as vertical tabs: only the chosen section shows, from its top. Sections: Accounts (Stores, then Game data with IGDB and SteamGridDB), General, About. Each section is a title, then Label headings over one rounded `glass` group per heading, its rows split by `glass-line` rules. Never a box per row. About opens with the 64px app logo beside Guild and its version, the acronym in small italic `text-3`, one line on what Guild is for, and Source code · GPL-3.0 · Credits (the README's Thanks); its Updates row then says only what the last check found. On Linux a Wine section sits between General and About (Windows never shows it), direction A (2026-11-09):
- The top group: an umu-launcher row with Install only while umu is missing, then Proton for Windows games, one menu (Newest, naming the build that is now, then each build) with the subtitle that a game's own choice in Launch options comes first.
- Proton builds: one row per build, by a readable name where the folder name allows ("Proton-CachyOS 11.0 (v3)", `protonName` in `format.ts`), with an accent "in use" tag on the build games run with, a "Steam" tag on Steam's, its size once measured, and Remove with an inline confirm for Guild's own only. The last row, Install another build, folds out one panel with a GE-Proton / Proton-CachyOS segmented control and that source's releases, each with Install (its percent while it runs) or Installed.
- Prefixes: the heading carries the count and total size on the right. One row per game prefix with its name (the copy key and "Game no longer in your library" once the game is gone), its size once measured, and a ⋯ menu with Open folder, winecfg, winetricks (disabled when neither the system nor any Proton build has it; a note under the group says why) and Remove…, which asks in the row that saves in it are lost unless cloud saves are on, with focus on Cancel.
- Rows in these two lists are one height, with or without a button.
- **Game page:** covers the content area while the library stays mounted underneath, so its scroll position survives. A column up to 1360px: the 300px hero, a tab row (Overview, DLC, Saves, Launch options, Installation); on Linux, Launch options adds a Proton menu chip (Default follows Settings), also for added games, where it is the only row, and never for a native Linux GOG build. A Windows game's first launch on Linux shows Setting up… in the busy pill, the card badge and Continue until its program runs. Once a Windows game has run on Linux, Installation gets a Wine prefix row with Open, winecfg and winetricks (disabled with the same reason as in Settings); never for a native Linux build, and never Remove, which stays in Settings and the uninstall confirm. Its uninstall confirm offers an Also remove its Wine prefix checkbox, off by default, then three fact tiles and an About / Details grid (1.7fr / 1fr).

## Elevation and shapes

Expand Down Expand Up @@ -252,6 +256,7 @@ No UI text below 11px. Counts and numbers use tabular figures. Folder paths in t
- **Popovers** (Filters, Sort, Downloads, Notes, the ⋯ menu, Play with): `surface-2`, `glass-on-line` border, 12px radius, modal shadow.
- Filters, Downloads, Update and Notes are bits-ui `Popover`s: focus moves in on open, Tab stays inside, Escape closes only the top one and returns focus to its button, a click outside closes, and mouse Back and Forward leave them open (`keepOnBackForward`). They follow their button, flip and shift to stay inside the window, and don't lock page scroll. Escape in the Filters rename field cancels only the rename.
- Sort, Language (Settings and the install panel), Proton, the install folder menu and Play with are bits-ui `DropdownMenu`s (`ChoiceMenu.svelte`, `PlayButton.svelte`): the caller's chip is the trigger, focus starts on the chosen item, arrows, Home, End and typing a letter move between items, Escape or a pick returns focus to the chip. Mouse Back and Forward leave them open (`keepOnBackForward`).
- A Settings prefix row's ⋯ menu (`ActionMenu.svelte`) is a bits-ui `DropdownMenu` too: focus starts on the first item that can run, a disabled item stays listed, and a pick returns focus to ⋯ (Remove… moves it to the row's Cancel instead).
- The game menu (`GameMenu.svelte`) is a bits-ui `DropdownMenu` too: on the game page the ⋯ button is its trigger; a card's right-click opens the one instance in `App.svelte` at the pointer, and a grid scroll closes it. Focus starts on the first item. Right opens Add to collection, Left or Escape closes only the submenu. Menu and submenu flip and shift to stay 8px inside the window. Keys typed into the new collection's name stay in the field, and while it is open hovering does not move focus; Escape there cancels only the name.
- The import pickers in Settings (Epic, Amazon) are a bits-ui `Combobox` (`GamePicker.svelte`): the Settings field look, the menu look for the list, opening with the first game picked. Typing filters by part of the title and clears the pick, so Import stays disabled until a game is chosen; a query matching nothing shows one row, "No game with that name". Emptying the field brings back the full list with the first game picked. Arrows and Enter pick, Escape closes only the list, and the list sits above the Settings dialog (z-index 50). Mouse Back and Forward leave it open (`keepOnBackForward`).
- Bits-ui menus keep Tab inside the menu (WAI-ARIA menu pattern), and open a submenu on hover as well as Right. None lock page scroll (`preventScroll={false}`): bits-ui's lock also turns off pointer events on the page, which swallowed the first click outside, so moving from one open menu to another chip took two clicks.
Expand Down Expand Up @@ -320,6 +325,7 @@ No UI text below 11px. Counts and numbers use tabular figures. Folder paths in t
- About header A: logo, name, version and acronym, no Made by and no credit list in the app; Credits links to the README (2026-11-09).
- Downloads popover layout F2: one two-line row per download where the row itself is the progress bar (2026-11-07).
- Install panel direction A: beside the cover in the library, inline under Install on the game page, real folder and drive space, DLC chosen there (2026-11-09).
- Settings → Wine direction A: Proton for Windows games as one menu on top, builds listed with their source, one Install another build panel, prefix actions behind ⋯ (2026-11-09).
- Installation tab layout C: rows named after what they're about, words only, no icons (2026-11-08).
- Non-goals: a light theme, achievements, friends, chat, store browsing, macOS.

Expand Down
9 changes: 9 additions & 0 deletions scripts/format.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
playtimeLabel,
progressLong,
progressShort,
protonName,
sizeLabel,
syncedLabel,
ttbLabel,
Expand Down Expand Up @@ -131,3 +132,11 @@ test('a picked program suggests its file name', () => {
assert.equal(nameFromExe('C:/Games/Celeste/Celeste.EXE'), 'Celeste')
assert.equal(nameFromExe('D:\\Emu\\pcsx2-qt.v1.7.exe'), 'pcsx2-qt.v1.7')
})

test('protonName reads Proton folder names', () => {
assert.equal(protonName('proton-cachyos-11.0-20261015-slr-x86_64_v3'), 'Proton-CachyOS 11.0 (v3)')
assert.equal(protonName('proton-cachyos-10.0-20250714-slr-x86_64'), 'Proton-CachyOS 10.0')
assert.equal(protonName('GE-Proton11-12-x86_64'), 'GE-Proton11-12')
assert.equal(protonName('GE-Proton11-12'), 'GE-Proton11-12')
assert.equal(protonName('Proton - Experimental'), 'Proton - Experimental')
})
12 changes: 6 additions & 6 deletions src-tauri/src/commands/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -961,12 +961,7 @@ fn has_launch_options(g: &Game) -> bool {
pub async fn protons(app: AppHandle, key: String) -> Vec<String> {
let game = app.state::<AppState>().game(&key);
blocking(move || {
let native = game
.as_ref()
.filter(|g| g.provider == ProviderKind::Gog)
.and_then(installed_dir)
.is_some_and(|dir| gog::native(dir));
if native {
if game.as_ref().is_some_and(native_build) {
Vec::new()
} else {
crate::platform::protons()
Expand All @@ -975,6 +970,11 @@ pub async fn protons(app: AppHandle, key: String) -> Vec<String> {
.await
}

/// A GOG game installed as its native Linux build, which runs without Proton.
pub(super) fn native_build(game: &Game) -> bool {
game.provider == ProviderKind::Gog && installed_dir(game).is_some_and(|dir| gog::native(dir))
}

/// The Launch options tab of an installed Epic, GOG or Amazon copy; `None` for others.
#[tauri::command]
#[specta::specta]
Expand Down
56 changes: 46 additions & 10 deletions src-tauri/src/commands/wine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,59 @@ pub fn wine_prefixes(app: AppHandle) -> Vec<PrefixView> {
}

#[derive(Serialize, specta::Type)]
pub struct PrefixSize {
pub struct DirSize {
/// A prefix's copy key, or a Proton build's name.
key: String,
bytes: u64,
}

/// Each prefix's size on disk, walked in the background.
#[derive(Serialize, specta::Type)]
pub struct WineSizes {
prefixes: Vec<DirSize>,
protons: Vec<DirSize>,
}

/// Each prefix's and Proton build's size on disk, walked in the background.
#[tauri::command]
#[specta::specta]
pub async fn prefix_sizes() -> Vec<PrefixSize> {
pub async fn wine_sizes() -> WineSizes {
blocking(|| {
platform::prefixes()
.into_iter()
.map(|(key, path)| PrefixSize {
key,
bytes: super::settings::dir_size(&path),
})
.collect()
let sizes = |dirs: Vec<(String, std::path::PathBuf)>| {
dirs.into_iter()
.map(|(key, path)| DirSize {
key,
bytes: super::settings::dir_size(&path),
})
.collect()
};
WineSizes {
prefixes: sizes(platform::prefixes()),
protons: sizes(platform::proton_dirs()),
}
})
.await
}

#[derive(Serialize, specta::Type)]
pub struct GamePrefix {
/// Whether winetricks can run in it: the system's, or one a Proton build here bundles.
winetricks: bool,
}

/// The Wine prefix of a copy, for its game page: only on Linux, once its game has run, and never for a native Linux
/// build.
#[tauri::command]
#[specta::specta]
pub async fn game_prefix(app: AppHandle, key: String) -> Option<GamePrefix> {
let game = app.state::<AppState>().game(&key);
blocking(move || {
if game.as_ref().is_some_and(super::game::native_build) {
return None;
}
platform::prefixes().iter().find(|(k, _)| *k == key)?;
Some(GamePrefix {
winetricks: platform::runner()?.winetricks,
})
})
.await
}
Expand Down
86 changes: 70 additions & 16 deletions src-tauri/src/library/epic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,41 @@ fn has_cloud_saves(metadata: &Value) -> bool {
!metadata["customAttributes"]["CloudSaveFolder"].is_null()
}

/// Legendary's installed games, as `list-installed --json` lists them: the values of its `installed.json`. No file
/// means nothing is installed; an unreadable one is an error, so a scan keeps what it knew.
/// Legendary's installed games, as `list-installed --json` lists them: the values of its `installed.json`, with
/// `remote_version` from `assets.json` (`with_remote_versions`). No file means nothing is installed; an unreadable one
/// is an error, so a scan keeps what it knew.
fn installed() -> Result<Value, Error> {
let path = config_dir().ok_or("no home folder")?.join("installed.json");
match std::fs::read(&path) {
Ok(bytes) => installed_from(&bytes),
Err(e) if e.kind() == ErrorKind::NotFound => Ok(Value::Array(Vec::new())),
Err(e) => Err(e.into()),
let dir = config_dir().ok_or("no home folder")?;
let mut installed = match std::fs::read(dir.join("installed.json")) {
Ok(bytes) => installed_from(&bytes)?,
Err(e) if e.kind() == ErrorKind::NotFound => return Ok(Value::Array(Vec::new())),
Err(e) => return Err(e.into()),
};
// Unreadable or missing, it marks no updates.
let assets = std::fs::read(dir.join("assets.json"))
.ok()
.and_then(|bytes| serde_json::from_slice(&bytes).ok())
.unwrap_or(Value::Null);
with_remote_versions(&mut installed, &assets);
Ok(installed)
}

/// Gives each installed entry the `remote_version` that `assets.json` (`{platform: [{app_name, build_version, …}]}`,
/// refreshed for every installed platform by each `list --json`) has for its app on its platform, as
/// `list-installed --check-updates` compares them.
fn with_remote_versions(installed: &mut Value, assets: &Value) {
for g in installed.as_array_mut().into_iter().flatten() {
let platform = g["platform"].as_str().unwrap_or("Windows");
let remote = assets[platform]
.as_array()
.into_iter()
.flatten()
.find(|a| a["app_name"] == g["app_name"])
.and_then(|a| a["build_version"].as_str())
.map(str::to_owned);
if let Some(remote) = remote {
g["remote_version"] = remote.into();
}
}
}

Expand Down Expand Up @@ -813,13 +840,11 @@ fn game(name: &str, title: &str, installed: Option<&Value>, art: Art) -> Game {
}
}

/// An installed entry marks an update with `update_available`, or by a `remote_version` that differs from `version`. // shortcut: both spellings are read because no real capture with an update exists yet.
/// An installed entry has an update when its `remote_version` (`with_remote_versions`) differs from `version`.
fn has_update(local: &Value) -> bool {
local["update_available"].as_bool().unwrap_or_else(|| {
local["remote_version"]
.as_str()
.is_some_and(|remote| local["version"].as_str().is_some_and(|v| v != remote))
})
local["remote_version"]
.as_str()
.is_some_and(|remote| local["version"].as_str().is_some_and(|v| v != remote))
}

/// Epic catalog `keyImages`: tall box art is the cover, the wide one is header and hero.
Expand Down Expand Up @@ -962,15 +987,44 @@ mod tests {
// Fortnite: the store's version differs. Imported: no remote version, so no update.
assert!(all[0].update_available);
assert!(!all[2].update_available);
let flagged =
serde_json::json!([{ "app_name": "A", "version": "1", "update_available": true }]);
assert!(games(&Value::Null, &flagged)[0].update_available);
let same = serde_json::json!([{ "app_name": "A", "version": "1", "remote_version": "1" }]);
assert!(!games(&Value::Null, &same)[0].update_available);
// Not installed: nothing to update.
assert!(!all[1].update_available);
}

#[test]
fn assets_give_the_remote_version() {
let assets = serde_json::json!({
"Windows": [
{ "app_name": "Old", "build_version": "2" },
{ "app_name": "Current", "build_version": "1" },
{ "app_name": "MacOnly", "build_version": "9" }
],
"Mac": [{ "app_name": "Mac", "build_version": "1" }]
});
let mut installed = serde_json::json!([
{ "app_name": "Old", "version": "1", "platform": "Windows" },
{ "app_name": "Current", "version": "1", "platform": "Windows" },
{ "app_name": "Missing", "version": "1", "platform": "Windows" },
// Only the Windows build is newer; the Mac install is current.
{ "app_name": "Mac", "version": "1", "platform": "Mac" },
{ "app_name": "MacOnly", "version": "1", "platform": "Mac" }
]);
with_remote_versions(&mut installed, &assets);
let mut updates: Vec<String> = games(&Value::Null, &installed)
.into_iter()
.filter(|g| g.update_available)
.map(|g| g.external_id)
.collect();
updates.sort();
assert_eq!(updates, ["Old"]);
// No assets.json: no updates.
let mut installed = serde_json::json!([{ "app_name": "Old", "version": "1" }]);
with_remote_versions(&mut installed, &Value::Null);
assert!(!games(&Value::Null, &installed)[0].update_available);
}

#[test]
fn installed_json_lists_its_entries() {
let bytes = br#"{"Fortnite": {"app_name": "Fortnite", "install_path": "C:\\Fn"}}"#;
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ fn bindings() -> tauri_specta::Builder<tauri::Wry> {
commands::wine::install_proton,
commands::wine::remove_proton,
commands::wine::wine_prefixes,
commands::wine::prefix_sizes,
commands::wine::wine_sizes,
commands::wine::game_prefix,
commands::wine::remove_prefix,
commands::wine::open_prefix,
commands::wine::run_in_prefix,
Expand Down
Loading
Loading