Skip to content

Navigation Menu

Sign in
Sign up

fix(Versions): update version only after save with current mtime - #6017

Open
blizzz wants to merge 1 commit into
main from
fix/noid/version-shenanigans
Open

fix(Versions): update version only after save with current mtime #6017
blizzz wants to merge 1 commit into
main from
fix/noid/version-shenanigans

Conversation

@blizzz

@blizzz blizzz commented Aug 31, 2026
edited
Loading

Copy link
Copy Markdown
Member

Summary

  • files_version matches the item's mtime with the node's to consider whether an item is the current one. This often does not match with Date.now() as it does not match real file's mtime
  • fetches the current mtime from the server upon save. This can be avoided, when Collabora also sends the mtime along the Doc_ModifiedStatus message
  • Action_Save and UI_Save actions would trigger updates before the actual save action, meta data cannot be correct at this time
  • There are still edge cases:
    1. The current version is not always detected correctly, leading to "broken" preview image and download link. The image stays until a refresh, the link will work once it turns into a regular version. It is already a lot better.
    2. Sometimes the version generation can take longer (saw it happening once after 2min), in those case the preview and download link do not work. Out of scope here.

Assisted-by: Claude:claude-sonnet-5

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

🏁 Checklist

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

- files_version matches the item's mtime with the node's to consider
 whether an item is the current one. This often does not match with
 Date.now() as it does not match real file's mtime
- fetches the current mtime from the server upon save. This can be avoided,
 when Collabora also sends the mtime along the Doc_ModifiedStatus message
- Action_Save and UI_Save actions would trigger updates before the actual
 save action, meta data cannot be correct at this time
- There are still edge cases:
 1. The current version is not always detected correctly, leading to
 "broken" preview image and download link. The image stays until a
 refresh, the link will work once it turns into a regular version.
 It is already a lot better.
 2. Sometimes the version generation can take longer (saw it happening
 once after 2min), in those case the preview and download link do not
 work. Out of scope here.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Assisted-by: Claude:claude-sonnet-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@elzody elzody Awaiting requested review from elzody elzody is a code owner
@juliusknorr juliusknorr Awaiting requested review from juliusknorr juliusknorr is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

3. to review Ready to be reviewed bug Something isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /