Repository navigation
Per-game activity, part 2: background installs, installers, actions by id - #55
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per-game activity, part 2: background installs, installers, actions by id
Follows #53 (Steam downloads per game). Every install and removal now runs as a background job of its own game, beside any other game's job and beside the one running game.
AppStateis the game session only.Background jobs (
src/main/game-jobs.ts)AppState. Each job owns its abort controller and process and shows up as the game's activity. Jobs never raise the window: a result is a notification (game-installed/game-uninstalled, newgame-install-failed/game-uninstall-failedwith the reason). The error popup appears only while the launcher has focus.<install dir>.partialand are moved into place only when complete and holding the executable. A stopped copy leaves nothing that looks installed..playhook-installingmarker for the run, the installer, then the grace poll for the executable. A stopped or failed run sweeps the install dir.startVerdict, pure):PLAYHOOK_MAX_PARALLEL_COPY_INSTALLS(2) copies andPLAYHOOK_MAX_PARALLEL_INSTALLERS(1) installer runs at once;action:cancel-jobwith the id) for a queued or running install.game-gone).Linux:
ProvisionLockwinetricks shares one download cache and takes no lock, so
ensurePrefixDepsruns one at a time across games. A launch with nothing to provision does not wait. umu-launcher 1.4.1 already serializes its runtime, Proton download and prefix setup withflock(spike result, read from the sources; to be confirmed on the Deck).Quit with work in progress (
src/main/quit-gate.ts)quit:confirm/quit:confirm-reply. The question queues behind an open question, error or work popup (deferred-questions.ts). If the window does not confirm it is asking withinPLAYHOOK_QUIT_CONFIRM_ACK_MS, a native dialog asks instead.PLAYHOOK_QUIT_GRACE_MSfor the jobs to clean up. Orphaned.partialdirs are swept on start.Actions by id
action:launch/action:uninstallcarry the game id.GameActions(game-actions.ts) resolves the target with the pureresolveActionTarget(action-target.ts): while a game runs, another game can be installed (Steam or a job) or removed, never launched.screenActionsinstate-view.tsdecides Play / Install / Uninstall / Cancel / Force close and the Play view from the game on screen. Force close shows only on the running game's screen. Another game's Play is shown but inactive (data-play-locked).Cleanup and docs
installing/uninstallingare gone fromAppState.game-controller.ts1468 → 1397,createControls672 → 611.Also included
.acfreads as unknown, not as uninstalled — the fix the red checks on Release: v0.9.0 #47 need. Also opened alone as Steam: a half-written .acf reads as unknown, not as uninstalled #54; whichever merges first, the other merges cleanly.Tests
New:
game-jobs(queues, cancel, atomic copy, installers, gamescope and session rules);quit-gate,confirm-quit,provision-lock,action-target(full matrix);state-view(screenActionscombinations);controls(cancel item, quit popup and its queue, actions while another game runs).game-controller.test.ts:typecheck,lint,vitest(1479) andnpm run buildare green locally.Not covered here
Manual runs on the Deck (Game Mode and Desktop) and on Windows, from the plan's checklists: