Repository navigation
Conversation
The viewer app called a handler's downloadCallback before downloading the file shown, and Text used it to save edits not written yet. Without it, a download from the viewer gets the last saved version of a document. The viewer now dispatches `before-download` on the handler's element before its own Download, Ctrl+S and the Files download action. The element hands `waitUntil()` what the download should wait for; a promise that rejects cancels it, with an error. On the element rather than the handler, as that is where the editor and its unsaved state live. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #129 +/- ##
==========================================
- Coverage 92.82% 92.79% -0.03%
==========================================
Files 47 48 +1
Lines 4069 4110 +41
Branches 813 820 +7
==========================================
+ Hits 3777 3814 +37
- Misses 273 277 +4
Partials 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mejo-
approved these changes
Oct 8, 2026
mejo-
left a comment
There was a problem hiding this comment.
One nitpick comment. Otherwise looks good to me.
Co-authored-by: Jonas <jonas@freesources.org> Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
skjnldsv
enabled auto-merge
October 9, 2026 06:56
Contributor
Author
|
Closing: this went in with #130, which also sends |
auto-merge was automatically disabled
October 9, 2026 07:27
Pull request was closed
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 viewer app awaited a handler's
downloadCallbackbefore downloading the file shown, and Text used it to save edits not written yet. This library has no equivalent, so on 36 a download from the viewer gets the last saved version of a document.The viewer now dispatches
before-downloadon the handler's element before its own Download, Ctrl+S and the Files download action. The element handsdetail.waitUntil()a promise; the download waits for it, and is cancelled with an error if it rejects. I put it on the element rather than on the handler registration, since the editor and its unsaved state live there: Text no longer has to find its editor throughwindow.OCA.Text.editorComponents.Component tests cover each of the three paths waiting, and a rejection cancelling with a message. They fail on
main. The Text side is in nextcloud/text#9349👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.