-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session recovery (recovery 4/3) #3323
Conversation
9c09f9d
to
3808111
Compare
One interesting thing about this is that it also paves the way (if we want) to have the behavior like Elementary OS wants for closing an app here: https://docs.elementary.io/hig/user-workflow/closing. If you close and then reopen the app, you go right back to where you left off. |
In that case we should always save the model when it's closed. No more dialog 😄 . |
5265dab
to
051d3e8
Compare
The session id can be used to identify the session, as well as recover changes from unsaved sessions.
Instead of the translated model xml. Now we can add it to the recovery log.
E.i. the ones that have no special context assigned.
Gaphor should not break.
d7947ac
to
7fcb3c0
Compare
bfd5861
to
54bca0c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing @amolenaar, really nice job. This brings so much better reliability to Gaphor with users not having to worry about losing work.
This is an attempt to perfect a way to recover work after Gaphor has crashed, or terminated. The idea is that a user doesn't loose his work in case of a failure.
I see three approaches at this point:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
In #3284, models are recovered by file name. This does not work if:
What is the new behavior?
This PR is an attempt to improve session recording and recovery.
Sessions in the "sessions" folder are automatically restored on startup, also newly created (unsaved) models.
Each session will get a unique id. We can continue a session by providing it the id of a previously interrupted session.
This ensures that event logs are unique, since they're based of a session, instead of a model name. Also, we can record changes made to new models.
Does this PR introduce a breaking change?
Other information