zed-industries/zed · error

not implemented

Error message

not implemented

What it means

The settings UI can persist changes to different settings files. Writing back to a `SettingsUiFile::Server` (server settings UI) is not yet implemented, so the code calls `unimplemented!()`, panicking with the Rust default message 'not implemented'. It's a known TODO in the settings UI feature.

Solutions

  1. Avoid saving changes from the server settings UI until write-back is implemented; the UI should mark Server edits read-only.
  2. Implement the Server arm by serializing a server settings update (similar to the User arm) if you own this feature.
  3. Gate the save action on `SettingsUiFile` kind so Server files are disabled or show an 'unsupported' notice instead of panicking.

Example fix

// before
SettingsUiFile::Server(_) => unimplemented!(),
// after
SettingsUiFile::Server(_) => {
    Err(anyhow!("saving server settings is not yet supported"))
}
Defensive patterns

Strategy: validation

Validate before calling

// gate the save path on the file kind
if matches!(file, SettingsUiFile::Server(_)) {
    return Err(anyhow!("saving server settings is not supported"));
}
write_settings(file)?;

Type guard

fn is_writable(file: &SettingsUiFile) -> bool {
    !matches!(file, SettingsUiFile::Server(_))
}

Prevention

When it happens

Trigger: Editing a setting in the Server settings UI tab and saving, which routes the update through `write_to_file`/the update path reaching `SettingsUiFile::Server(_) => unimplemented!()`.

Common situations: Users or tests opening the server settings pane in the settings UI and attempting to save any change before server settings write-back was implemented.

Related errors


AI-assisted analysis of zed-industries/zed@916fc2b8cb (2026-09-19). Data as JSON: /api/errors/12ce315567190a25. Report an issue: GitHub.

Appendix: source

Thrown at crates/settings_ui/src/settings_ui.rs:4728

    update: &mut dyn FnMut() -> Box<dyn Send + FnOnce(&mut SettingsContent, &App)>,
) -> Result<()> {
    telemetry::event!("Settings Change", setting = file_name, type = file.setting_type());

    match file {
        SettingsUiFile::Project((worktree_id, rel_path)) => {
            let rel_path = rel_path.join(paths::local_settings_file_relative_path());
            let Some(settings_window) = window.root::<SettingsWindow>().flatten() else {
                anyhow::bail!("No settings window found");
            };

            update_project_setting_file(worktree_id, rel_path.into(), update, settings_window, cx)
        }
        SettingsUiFile::User => {
            // todo(settings_ui) error?
            SettingsStore::global(cx).update_settings_file(<dyn fs::Fs>::global(cx), update());
            Ok(())
        }
        SettingsUiFile::Server(_) => unimplemented!(),
    }
}

struct ProjectSettingsUpdateEntry {
    worktree_id: WorktreeId,
    rel_path: Arc<RelPath>,
    settings_window: WeakEntity<SettingsWindow>,
    project: WeakEntity<Project>,
    worktree: WeakEntity<Worktree>,
    update: Box<dyn FnOnce(&mut SettingsContent, &App)>,
}

struct ProjectSettingsUpdateQueue {
    tx: mpsc::UnboundedSender<ProjectSettingsUpdateEntry>,
    _task: Task<()>,
}

impl Global for ProjectSettingsUpdateQueue {}

View on GitHub (pinned to 916fc2b8cb)