fix(builder): the first page offers the update again after one that stopped (#2129) #2141
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!2141
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/builder-update-back"
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?
Part of #2129. After an update that stopped, Back left the builder on a first page it couldn't use: a grey "Build the game" with no game files, until the app was closed and opened again.
The first page's button is left alone while an update runs (
RefreshModereturns at once), and nothing let that go when the update stopped or was cancelled. A start with--updatealso goes past the first page's setup, so the game files, the saved choices and the release check never ran. Back and a cancelled run now go through one function: when an update is what stopped, it lets the button go, and if the page was never set up it does what the start does, for the update's folder rather than the last build's. A build that stopped goes back as before. The Python builder has the same flow and the same change.The report also says the update itself failed several times. It gives no error text, so that part isn't addressed here.
Testing
--updateon a stand-in game folder (v2.0.14,HOOKSHOT_LATEST_TAG=v9.9.9) so the update stops at once, then Back pressed. On main the first page shows a grey "Build the game". With this change it shows "Update available" and an enabled Update button.tests/test_builder_update_back.pypasses (7 tests) and fails on main (5 failures, 1 error). It runs the Python builder's own functions on a stand-in window and reads the C# for the same shape.This looks right to me. I traced the flows in
builder/HookshotBuilder/MainWindow.xaml.cs.RefreshModereturns early whileupdatingis set (line 177).BeginUpdatesets it, and onlyRun(keepRows: false)cleared it before. So after a stopped update the first page kept its old button, and after a--updateor--launchstart the page had never been set up at all. Routing Back and the cancelled path throughToFiles()(line 133) fixes both cases:updatingand callsRefresh().Start(), and it keeps the update's folder instead of the last build's.The download-failure path (
DownloadFailed→ShowProblem→ Back) goes throughToFiles()too, so that case is covered. The Python builder'sback()andfound_go()mirror it, including the folder being kept.tests/test_builder_update_back.pypasses here, as do the otherbuilder_checks I could run (the twodotnetones were skipped on this machine). CI is green.One thing to consider, not blocking: in
ToFiles()the page is shown andupdatingis cleared beforeawait Task.Run(Finder.FindDumps). During that wait the player could change the output folder or the files, andApplySettings()would then overwrite those changes. The button is still grey during the wait, so this is cosmetic. If you want to close the gap, callShowPage(FilesPage)after the setup.github-sync referenced this pull request2026-11-12 06:22:54 +00:00