TheNextLvl-net / commander

Remove, hide or change or query permissions of commands
GNU General Public License v3.0
1 stars 0 forks source link

Autosave Feature and Enhanced Conflict Resolution for Configuration Changes #24

Open marat2509 opened 1 month ago

marat2509 commented 1 month ago

What feature do you want to see added?

I would like to request the addition of an autosave feature that triggers after every command execution that modifies the configuration. This feature ensures that any changes made to the configuration are immediately saved, reducing the risk of losing important settings due to unexpected errors or conflicts. After each relevant command, the system should automatically save the updated configuration.

Additionally, I request the implementation of the conflict resolution logic as outlined in the attached diagram. This logic involves automatically detecting conflicts between the live configuration and the saved configuration files and offering clear options to resolve them. Users should be able to choose between force-overwriting the configuration file with the current live configuration or reloading the configuration from the file to the live system, ensuring consistency and minimizing errors.

Are there any alternatives?

Currently, the alternative involves manually saving the configuration after each change, which can be easily forgotten, leading to potential data loss. For conflict resolution, manual editing of the configuration files is possible but is labor-intensive and susceptible to errors

Anything else?

Implementing these features would significantly enhance the reliability and ease of use of the system. Autosaving after each command execution ensures that important configurations are consistently preserved without requiring manual intervention. Meanwhile, the enhanced conflict resolution logic would streamline the process of handling configuration discrepancies, ensuring smoother and more error-resistant operations.

Most importantly, thank you for your contributions to the open source community ❤️

NonSwag commented 1 month ago

Thanks for your suggestion and the work you put into it I would love to implement this feature but have concerns this could have a heavy impact on performance. Saving after each change will not be a problem but reading the file before saving could.