fix: initialize the writable Text editor only when needed - #2832
Open
arminfabritzek wants to merge 6 commits into
Open
arminfabritzek wants to merge 6 commits into
arminfabritzek wants to merge 6 commits into
Conversation
Signed-off-by: arminfabritzek <armin@starmin.de>
Signed-off-by: arminfabritzek <armin@starmin.de>
Verify attachment files and persisted Markdown after reload. Wait for completed Text initialization before the WebDAV probe, and exercise initialization rejection, navigation and save failures. Signed-off-by: arminfabritzek <armin@starmin.de>
Await Text document readiness, serialize explicit attachment actions and keep their editor tied to the original page. Verify saved Markdown over DAV, report partial failures and allow initialization retries. Use reader attachment metadata in preview, including after editing. Signed-off-by: arminfabritzek <armin@starmin.de>
Retry the explicit save when legacy Text resolves before the current Markdown reaches DAV. Keep the retry bounded and reject false or failed saves; cover stale-first-save recovery with a unit test. Signed-off-by: arminfabritzek <armin@starmin.de>
Signed-off-by: arminfabritzek <armin@starmin.de>
arminfabritzek
marked this pull request as ready for review
October 1, 2026 14:15
arminfabritzek
requested review from
max-nextcloud,
mejo- and
silverkszlo
as code owners
October 1, 2026 14:15
This branch has not been deployed
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.
📝 Summary
Reading a Collectives page currently initializes a writable Text session and can lock the Markdown file against WebDAV updates. Defer that session until editing or an explicit attachment action, while keeping preview attachment metadata available through the reader.
Attachment rename/delete operations wait for editor readiness, verify saving before changing the file, update references, and verify the persisted Markdown afterwards. Page-bound initialization and serialized actions handle navigation and late callbacks. Partial failures retain an editor for retry and show an explicit warning. Transient Text save results are retried within a bounded loop; success requires a matching DAV readback, including checking that the editor has not changed during that readback.
Validation
Nextcloud 35.0.1 / Text 9.0.0 / Chromium 153:
Limitations: the existing public writable-share test also fails on the baseline and remains unresolved. The latest correction was not rerun on NC33 or other browser engines. Attachment file changes and Markdown persistence are not atomic; no automatic unlock or force-save is introduced. No complete E2E or version-matrix claim.
Development and review transparency
I developed this change with AI coding assistance and personally performed the manual UI acceptance checks listed above. AI coding agents ran the automated tests and reviewed the implementation in multiple rounds; those reviews identified attachment regressions, which were corrected and tested again. AI review and passing tests do not replace a human code review.
I am contributing as a user and cannot provide an expert code review myself. This implementation has not yet received a human code review. I would appreciate review by a maintainer or another experienced contributor, especially of editor lifecycle handling, attachment mutations and save confirmation. I am submitting it for review, not claiming it is ready to merge.
🚧 TODO
🏁 Checklist
🤖 AI (if applicable)
The AI checkbox remains unchecked because manual UI testing is complete, but a human review and comprehension of the implementation are still pending.