It seems like opening multiple tabs to edit the same app can lead to lost changes / confusing behavior. More specifically:
Open the same app in edit mode in two or more browser tabs. Both tabs will have the same components (call them initialComponents)
Make some changes (adding/modifying/deleting components, call this delta1) in the first tab and save changes. The config of the app displayed in that tab and what gets persisted in the db will be initialComponents + delta1
Go to the second tab. If you don’t refresh the page, the state of the app will be the initial one, initialComponents. i.e. ignoring the delta1 changes made in the first tab. If you make changes to this (delta2) and then save changes, what gets persisted to the db will be initialComponents + delta2, not initialComponents + delta1 + delta2
This is not unreasonable behavior (I can see the argument as to why you may not want to save both delta1 and delta2 if there’s a conflict for example), but it’s easy for the user to not realize that the delta1 changes were lost if they keep making changes to the second tab. And while there is a History/Restore option to go back to a previous version, these two paths might diverge.
This happened to me recently: I kept making changes to the second tab while not realizing the changes made in the first tab were lost. By the time I wanted to restore I had already made too many changes to go back.
Ideally Retool should work similarly to Google Docs: if you make changes to one tab, the other tab gets automatically synced. I realize that real-time sync’ing might be too complex to implement in the near future, but would it be possible to at least inform the user that the app components have changed in the db and prompt them to reload? i.e. in Step 3 above, when you go to the second tab, a message gets displayed to the user that the definition of the app has changed in the db and that they might want to refresh the page to reload changes, otherwise those changes would get discarded. Or something along these lines…
I could be wrong and maybe I just forgot to save the changes in the first tab. I did try to reproduce from scratch and the behavior above is what seems to be happening.
@maurizio I can confirm this is the current behavior: we do not have live-syncing of apps being edited between multiple editors or tabs. Things could get weird fast with whole chunks of data getting loaded and reloaded - i.e. query parameters getting changed by one editor and reformatting the return. Notifying editors that some other instance of the same app is open in another tab/editor and giving some options for handling saving as different versions would be a good solution.
Notifying editors that some other instance of the same app is open in another tab/editor and giving some options for handling saving as different versions would be a good solution.
Exactly. I think this would be helpful.
I actually wasn’t aware, but it does look like there is a feature in place to alert you of other editors in the same app. It doesn’t show if a single account has multiple instances of the same app open in the editor, but just if another user is currently editing the app
@alex-w Can you post how it alerts others if someone else is editing? You say there is, but I couldn't find it and for you and maurizio to not know about it at first means it isn't obvious to developers
Ooh, great question! Thank you for asking I'm glad we can have this documented on this thread.
Same app open in multiple tabs doesn't work well, actually. The changes in the different tabs override each other in unpredictable ways, and the app doesn't live update.
Do you have a particular use case for working on the same app in multiple tabs?
Hi all, with our new Multiplayer feature, this should no longer be an issue. You can have an app open in editor mode on multiple browser tabs and the changes will sync to all.