← Back to PRs

#6139: Config Reload button not clearing unsaved changes indicator

by saurabhssonkar open 2026-02-01 09:54 View on GitHub →
app: web-ui
## 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