Skip to content

Fix Web address lost after Back on the project-name pane - #72

Merged
xroche merged 2 commits into
masterfrom
fix/project-url-reload
Jul 24, 2026
Merged

Fix Web address lost after Back on the project-name pane#72
xroche merged 2 commits into
masterfrom
fix/project-url-reload

Conversation

@xroche

@xroche xroche commented Jul 24, 2026

Copy link
Copy Markdown
Owner

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. validatePane decides whether to load a project's saved profile by comparing the name field against the map's fieldProjectName key, but savePaneFields writes 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 loadedProjectName sentinel and reloads whenever the selection differs from it. The decision is now a pure shouldReloadProfile helper, covered by ProjectReloadTest which reproduces the Back-and-forward regression.

xroche and others added 2 commits July 24, 2026 16:14
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
xroche merged commit 160fa9c into master Jul 24, 2026
5 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant