feat(home): a track and a version to pick on the home, and one button that plays, updates, goes back to or builds it #180
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!180
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/LongshotLauncher:feat/home-version-picker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Picking a version to play, build or go back to was split across three places: Play only ever started the default, a new track went through the Build another version dialog, and going back sat behind the clock icon on a row. This puts it all on the home: pick a track and a version, and one button does the right thing for it.
What it looks like
On the left of the home (where the default version's name, Play and Update were):
Core/VersionPick.cs):JobKind.Update; one build per track).Choices made
Core/OtherVersions.csis replaced byCore/VersionPick.cs, its checks moved and extended (tests/launcher_core/VersionPickChecks.cs).CanStartBuild).DeleteViewModelunchanged, so it follows #176's Delete (taking a version's own save in, or backing it up, first). Related: #176.Translations
The new texts (TRACK, VERSION, Installed, default, newest, none installed, {0} installed, Installed. {0}., and the two hints) are in every full catalog, written by an AI assistant: a native speaker should check them, especially the word chosen for "track" (I used each catalog's existing word for channel). The texts of the removed dialog are dropped from the catalogs.
Testing
python -I tests/test_launcher_core.py: 1547 checks passed (the new VersionPick checks: a track's versions and their marks, no answer yet, installed nightlies the server dropped, unordered versions, several builds on a track; Play / Update / Go back / Build for each case).python -I tests/test_release.py: 37 tests OK.dotnet build App -c Release: 0 warnings, 0 errors.tools/screenshots(home-versions,home-tracks,home-go-back,home-build-track, and the row scenes renamedhome-row-opened*); the PNGs are in the comment below. Before and after, againstmain: #180 (comment)Screenshots from tools/screenshots (headless): the Version dropdown open, the Track dropdown open, an older nightly picked (Go back to), a track with no build picked (Build), a second row selected (the dropdowns follow it), and an installed version with an update (Play, Update, Remove).
Screenshots: before and after
Drawn with
tools/screenshots(headless, the same scenes and window on both sides): before frommain@321a9e1, after from this branch.The home with an update
Before
After: the Track and Version dropdowns in the hero, Play / Update / Remove under them.
A version's row opened
Before: Other versions (the clock) beside Saves.
After: Saves, Open folder, Delete; no clock.
A second version's row opened
Before
After: the dropdowns follow the row.
Going back to an older version
Before: the Other versions dialog.
After: the Version dropdown, then Go back to.
New screens: no before
The Track dropdown open, and a track with no build picked (Build).
The channel picker (Build another version) is unchanged by this PR and has no scene, so it isn't shown.
Before and after screenshots added.
WIP: feat(home): a track and a version to pick on the home, and one button that plays, updates, goes back to or builds itto feat(home): a track and a version to pick on the home, and one button that plays, updates, goes back to or builds itAfter the rename: Your instances
The list's heading is now Your instances (
6ed6a3e), in all 12 languages. Drawn withtools/screenshots(headless), the same scenes as the earlier after shots; nothing else on these screens changed.6ed6a3ef09eca781b139Review after the merge, posted as a comment: the forge takes no review on a merged pull request.
Verdict: Request changes. On the Release candidate track the button says "Build vX … into a folder of its own" for a stable version the player already has, but it rebuilds their stable build in its own folder and moves it onto the rc track, so a stable player starts getting release candidates as updates. The rework of the first screen every player sees has also not been run in the real window: no Play, Go back or Build from the new button, and no keyboard or controller pass. This PR was merged (
1289a75) before this review, so both points need a follow-up before the next stable.For a player, the home now puts choosing a version, going back and building another track in one place: a Track and a Version dropdown, and one button that plays, updates to, goes back to or builds the version picked. It replaces the clock dialog on each row. On net it is a better home and simpler code (
VersionPickreplacesOtherVersionsand the dialog's view model, with core checks). It costs one case that main's channel picker labelled honestly ("Rebuild vX") and the home now mislabels, below.Reviewed:
eca781b1against7a4a61e7(its fork point on main, after #170):Core/VersionPick.cs,App/ViewModels/HomeViewModel.cs(the diff, plusGo,ShowPick,Select,SetDefault,DeletingandCanStartBuildaround it),App/Views/HomeView.axaml,App/LauncherService.cs,tests/launcher_core/VersionPickChecks.cs,tools/screenshots/Program.cs,README.md, the removedVersionPickerViewModel/OtherVersions, plusBuildJob,MainViewModel.StartWizard,BuildStepViewModel.Complete,BuildRegistry.AddandReleaseManifest.OnChannel, which the new button relies on. I checked the 15 catalogs for every new and removed key and only skimmed their wording. Nothing was run (a code review). I also read main after the merge, where #179 landed on top.Fixed in this review: nothing (already merged).
Checked and fine:
StartWizard→ files step), whose start button says what it will do. The old dialog did the same.BuildRegistry.Replace, so the default flag stays on that row. Set as default moves the dropdowns to that build, and Remove reusesDeleteViewModelwith its confirmation and #176's save handling.CanStartBuild, raised inBusyChanged). A build being deleted can't be played or replaced.Shortcuts.MadeAtReady), which this PR doesn't touch, so a portable launcher still makes none unless ticked. New folders still come fromBuildsFolder, the portable builds folder.OtherVersions,VersionPickerViewModel,HeroVersionorHeroChannel.VersionPickchecks test behaviour: rc lists the stables but doesn't mark a stable-channel build as installed, dev versions sort last, and a nightly the server dropped is still listed.Blocking (for the follow-up)
App/ViewModels/HomeViewModel.cs:320and:381, withCore/VersionPick.cs:63: a version installed on another track is planned as a new build and described as one, but it is started as a Rebuild of that other track's build.OnChannel(rc)lists every release, so its newest is v3.1.0, andShowPickpicks it.Planonly looks at rc builds and finds none, so it returnsBuild. The button reads "Build v3.1.0" and the line under it says "Nothing on this track yet: it is built into a folder of its own".Go()finds the stable build by version and startsJobKind.Rebuildwith channelrcin the stable folder. When the build completes,BuildRegistry.Add(FindByFolder) setsentry.Channel = "rc". Their default now sits on the rc track, the stable track says "none installed", and Update offers release candidates.Plansee a version installed on any track. Either play that build, as it is the same version, or give the case its own action with an honest label. Don't leave it as a Build the App layer quietly turns into a Rebuild. Add a check inVersionPickChecksfor it.Run it in the real window before the stable. risk/high, and the description says only headless screenshots ran and no build was started from the new button. Wanted:
Avalonia's ComboBox changes its selection on Up/Down (and, I believe, the mouse wheel) while closed and focused. On the home that turns Play into "Go back to vX" or "Build vX" under the player's thumb. It only opens the wizard, but it needs checking on the Deck. If it happens, consider opening the list on Enter/A only.
Suggestions (the author may take or leave)
HomeViewModel.cs:857→Refresh→ShowPick), the pick stays on the removed version. The same button then reads "Go back to vX" (another build on the track) or "Build vX". Putting the pick back on the default after a delete would avoid a second press landing in a wizard for the default.Go(),ShowPick()and the Build→Rebuild branch live in the App layer, which no check reaches. Moving "which version to pick when the track changes" and "what Go starts" intoVersionPickwould put them under the core checks.PlayDefaultCommand(HomeViewModel.cs:459) is no longer bound by any view.pickTrackthat matches noTrackChoice, so the Track box shows empty. That is probably fine for test builds only.Testing: the author reports 1547 core checks, 37 release tests and a clean
dotnet build, and posted headless screenshots before and after for each scene in the comments. CI's compile-and-test was skipped (manual dispatch). Nothing was run in a real window, no build was started from the new button, and there is no keyboard or controller pass. That is blocking point 2.Overlaps and merge order: #179 (cold build) merged right after this one, on top of it (
8594b47). It touches the wizard, the build step and the problem view, not the home. Its README andtools/screenshotsadditions merged cleanly beside this PR's, and main has no stale reference, so there is no conflict.