#6139: Config Reload button not clearing unsaved changes indicator
app: web-ui
Cluster:
Config Management Improvements
## Changes
### 1. Config UI: Fix Reload button not clearing unsaved changes
**Problem:** Clicking the "Reload" button in the Config UI didn't clear the "unsaved changes" indicator, making it appear that changes were still pending even after reloading from the server.
**Solution:** Reset `configFormDirty` flag to `false` before applying the config snapshot in `loadConfig()`, ensuring the form state is properly reset when reloading.
**Files changed:**
- `ui/src/ui/controllers/config.ts`
FIXED #5986
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR updates the Config UI controller to clear the “unsaved changes” indicator when the user reloads configuration from the server. It does so by resetting `configFormDirty` to `false` inside `loadConfig()` before applying the newly fetched `ConfigSnapshot`, which allows `applyConfigSnapshot()` to refresh `configForm`, `configFormOriginal`, and `configRawOriginal` from the snapshot.
This fits the existing state-management approach in `ui/src/ui/controllers/config.ts`, where `configFormDirty` gates whether snapshot application overwrites the user’s in-progress edits.
<h3>Confidence Score: 4/5</h3>
- This PR is safe to merge with low risk; the change is small and localized to config reload state handling.
- The change only affects `loadConfig()` by resetting `configFormDirty` before applying the server snapshot, aligning with existing logic in `applyConfigSnapshot()` that uses the dirty flag to decide whether to overwrite form/raw state. No new APIs or structural changes were introduced.
- ui/src/ui/controllers/config.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#15613: fix(config): align default pipelines across loadConfig and readConf...
by AI-Reviewer-QS · 2026-02-13
75.7%
#12048: fix: deduplicate config warnings to log once instead of on every re...
by mcaxtr · 2026-02-08
74.6%
#8546: Fix/config UI improvements
by RandomRaine · 2026-02-04
74.3%
#20408: Control UI: show refresh in-flight state on Overview
by tanyabrownmac · 2026-02-18
73.9%
#13838: UI: fix config panel CI failures and modularize rendering
by fresed05 · 2026-02-11
73.0%
#20064: UI: fix form overlapping subtitle in config screen
by powerdot · 2026-02-18
72.3%
#15215: fix(UI): Prevent config layout panel from overlapping description text
by Chityalaakhil · 2026-02-13
72.1%
#16991: fix(config): add missing defaults to config snapshot path
by AI-Reviewer-QS · 2026-02-15
72.0%
#11746: fix: treat meta config paths as no-op to prevent unnecessary gatewa...
by QDenka · 2026-02-08
70.7%
#23339: fix: use snapshot.parsed for env ref restoration during migrate
by Mathew-Harvey · 2026-02-22
70.5%