Fix Web address lost after Back on the project-name pane - #72
Merged
Conversation
Selecting an existing project, then going Back and forward again, left the Web address and options empty while keeping the project name. validatePane() decides whether to load the project's saved profile by comparing the field against the map's fieldProjectName key, treating "the map holds this name" as "the profile is loaded". But savePaneFields() writes that key on any navigation away, including a plain Back, which never unserializes. The guard then saw no change and skipped the load, so the URL was never restored. Track the loaded project in a dedicated loadedProjectName sentinel and reload whenever the selection differs from it. The decision is extracted into a pure shouldReloadProfile() helper covered by ProjectReloadTest. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
Review caught a data-loss regression from the previous commit: loadedProjectName was not saved in the instance state, so after a rotation (or process death) on the setup pane it came back null while the map was restored with the user's live edits. The next Back/Next then saw a "changed" project and reset the map, wiping those edits. Persist the sentinel next to the map it tracks. Also fold the reload-guard rationale down to a single copy at the field declaration; the javadoc and call site now just point at it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
xroche
added a commit
that referenced
this pull request
Jul 24, 2026
Beta release carrying the project-name wizard fix (#72): selecting an existing project no longer loses the Web address after navigating Back and forward. Engine unchanged at 3.49.14, so only build.gradle moves. Signed-off-by: Xavier Roche <roche@httrack.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Selecting an existing project, then going Back and forward again through the wizard, left the Web address and options blank while the project name stayed.
validatePanedecides whether to load a project's saved profile by comparing the name field against the map'sfieldProjectNamekey, butsavePaneFieldswrites that key on any navigation away, including a plain Back that never loads the profile. The guard then saw no change and skipped the load, so the URL was never restored.The fix tracks the actually loaded project in a dedicated
loadedProjectNamesentinel and reloads whenever the selection differs from it. The decision is now a pureshouldReloadProfilehelper, covered byProjectReloadTestwhich reproduces the Back-and-forward regression.