Repository navigation
fix(viewer): keep the file's element when an update brings the version already shown - #119
Merged
Merged
Conversation
…n already shown Text announces each of its own saves with files:node:updated, and the viewer remounted the file shown on any update of it: every autosave rebuilt the editor under the user, and an edit made after a save could be lost. The element is now remounted only for another version of the file. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #119 +/- ##
==========================================
+ Coverage 91.05% 91.07% +0.02%
==========================================
Files 41 41
Lines 3421 3430 +9
Branches 790 792 +2
==========================================
+ Hits 3115 3124 +9
Misses 288 288
Partials 18 18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5 of 6 tasks
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.
Text announces each of its own saves with
files:node:updated, and the viewer remounted the file shown on any update of it, so every autosave rebuilt the editor under the user. Text's end-to-end tests on nextcloud/text#9235 fail on it: "saves again within 12 seconds" never saves the second edit, a conflict test sees one where there is none, and Cypress finds the elements it types into detached.The element is now remounted only when the update carries another version of the file (its etag) than the one shown. A change saved elsewhere still shows afresh, and the image editor's own saves keep their existing handling.
Tested with an update of the same version, which fails on
main, and of another one. Built into Text locally, the two Playwright tests above pass, twice each; with 2.0.0-beta.15 they fail.👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.