fix(saveas): allow 2nd (and 3rd etc) saveas to work via doc reinit#5719
Open
emberfiend wants to merge 1 commit into
Open
fix(saveas): allow 2nd (and 3rd etc) saveas to work via doc reinit#5719emberfiend wants to merge 1 commit into
emberfiend wants to merge 1 commit into
Conversation
Signed-off-by: Andrew Backhouse <andrew.backhouse@nextcloud.com>
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.
🤖 the code is Claude, but these words are artisanally human.
After a saveas, Collabora currently handles switching to a new document entirely of its own accord with minimal state making it back to Nextcloud. This means that one saveas works okay, but subsequent saveas operations simply don't do anything. They don't change the file name in Collabora and they don't create new files in Nextcloud.
There is a world where it becomes Collabora's responsibility to get state back to the file provider and also handle sequentially opening/creating additional files, but feels like a lot of complexity for minimal gain, so I went with making a saveas reopen the new file from NC's side. The downside is the init flash and increased delay when reloading Collabora.
I don't understand the handshake/lifecycle well enough to be sure of Claude's output (and I see an opportunity for refactoring with the init bit), just wanted to get @elzody and @juliusknorr 's opinions on the approach and the code as-is.