dondakeshimo / todo-cli

manage todo list at cli
MIT License
5 stars 3 forks source link

Rollback feature #97

Open y011d4 opened 3 years ago

y011d4 commented 3 years ago

I'd like rollback feature to recover the previous state when I make a mistake. Backup feature is also a good choice.

dondakeshimo commented 3 years ago

@y011d4

Thank you for your issue. I agree your point that the app should have backup for convenience.

But, it is hard problem of design. We should decide

My first idea is based on the exist features. If you want to save a checkpoint of current tasks, you write out a json file of current state. So, Our task is just implementation of write or save command which just copy a current task.json .

Second idea is similar to the first that is saving task.json.backup.XX automatically . It is no matter increasing task.json because it is very light file. We should implement auto save feature when some command which change task.json is called, and the command restoring the state specified. (Restoring can be decrement, for example ctrl-z.)

I want to listen to your opinion about design to achieve rollback feature.

y011d4 commented 3 years ago

Sorry for late reply.

I like auto-save feature (2nd op), because I think many people will forget to save manually and make a mistake suddenly. In addition to that, it might be useful to automatically remove backup files before the last one when some time passes (like 1 week, configurable)

dondakeshimo commented 3 years ago

@y011d4

Thank you for your reply! This feature seems nice, so this task is located top of backlog.

If you want to implement the feature by yourself, please tell me. If you not, I'll implement in my free time. (It may be in a month.)

y011d4 commented 3 years ago

tbh, I make a backup by crontab so it's not urgent for me. I thank a lot if you'll implement.