Skip to content

fix(viewer): keep the file's element when an update brings the version already shown - #119

Merged
skjnldsv merged 1 commit into
mainfrom
fix/no-remount-same-version
Oct 6, 2026
Merged

skjnldsv merged 1 commit into
mainfrom
fix/no-remount-same-version

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

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-by trailer.

…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>
@skjnldsv skjnldsv added this to the 2.0.0 milestone Oct 6, 2026
@skjnldsv skjnldsv added type: bug 🐛 Something isn't working AI assisted 3. to review labels Oct 6, 2026
@skjnldsv skjnldsv self-assigned this Oct 6, 2026
@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.07%. Comparing base (b88ba4f) to head (7484d6d).
⚠️ Report is 8 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@skjnldsv
skjnldsv merged commit d5be4b0 into main Oct 6, 2026
21 checks passed
@skjnldsv
skjnldsv deleted the fix/no-remount-same-version branch October 6, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted type: bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant