Skip to content

fix: portable mode re-prompting and stray trusted-plugins.json in AppData (#658)#659

Merged
Hirogen merged 4 commits into
Developmentfrom
bugfix/658-portable-mode-persistence
Jul 20, 2026
Merged

fix: portable mode re-prompting and stray trusted-plugins.json in AppData (#658)#659
Hirogen merged 4 commits into
Developmentfrom
bugfix/658-portable-mode-persistence

Conversation

@Hirogen

@Hirogen Hirogen commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Fixes #658.

Settings dialog re-prompting: FillDialog set the portable-mode checkbox programmatically, which fired CheckedChanged and re-ran the full activation flow — copy-settings question dialog plus marker-file creation — on every Tools → Configure while portable mode was active. FillPortableMode now detaches the handler while syncing from preferences and owns the Activate/Deactivate label, so the flow only runs on a real user toggle.

trusted-plugins.json in AppData: PluginValidator's static constructor eagerly loaded (and created) the trust configuration at the hard-coded %APPDATA%\LogExpert path before Initialize could point it at the active configuration directory. The configuration now loads lazily at Initialize/first use, so in portable mode the file lands only in the portable configuration directory. Normal-mode behavior is unchanged.

Regression tests cover both: side-effect-free dialog population (with a timeout guard so a reintroduced modal fails instead of hanging CI) and lazy loading/persisting to the configured directory.

BRUNER Patrick and others added 2 commits July 20, 2026 18:08
…Data (#658)

Opening the settings dialog while portable mode was active fired the
portable-mode CheckedChanged handler during FillDialog, re-running the
activation flow (copy-settings question dialog, marker file) on every
open. FillPortableMode now detaches the handler while syncing the
checkbox from preferences and owns the Activate/Deactivate label.

PluginValidator eagerly loaded the trust configuration in its static
constructor, creating trusted-plugins.json in %APPDATA%/LogExpert
before Initialize could point it at the active (portable) config
directory. The configuration is now loaded lazily at Initialize or
first use, so the file is only ever written to the active directory.
Comment thread src/LogExpert.Tests/Dialogs/SettingsDialogPortableModeTests.cs Dismissed
Comment thread src/LogExpert.Tests/Dialogs/SettingsDialogPortableModeTests.cs Dismissed
Comment thread src/PluginRegistry.Tests/PluginValidatorConfigPersistenceTests.cs Dismissed
@Hirogen
Hirogen merged commit bd7f815 into Development Jul 20, 2026
1 check passed
@Hirogen
Hirogen deleted the bugfix/658-portable-mode-persistence branch July 20, 2026 20:01
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.

Persistence setting "Deactivate Portable Mode" behaves unexpectedly

1 participant