Repository navigation
fix(versions): use the mtime Collabora reports instead of the current time - #6221
Open
juliusknorr wants to merge 2 commits into
Open
juliusknorr wants to merge 2 commits into
juliusknorr wants to merge 2 commits into
Conversation
… time The versions tab matches a version against the node's mtime to find the current one. Emitting Date.now() on every modified status change made the real current version look like an old one, with a broken preview and a download pointing at a version file that does not exist. Take the storage mtime from Doc_LastModifiedTime and fall back to fetching the node on close for Collabora versions that do not send it. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
juliusknorr
marked this pull request as ready for review
October 23, 2026 13:08
Member
Author
|
/backport to stable35 |
Member
Author
|
/backport to stable34 |
Member
Author
|
/backport to stable33 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Alternative to #6017.
Richdocuments emitted
files:node:updatedwithDate.now()as mtime on everyDoc_ModifiedStatus,Action_Save,UI_Save, rename and close. The versions tab then no longer recognizes the real current version: broken preview, and opening it requestsfiles_versions/<file>.v<mtime>, which does not exist (getFile failedin the log).Fetching the node after
Doc_ModifiedStatusis not enough either, since that fires before Collabora uploads to storage, andAction_Save_Respis not sent for autosaves.Doc_LastModifiedTime, the storage mtime Collabora gets back from PutFile/CheckFileInfoNeeds the Collabora change forwarding
lastmodtimeasDoc_LastModifiedTime(https://gerrit.collaboraoffice.com/c/online/+/17024).Backports: stable33/34 should keep emitting immediately, as their viewer does not reload the editor on
files:node:updated.Intentionally left out: a save Collabora makes while closing lands after the editor is gone, so the emitted mtime can be the one from the save before. Fixing that needs the server to push the new mtime (e.g. via notify_push) to the files app, which then updates the node, independent of the editor.
TODO
Checklist