## Context `update_settings_file` deletes unrelated settings when the settings file contains deprecated keys that need migration. For example, changing the model from the Agent Panel overwrites the entire `agent` block instead of just updating `default_model`. The root cause is that `edits_for_update` used `parse_json_with_comments` (strict parser), which returns `Err` on deprecated/unknown fields. The error is swallowed by `log_err()`, falling back to `Default::default()` (empty settings). The diff then sees everything as new and replaces the entire block. The fix switches to `parse_json` (the fallible/lenient parser), which returns `Some(parsed_value)` even when deprecated fields are present - the same pattern already used by `parse_and_migrate_zed_settings`. ## Fixes #41344 ## How to Review Single-file change in `settings_store.rs`, focus on `edits_for_update` . Compare with `parse_and_migrate_zed_settings` (line 702) which already uses the same `parse_json` approach. ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Video [Screencast from 2026-03-21 00-36-12.webm](https://github.com/user-attachments/assets/31bd584a-2674-4c91-bdb2-69ed8fa35e88) ### Note : Reopens previous work from closed PR #52081 (fork was deleted) Release Notes: - Fixed settings being overwritten when updating a single setting via UI while the settings file contains deprecated keys.
4 files changedLine totals unavailable