Priority
P2
Context
Found during a static KISS/DRY/SPOA/SPOT/Clean Code audit of main at commit 2197699d853a1e1446adcbd7ccdd98fcc02692bd.
Problem
VisualProfileManagerForm subscribes to SettingsCoordinator.Changed, and its handler rebuilds the profile grid. SettingsCoordinator.Commit raises that event synchronously before returning.
After a successful local commit, the manager then calls RefreshProfiles(result.Value) again. Each create, duplicate, rename, edit, or delete operation therefore performs two full grid rebuilds.
Impact
- unnecessary UI work and possible flicker;
- transient selection changes during the first refresh;
- more complicated reasoning about which refresh owns the final selection;
- behavior differs from
ConfigurationForm, which already suppresses its own synchronous refresh during grid commits.
Proposed direction
Add a local-commit suppression flag or equivalent scoped mechanism:
- suppress the form's
Changed handler while its own commit is executing;
- refresh exactly once after the result is known;
- preserve/select the intended profile ID.
External settings changes must continue to refresh the manager normally.
Acceptance criteria
Priority
P2
Context
Found during a static KISS/DRY/SPOA/SPOT/Clean Code audit of
mainat commit2197699d853a1e1446adcbd7ccdd98fcc02692bd.Problem
VisualProfileManagerFormsubscribes toSettingsCoordinator.Changed, and its handler rebuilds the profile grid.SettingsCoordinator.Commitraises that event synchronously before returning.After a successful local commit, the manager then calls
RefreshProfiles(result.Value)again. Each create, duplicate, rename, edit, or delete operation therefore performs two full grid rebuilds.Impact
ConfigurationForm, which already suppresses its own synchronous refresh during grid commits.Proposed direction
Add a local-commit suppression flag or equivalent scoped mechanism:
Changedhandler while its own commit is executing;External settings changes must continue to refresh the manager normally.
Acceptance criteria
SettingsCoordinator.Changedevents still rebuild the grid;