Priority
P3
Context
Found during a static DRY/KISS/SPoA/SPoT/Clean Code regression audit of main at commit 874b1d74381af65d3d95b955a5bea6c7680876a9 (0.5.0.30).
This is distinct from issue #23, which addressed duplicate refreshes inside VisualProfileManagerForm during its own local commits.
Problem
ConfigurationForm subscribes to SettingsCoordinator.Changed and calls RefreshProfiles for external settings changes. Changes made in the modal VisualProfileManagerForm are therefore synchronously reflected in the configuration form.
ConfigurationForm.ManageVisualProfiles nevertheless calls RefreshProfiles unconditionally after VisualProfileManagerForm.ShowManager returns.
As a result:
- if profiles were changed, the configuration form refreshes through
Changed and then refreshes again when the dialog closes;
- if no profiles were changed, closing the dialog still performs a full grid bind.
Impact
- unnecessary rebuilding of the application grid and selector options;
- avoidable selection-change events and UI work;
- possible visible selection movement or flicker;
- two mechanisms decide when the same view must refresh.
Proposed direction
Remove the unconditional post-dialog RefreshProfiles call from ManageVisualProfiles. Keep SettingsCoordinator.Changed as the single source of the refresh decision.
If a non-settings UI state truly requires refresh after dialog closure, update only that state explicitly rather than rebinding all profiles.
Acceptance criteria
Priority
P3
Context
Found during a static DRY/KISS/SPoA/SPoT/Clean Code regression audit of
mainat commit874b1d74381af65d3d95b955a5bea6c7680876a9(0.5.0.30).This is distinct from issue #23, which addressed duplicate refreshes inside
VisualProfileManagerFormduring its own local commits.Problem
ConfigurationFormsubscribes toSettingsCoordinator.Changedand callsRefreshProfilesfor external settings changes. Changes made in the modalVisualProfileManagerFormare therefore synchronously reflected in the configuration form.ConfigurationForm.ManageVisualProfilesnevertheless callsRefreshProfilesunconditionally afterVisualProfileManagerForm.ShowManagerreturns.As a result:
Changedand then refreshes again when the dialog closes;Impact
Proposed direction
Remove the unconditional post-dialog
RefreshProfilescall fromManageVisualProfiles. KeepSettingsCoordinator.Changedas the single source of the refresh decision.If a non-settings UI state truly requires refresh after dialog closure, update only that state explicitly rather than rebinding all profiles.
Acceptance criteria