You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Let other apps change a file that is open in Text, as one more collaborator #9701
Is your feature request related to a problem? Please describe.
Apps that store their data as Markdown files (for example a Kanban app keeping each card as a card.md with YAML front matter) need to change those files while a person may have them open in Text. Today the app either gets 423 Locked (Text's lock, even after #9674 while someone is typing) or, when no lock is held, its write makes Text reset the document session (DocumentContentUpdatedListener → resetDocument(force: true)), so the open editor reloads and may lose steps that were not yet saved.
Describe the solution you'd like
A server-side API (for instance an OCP interface or an event that apps can dispatch) to apply a change to a document that has an active session: Text turns the new content, or a patch, into a Yjs update and broadcasts it to the open editors like a change from another collaborator, then saves as usual. No lock refused, no reset, nothing lost, and everyone sees the change live.
Describe alternatives you've considered
Writing inside Text's lock scope (ILockManager::runInScope with Text's app lock): the write goes through, but the session is still reset.
Observed on Nextcloud 34.0.1 / Text 8.0.0 with files_lock, server-side encryption: with a Text session holding one unsaved step, another app's putContent() gets ManuallyLockedException; once Text's lock is released (as #9674 does after 5 minutes), the write goes through and the document is reset: the unsaved step and the session are deleted.
Related: #9628, #9674, #9673, #3571 (front matter editor).
Also asking: could #9673 and #9674 be backported to stable34?
Activity