Builder: the ready page names both places when the build files are in a folder the player chose (rest of #623) #1079

Merged
amaralthalesalves merged 1 commit from fix/builder-ready-page-both-places into main 2026-11-09 19:01:53 +00:00
amaralthalesalves commented 2026-11-09 10:13:40 +00:00 (Migrated from github.com)

Refs #600, #623.

This is what's left of #623, rebased on current main as asked there. #623 itself couldn't be reopened. The rest of #623 is already on main through f39868e and the later space changes (55abe59), so this PR holds only the one change main doesn't have:

  • On the ready page, when the build files are in a folder the player chose (Storage.WorkChosen), the text now names both places. Storage.Measure() adds the chosen work folder to the total, but the text only named Storage.Base, so it understated where the space is. Telling the player where the space goes is what #600 asked for.
  • Show folder opens the chosen build files folder in that case, the bigger of the two, instead of the builder's own.

The change is five lines in MainWindow.xaml.cs. I have no dotnet here, so the Windows CI job ("Hookshot Builder package and setup") is what compiles it.

With 55abe59 the build files are deleted after a build unless HOOKSHOT_KEEP_BUILD_FILES=1, so the "can be freed" part of that text mostly appears with that setting. The total still counts the chosen folder either way.

Refs #600, #623. This is what's left of #623, rebased on current main as asked there. #623 itself couldn't be reopened. The rest of #623 is already on main through f39868e and the later space changes (55abe59), so this PR holds only the one change main doesn't have: - On the ready page, when the build files are in a folder the player chose (`Storage.WorkChosen`), the text now names both places. `Storage.Measure()` adds the chosen work folder to the total, but the text only named `Storage.Base`, so it understated where the space is. Telling the player where the space goes is what #600 asked for. - **Show folder** opens the chosen build files folder in that case, the bigger of the two, instead of the builder's own. The change is five lines in `MainWindow.xaml.cs`. I have no dotnet here, so the Windows CI job ("Hookshot Builder package and setup") is what compiles it. With 55abe59 the build files are deleted after a build unless `HOOKSHOT_KEEP_BUILD_FILES=1`, so the "can be freed" part of that text mostly appears with that setting. The total still counts the chosen folder either way.
amaralthalesalves commented 2026-11-09 10:20:43 +00:00 (Migrated from github.com)

The red "Python source checks" is tests/test_program_answer_domains.py, which fails the same way on main at 8b2e1d3 (run 42588468881). This PR only changes builder/HookshotBuilder/MainWindow.xaml.cs. The job that compiles it, "Hookshot Builder package and setup", passes.

The red "Python source checks" is `tests/test_program_answer_domains.py`, which fails the same way on main at 8b2e1d3 (run 42588468881). This PR only changes `builder/HookshotBuilder/MainWindow.xaml.cs`. The job that compiles it, "Hookshot Builder package and setup", passes.
hckrman101 (Migrated from github.com) approved these changes 2026-11-09 18:50:41 +00:00
hckrman101 (Migrated from github.com) left a comment

Looks good. Storage.WorkChosen already goes through Same(), so the equal-path case keeps the old text, and the hunks still line up with main's MainWindow.xaml.cs. Builder package/setup job passes, so it compiles. The red Python source checks fail in tests/test_program_answer_domains.py (undeclared answers_in in the fixture), nothing to do with this change.

Looks good. Storage.WorkChosen already goes through Same(), so the equal-path case keeps the old text, and the hunks still line up with main's MainWindow.xaml.cs. Builder package/setup job passes, so it compiles. The red Python source checks fail in tests/test_program_answer_domains.py (undeclared answers_in in the fixture), nothing to do with this change.
@ -956,2 +956,4 @@
var (total, freeable) = await Task.Run(Storage.Measure);
if (total < 100L << 20) return;
// (both places when the build files are in a folder the player chose: the total counts both)
var where = Storage.WorkChosen ? $"{Storage.Base} and {Storage.Work}" : Storage.Base;
hckrman101 (Migrated from github.com) commented 2026-11-09 18:50:41 +00:00

Nit, not blocking: where is built from the Storage.Base and Storage.Work strings and now has two paths in a sentence, which reads a bit long on a narrow ready page. Fine as is.

Nit, not blocking: `where` is built from the Storage.Base and Storage.Work strings and now has two paths in a sentence, which reads a bit long on a narrow ready page. Fine as is.
Commenting is not possible because the repository is archived.
No description provided.