Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
da1b362
Manage tab: every game setting in one place, grouped in cards
Xarishark Nov 19, 2026
0ba423a
The game's menu leaves out what its tabs already have
Xarishark Nov 19, 2026
307f5a7
Uninstall stays in the game's menu
Xarishark Nov 19, 2026
9518402
An open menu closes when the page scrolls
Xarishark Nov 19, 2026
be16845
An open menu moves with the page as it scrolls
Xarishark Nov 19, 2026
b1f7af3
Game page side column: no buttons, Launcher Support is a box
Xarishark Nov 19, 2026
ea0daae
The game's menu: Troubleshoot and Add To submenus, site logos
Xarishark Nov 19, 2026
f780c88
New setup options: a dot on Setup Options and on the Extras step
Xarishark Nov 19, 2026
7ea90c4
Reaching Extras in Setup Options counts as seeing its new options
Xarishark Nov 19, 2026
e3cad6c
Favorites show it: a gold star on the Library tile and in the sidebar…
Xarishark Nov 19, 2026
6dfe339
Big Picture says who made a game under Based on, as the desktop page …
Xarishark Nov 19, 2026
7b5b255
Big Picture: Setup Options takes Play's place in the X sheet
Xarishark Nov 19, 2026
7f3bd03
Translations for the Manage tab, the game's menu and Setup Options
Xarishark Nov 19, 2026
5df74a7
I Already Have It is Locate Installed, with a folder-and-magnifier icon
Xarishark Nov 19, 2026
72ecd75
Easy Install downloads at once and asks for the copy meanwhile
Xarishark Nov 19, 2026
3d1aa51
Skip Easy Setup is on the setup window instead of the game's menu
Xarishark Nov 19, 2026
254e324
Translations for Locate Installed, picking the copy while it download…
Xarishark Nov 19, 2026
b151f96
A game that isn't installed has no Report row in its menu
Xarishark Nov 19, 2026
1e53fd6
Easy Install: the setup window waits until the copy is picked
Xarishark Nov 19, 2026
cb193f2
Skip Easy Setup in Big Picture sticks after the launcher restarts
Xarishark Nov 19, 2026
769ee1e
Relink Setup shows only for a game set up before
Xarishark Nov 19, 2026
69617fd
The favorite star on a Library tile has a dark edge, so it reads on l…
Xarishark Nov 19, 2026
90e05c7
Merge remote-tracking branch 'upstream/main' into feat/tab-menu-refac…
Xarishark Nov 19, 2026
7a73c42
No Relink Setup or Use Them Again: the setup window already fills in …
Xarishark Nov 19, 2026
6b6f149
The core has no setup_relink either: nothing calls it now
Xarishark Nov 19, 2026
ebd68bb
Merge remote-tracking branch 'upstream/main' into feat/tab-menu-refac…
Xarishark Nov 19, 2026
1afe6e7
The sheet's green mark covers New option too, not only Newer
Xarishark Nov 19, 2026
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
89 changes: 1 addition & 88 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5020,9 +5020,6 @@ struct Setup {
inputs: Vec<inputs::Row>,
inputs_error: Option<String>,
inputs_ready: bool,
/// The files it was set up with before, by name (Use My Previous Setup), when they're
/// remembered and it isn't set up now.
previous: Vec<String>,
/// A build already in the game's folder, to use instead of building it again.
prebuilt: Option<PathBuf>,
/// Set up from the build already on this PC.
Expand Down Expand Up @@ -5142,7 +5139,6 @@ fn game_setup(app: AppHandle, st: State<'_, App>, id: String) -> Option<Setup> {
inputs: inputs::rows(&p, &g, &st.dir).unwrap_or_default(),
inputs_error: inputs::validate(&p).err(),
inputs_ready,
previous: if set_up { vec![] } else { previous_files(&p, &g, &st.dir) },
prebuilt: if set_up { None } else { p.build_folder_here(&g.path) },
prebuilt_on: g.prebuilt && built,
kept: setup_state::builds_from_kept(&p, &g),
Expand Down Expand Up @@ -5283,89 +5279,6 @@ async fn free_up_space(st: State<'_, App>, id: String) -> Res<u64> {
Ok(size)
}

/// The files a game was set up with, by name: its copy and its picked files, remembered after an
/// update or a lost setup. Empty when nothing is remembered.
fn previous_files(p: &profile::Profile, g: &Installed, dir: &Path) -> Vec<String> {
let name = |x: &Path| x.file_name().map(|n| n.to_string_lossy().to_string()).unwrap_or_else(|| x.display().to_string());
let mut out = vec![];
if p.game.is_some() {
if let Some(c) = &g.game_copy {
out.push(name(c));
}
}
let active: Vec<inputs::Row> = inputs::rows(p, g, dir).unwrap_or_default().into_iter().filter(|r| r.active && r.shared.is_empty() && !r.runtime).collect();
for r in active {
if let Some(x) = g.setup_inputs.get(&r.id) {
out.push(name(x));
}
}
out
}

/// Use My Previous Setup: the files it was set up with are checked as Easy Setup checks them,
/// the setup step is skipped when what it leaves is still there, and the game is set up again.
/// `RELINK_MISSING|<input>|<label>`: that one file moved, so it's asked for alone.
/// `RELINK_BUILD|`: the build is gone, so the setup runs.
#[tauri::command(async)]
fn setup_relink(st: State<'_, App>, id: String) -> Res<Value> {
let pick = game_of(&st, &id);
let rid = pick.as_ref().map(|p| p.recomp.clone()).unwrap_or_else(|| id.clone());
let sub = pick.as_ref().map(|p| p.game.id.clone());
if setup_busy(&id) || setup_busy(&rid) || st.running.lock().unwrap().contains_key(&rid) {
return Err(Error::Msg("Close the game or stop setup first.".into()));
}
let mut g = st.lib.lock().unwrap().installed.get(&rid).cloned().ok_or_else(|| Error::Msg("It isn't installed.".into()))?;
// Set up by the launcher from here on: in the setup's own folder, not a build of the player's.
// Their build stays in use until this has worked.
let theirs = g.build_dir.take();
let mut p = profile_of(&st, &rid, &g).ok_or_else(|| Error::Msg("This game has no setup profile.".into()))?;
if let Some(pk) = &pick {
games::scope(&mut p, &pk.game, &pk.all);
}
let built = p.build_done(&g.path) == Some(true) || (g.prebuilt && p.build_folder_here(&g.path).is_some());
if let Some(need) = &p.game {
let ok = g.game_copy.clone().filter(|c| c.exists()).map(|c| copy_ok(need, &c, &g.path, false).is_ok()).unwrap_or(false);
if !ok && !(built && !p.start_uses_game() && p.inputs.is_empty()) {
return Err(Error::Msg(format!("RELINK_MISSING|game|{}", need.label)));
}
}
if !p.inputs.is_empty() {
inputs::validate(&p).map_err(Error::Msg)?;
let rows = inputs::rows(&p, &g, &st.dir).map_err(Error::Msg)?;
if let Some(r) = rows.iter().find(|r| r.active && !r.optional && !r.runtime && r.path.is_none()) {
return Err(Error::Msg(format!("RELINK_MISSING|{}|{}", r.id, r.label)));
}
p.input_paths = inputs::resolve(&p, &g, &st.dir).map_err(Error::Msg)?;
}
// The build the setup step made: gone means it's made again.
if p.prepare.is_some() && p.build_done(&g.path) == Some(false) {
return Err(Error::Msg("RELINK_BUILD|".into()));
}
if !p.inputs.is_empty() {
inputs::stage(&p, &mut g, &st.dir).map_err(Error::Msg)?;
let sig = inputs::signature(&p, &g, &st.dir).map_err(Error::Msg)?;
if let Some(x) = st.lib.lock().unwrap().installed.get_mut(&rid) {
x.input_staged = g.input_staged.clone();
x.input_stamps = g.input_stamps.clone();
match &sub {
Some(sub) => x.games.entry(sub.clone()).or_default().inputs_ready = sig,
None => x.inputs_ready = sig,
}
}
}
let _ = p.prepare(&g.path, g.game_copy.as_deref().filter(|c| c.exists()));
if let Some(x) = st.lib.lock().unwrap().installed.get_mut(&rid) {
x.setup_before = None;
x.mode = library::SetupMode::Easy;
if theirs.is_some() {
x.build_dir = None;
}
}
trail::note(format!("Setup {id}: relinked to the files it was set up with before"));
st.save();
Ok(json!({"ok": true}))
}

/// Use the Build Already on This PC: the game's folder holds a finished build (made by this
/// launcher before, or the developer's own), so the game is set up with no copy and no build.
#[tauri::command]
Expand Down Expand Up @@ -10184,7 +10097,7 @@ pub fn run() {
desktop_shortcut, open_app_control, fs_paste, portable_info, make_portable, add_to_steam, launcher_to_steam, steam_sync::steam_sync_now, steam_sync::steam_sync_state, steam_sync::steam_remove_all, recent_log, screenshots, open_shots, overlay_action, overlay_state, is_handheld, skip_backup, set_cover, art::art_source, art::art_open, art::art_save, art::art_search, art::art_for, all_screenshots, delete_screenshot,
copy_screenshot, show_screenshot, controllers, prefetch_images, versions, build_check, news, game_info, mods_state, mods_online,
mod_install, mod_remove, open_mods, send_report, beta_feedback, game_programs, run_program, game_root, boot::boot_builtin, update_launcher, resume_game, game_setup, set_game_copy, free_up_space, move_build, set_update_copy, set_game_setting, set_game_slider, set_game_binding, reset_game_bindings, usage::report_preview, usage::profile_report, usage::my_reports, usage::report_reply,
recomp_games, adopt::move_listing, update_info, set_proxy, umu_repair, dlss_fetch, dlss_set, dlss_state, dlss_remove, cloud::library_pull, cloud::library_push, cloud::playtime_push, cloud::playtime_pull, cloud::saves_open_backups, game_action, setup_copy, setup_cancel, setup_status, setup_begin, setup_end, setup_input_set, setup_key_remove, setup_inputs_run, setup_relink, setup_use_build, easy_setup, set_game_options,
recomp_games, adopt::move_listing, update_info, set_proxy, umu_repair, dlss_fetch, dlss_set, dlss_state, dlss_remove, cloud::library_pull, cloud::library_push, cloud::playtime_push, cloud::playtime_pull, cloud::saves_open_backups, game_action, setup_copy, setup_cancel, setup_status, setup_begin, setup_end, setup_input_set, setup_key_remove, setup_inputs_run, setup_use_build, easy_setup, set_game_options,
set_prepare_opts,
convert_plan,
convert_copy,
Expand Down
22 changes: 20 additions & 2 deletions tests/auto-install.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,25 @@ test('a finished Easy Install download opens its setup only with Auto-Install on
assert.match(doneHandler, /su\.needs && su\.status && !su\.status\.ready && !auto\) toast\(tf\('\{name\} is installed\. Set it up from its page\.'/);
});

test('Easy Install skips Pick Your Copy First with Auto-Install off', () => {
test('Easy Install asks for the copy while it downloads only with Auto-Install on', () => {
const start = fn(app, 'startInstall');
assert.match(start, /if \(autoInstall\(\) && !S\.library\[id\] && !tag && !anyway && !pack\.length && turnkey\(byId\(id\)\)/);
assert.match(start, /const pickNow = autoInstall\(\) && !S\.library\[id\] && !tag && !anyway && !pack\.length && turnkey\(byId\(id\)\)/);
});

test('Easy Install starts the download and opens the copy picker together, with no question first', () => {
const start = fn(app, 'startInstall');
assert.match(start, /dlArgs\(id, \{ id, dir: dir \|\| null, tag: tag \|\| null \}\);\n\s+if \(pickNow\) pickWhileDownloading\(id\);\n\s+try \{ await invoke\('install'/);
assert.doesNotMatch(app, /Pick Your Copy First\?/);
});

test('a copy picked while it downloads waits for the download to be done', () => {
const pick = fn(app, 'pickWhileDownloading');
assert.match(pick, /if \(S\.jobs\[id\]\) \{\n\s+if \(!path\) return;\n\s+\(S\.prePicked = S\.prePicked \|\| \{\}\)\[id\] = path;/);
});

test('a download that ends while the copy is being picked leaves the setup window to the picking', () => {
assert.match(doneHandler, /else if \(S\.easy\.has\(id\) && \(S\.pickingCopy \|\| \{\}\)\[id\]\) \{ \/\* pickWhileDownloading opens it \*\/ \}/);
const pick = fn(app, 'pickWhileDownloading');
assert.match(pick, /try \{ path = await pickCheckedCopy\(id\); \} finally \{ delete S\.pickingCopy\[id\]; \}/);
assert.match(pick, /await setupModal\(id\);\n\s+if \(path && SU\.el && SU\.id === id && SU\.stage === 'steps'\) suBegin\(path\);/);
});
16 changes: 10 additions & 6 deletions tests/beta51.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,20 @@ test('reports need an account: signed out, the sign-in prompt instead of a quest
assert.equal(c.needSignIn(new Error('Something else')), null);
});

test('the files from before and the build on this PC are offered under the game\'s box', () => {
test('the build on this PC is offered under the game\'s box', () => {
const { stepsContext } = require('./steps-context.cjs');
const c = stepsContext();
const su = (x) => Object.assign({ needs: 'x', kind: '', inputs: [{ id: 'base', label: 'Base', role: 'game', file: true, active: true, path: null }], prepare_options: [] }, x);
assert.match(c.stepsView('h', su({ previous: ['Base.nsp', 'Update.nsp'], inputs_ready: false }), {}, { name: 'H' }), /Set up before with Base\.nsp · Update\.nsp\. <button type="button" data-ss="relink">Use Them Again<\/button>/);
assert.doesNotMatch(c.stepsView('h', su({ previous: ['Base.nsp'], inputs_ready: true }), {}, { name: 'H' }), /data-ss="relink"/);
// The build already in the game's folder comes first: Set Up uses it, unless Build It Again.
const built = c.stepsView('h', su({ previous: ['Base.nsp'], prebuilt: '/home/p/Games/Hopper' }), {}, { name: 'H' });
// Set Up uses the build already in the game's folder, unless Build It Again.
const built = c.stepsView('h', su({ prebuilt: '/home/p/Games/Hopper' }), {}, { name: 'H' });
assert.match(built, /still here, so setup skips the build\. <button type="button" data-ss="rebuild">Build It Again<\/button>/);
assert.match(app, /\{ act: 'relink', id, label: t\('Relink Setup'\), icon: 'refresh' \}/);
});

test('files from before get no Use Them Again line', () => {
const { stepsContext } = require('./steps-context.cjs');
const c = stepsContext();
const su = (x) => Object.assign({ needs: 'x', kind: '', inputs: [{ id: 'base', label: 'Base', role: 'game', file: true, active: true, path: null }], prepare_options: [] }, x);
assert.doesNotMatch(c.stepsView('h', su({ inputs_ready: false }), {}, { name: 'H' }), /Set up before with|data-ss="relink"/);
});

test('players can be asked where each game goes, Easy Install too', () => {
Expand Down
28 changes: 8 additions & 20 deletions tests/beta53.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,25 @@ const rust = fs.readFileSync(path.join(__dirname, '../src-tauri/src/lib.rs'), 'u
const fn = (src, name) => src.match(new RegExp(`^(?:async )?function ${name}\\([^]*?^}`, 'm'))[0];

test('Skip Easy Setup: per game or for every game, and the page treats those games as plain installs', () => {
const run = new Function('S', 't', `${fn(app, 'applyEasySkip')}; ${fn(app, 'easySkipItem')}; return { applyEasySkip, easySkipItem };`);
const run = new Function('S', 't', `${fn(app, 'applyEasySkip')}; return { applyEasySkip };`);
const S = { settings: { ui: {} }, library: {}, easyAll: new Set(['hopper', 'skyracer']) };
const { applyEasySkip, easySkipItem } = run(S, (x) => x);
const { applyEasySkip } = run(S, (x) => x);
applyEasySkip();
assert.deepEqual([...S.easy], ['hopper', 'skyracer']);
assert.equal(easySkipItem('hopper')[0].check, false);
// Installed, the menu opens the Easy Setup switch on its Manage tab instead.
S.library.skyracer = {};
assert.deepEqual(easySkipItem('skyracer'), [{ act: 'easy-row', id: 'skyracer', label: 'Easy Setup…', icon: 'disc' }]);
delete S.library.skyracer;
assert.deepEqual(easySkipItem('plain'), [], 'only games Easy Setup can do get the item');
S.settings.ui.easy_skip = ['hopper'];
applyEasySkip();
assert.deepEqual([...S.easy], ['skyracer']);
assert.equal(easySkipItem('hopper')[0].check, true);
S.settings.ui.easy_skip_all = true;
applyEasySkip();
assert.deepEqual([...S.easy], []);
assert.deepEqual(easySkipItem('skyracer'), [], 'no per-game item while every game skips it');
// Saving settings applies it straight away, and the catalog's list is the starting point.
assert.match(fn(app, 'saveSettings'), /S\.settings = Object\.assign\(\{\}, S\.settings, patch\);\n applyEasySkip\(\);/);
assert.match(app, /S\.easyAll = new Set\(await invoke\('easy_setup'\)\);[^\n]*\n applyEasySkip\(\);/);
});

test('the menu item and the Settings switch', () => {
const menu = fn(app, 'gameMenu');
assert.match(menu, /\.\.\.\(!g \? easySkipItem\(id\) : \[\]\)/);
assert.match(menu, /act: 'manual'[^\n]*\n\s+\.\.\.easySkipItem\(id\),/);
test('Skip Easy Setup is on the setup window, the Manage tab and in Settings, not in the menu', () => {
assert.doesNotMatch(fn(app, 'gameMenu'), /easy-skip|Skip Easy Setup/);
assert.match(fn(app, 'manageStartRows'), /const rows = \[easyRow\(id\), programRow\(id, inst\)\];/);
assert.match(app, /case 'easy-skip': \{[^]*?await setEasySkip\(id, on\);/);
assert.match(fn(app, 'setEasySkip'), /saveUi\(\{ easy_skip: \[\.\.\.skip\] \}, true\)/);
assert.match(app, /sw\('easy_skip_all', ui\.easy_skip_all, t\('Skip Easy Setup'\), 'ui-toggle'\)/);
Expand All @@ -54,14 +45,14 @@ test('a skipped game starts as its own setup leaves it, after that setup when it
const named = fs.readFileSync(path.join(__dirname, '../ui/setup-inputs.js'), 'utf8');
const tv = fs.readFileSync(path.join(__dirname, '../ui/tv.js'), 'utf8');

test('Use a Build You Already Have: a line under the copy in Easy Setup, a menu item, and the skipped-game prompt', () => {
test('Use a Build You Already Have: a line under the copy in Easy Setup, a Manage row, and the skipped-game prompt', () => {
const steps = fs.readFileSync(path.join(__dirname, '../ui/setup-steps.js'), 'utf8');
// Easy Setup: one quiet line, and the folder shows in the copy's box until Set Up uses it.
assert.match(fn(steps, 'ssAlt'), /if \(su\.own_build\) return `<p class="ss-alt">\$\{esc\(tf\('Already built \{name\} from your copy, outside the launcher\? Skip the build:'/);
assert.match(fn(steps, 'stepsRun'), /await invoke\('setup_use_build', ns\.own \? \{ id, folder: ns\.own \} : \{ id \}\);/);
assert.match(fn(named, 'useOwnBuild'), /invoke\('setup_use_build', \{ id, folder: typeof p === 'string' \? p : p\.path \}\)/);
assert.match(app, /\/\^NEED_OWN_BUILD\\\|\/\.test/);
assert.match(fn(app, 'gameMenu'), /act: 'ownbuild'/);
assert.match(fn(app, 'manageStartRows'), /data-act="ownbuild"/);
// Big Picture draws the same steps, so it has the same line.
assert.match(tv, /body = stepsShell\(id, su, TS\.named, a, true\);/);
// It says where the game's own setup builds it, when that's outside the launcher's folder for
Expand All @@ -72,12 +63,9 @@ test('Use a Build You Already Have: a line under the copy in Easy Setup, a menu
test('the launcher building it again goes back to the setup\'s own folder once that has worked; an update keeps the player\'s', () => {
// Built in the setup's own folder, while the player's build stays in use until the setup works.
assert.match(rust, / g\.build_dir = None;\n let p = profile_of\(&st, &id, &g\)/);
assert.match(rust, /let theirs = g\.build_dir\.take\(\);/);
assert.doesNotMatch(rust, /if g\.build_dir\.take\(\)\.is_some\(\) \{/);
// Let go of only where a setup is done: setup_copy, and Use My Previous Setup.
// Let go of only where a setup is done: setup_copy.
assert.match(rust, /x\.build_dir = None;\n\s+x\.prepare_version = [^\n]*\n\s+x\.setup_before = None;/);
// (Use My Previous Setup: a setup that worked, so the launcher sets the game up again.)
assert.match(rust, /x\.setup_before = None;\n\s+x\.mode = library::SetupMode::Easy;\n\s+if theirs\.is_some\(\) \{\n\s+x\.build_dir = None;/);
assert.match(rust, /build_dir: prev\.as_ref\(\)\.and_then\(\|p\| p\.build_dir\.clone\(\)\),/);
assert.match(rust, /if let Some\(dir\) = g\.build_dir\.as_ref\(\)\.filter\(\|d\| d\.is_dir\(\)\) \{\n\s+p\.rebase_build\(&g\.path, dir\);/);
});
4 changes: 2 additions & 2 deletions tests/beta54.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test('Pause Updates keeps a game on its version: out of Update, Update All and a
// It's applied as updates come in, so automatic updates and Update All never see it.
const check = fn(app, 'checkUpdates');
assert.ok(check.indexOf('holdUpdates();') < check.indexOf('const auto = '));
assert.match(fn(app, 'gameMenu'), /act: 'auto-up'[^\n]*\n\s+\.\.\.holdItem\(id\),/);
assert.match(fn(app, 'manageUpdateRows'), /aria-checked="\$\{held\}"[^\n]*data-act="hold-up"/);
assert.match(app, /case 'hold-up': return toggleHold\(id\);/);
assert.match(fn(app, 'badNote'), /gp-note held[^]*data-act="hold-up"/);
assert.match(tv, /window\.toggleHold\(id\)/);
Expand Down Expand Up @@ -72,7 +72,7 @@ test('Free Up Space: on the Your Copy card when the game plays without the copy,
});

test('Move Build moves a build of its own folder and the game starts from there', () => {
assert.match(fn(app, 'gameMenu'), /S\.setup\[id\]\.build_at \? \[\{ act: 'move-build', id, label: t\('Move Build…'\)/);
assert.match(fn(app, 'manageStartRows'), /if \(su && su\.build_at\) rows\.push\([^\n]*data-act="move-build"/);
assert.match(fn(app, 'moveBuild'), /invoke\('move_build', \{ id, to \}\)/);
assert.match(rust, /x\.build_dir = \(dest != home\)\.then\(\|\| dest\.clone\(\)\);/);
});
Expand Down
Loading
Loading