From 727be2ca5cb23d84fa3a336d6320711da2f99e2d Mon Sep 17 00:00:00 2001 From: Rahul Sahani <110347707+Rahul-Sahani04@users.noreply.github.com> Date: Tue, 20 Jan 2026 11:55:18 +0530 Subject: [PATCH] Improve comments in saveModsToConfig function Refactor comments in saveModsToConfig function for clarity. --- backend/core/config.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/backend/core/config.js b/backend/core/config.js index 0082a49..3f048e7 100644 --- a/backend/core/config.js +++ b/backend/core/config.js @@ -151,14 +151,10 @@ function saveModsToConfig(mods) { try { const config = loadConfig(); - // Config migration to profiles handles the structure, - // but here we ensure that if we are saving mods, we save them to the ACTIVE profile - // OR we save to the global pool if that's the design. - // Based on the plan: Profile has "Enabled Mods". - // This function seems to be used to save the list of *Installed* mods. + // Config migration handles structure, but mod saves must go to the ACTIVE profile. + // Global installedMods is kept mainly for reference/migration. + // The profile is the source of truth for enabled mods. - // We'll update the global config for "installedMods" mostly for reference/migration, - // but primarily we should be updating the active profile's mod list. if (config.activeProfileId && config.profiles && config.profiles[config.activeProfileId]) { config.profiles[config.activeProfileId].mods = mods;