super-productivity
super-productivity copied to clipboard
WIP: Change save tracked time approach. Issue #2355
Description
Change tracked time approach to only persist on specific actions. I'm not too familiar with angular ngrx store, so I would realy appreciate a review @johannesjo to make sure i'm going in the right way.
Atm, It's persisting time tracked only when pausing the current task/toggleCounters
Issues Resolved
Addresses #2355
Check List
- [ ] New functionality includes testing.
- [ ] New functionality has been documented in the README if applicable.
Looks good so far! Some general remarks:
- We can use a dedicated effect to trigger the
persistTimeTracked
action which imho would feel cleaner
Apart from this, I think this is going in the right direction! Thank you!
This PR has not received any updates in 90 days. Please comment, if this still relevant!
This PR has not received any updates in 90 days. Please comment, if this still relevant!
Hey all, sad to see this got stale after a year. Is there anything we can do to pick up this progress again? I have limited ngrx experience but would be happy to jump in if @johannesjo 's suggestion to create a
dedicated effect to trigger the persistTimeTracked action
is the next move 🏋️♂️
EDIT: I got confused by the notification. Thought this was a new PR :D
@thinktapper this would be very welcome! Thank you very much for the offer!
OLD ANSWER: (leaving this, since the input my still be helpful when starting this)
Hey @hugaleno ! Thank you very much for outlining this! On an ngrx level this looks good. We wouldn't be strictly required to involve ngrx necessarily, but since it is there to help understanding the data flows of the app, it might be helpful. Have you tried the redux dev tools browser extension? If the logs there provide a clear picture of what is going on (with enough information, but not too much noise), then we are on the right track! :)
I am most curious, about how the final model will look like (e.g. changes to AppDataComplete, but also the data written on the disk). Maybe there are also opportunities to shift more data to the archive sync file to make regular sync faster? In my local data the project workStart and workEnd take up almost half the space. But of course that shouldn't be the focus or main goal here.
I think we also should have a mechanism to save the time tracking at least once every one or two minutes, even when it is not paused, to avoid loosing too much data if the app or system crashes.
Not sure, if this is the input you were looking for. Please let me know if you have any other questions!
Thanks, the input is helpful @johannesjo and yes, I find the Redux dev tools wonderful for following data flow and visualizing the store! I should have some time next week to start looking into this work