Repository navigation
Show which note is locked and how to unlock it - #3422
Open
NostalgiaRealm wants to merge 2 commits into
Open
NostalgiaRealm wants to merge 2 commits into
NostalgiaRealm wants to merge 2 commits into
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 13 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
When the server answers 423 Locked for a note, the sync message only said that "a note is open in another app". In practice the lock is often a stale Files Lock entry left behind by the Text app, the note is not open anywhere, and the user cannot tell which note is affected or what to do. The sync error now names the locked note (or counts them), tells the user to close it in the other app or unlock it in the web interface, and the error dialog gets two tips with the concrete steps. Relates to nextcloud#3387, nextcloud#2332, nextcloud#3420 AI-assistant: Claude Code 2.1.309 (Claude Fable 5.1) Signed-off-by: Rick van den Bergh <info@nostalgiarealm.com>
NostalgiaRealm
force-pushed
the
fix/sync-locked-note-message
branch
from
November 3, 2026 01:43
6d4c9ad to
f9ad223
Compare
NostalgiaRealm
marked this pull request as ready for review
November 3, 2026 01:46
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.
I ran into this on my personal nextcloud: 7 notes were “Locked” with no editor open, the oldest since 2026-09-08. These locks make the Notes API return HTTP 423.
Notes Android 35.0.0 shows {"errorType":"Exception"}. Current main says “A note is open in another app. Close it there to sync your changes.” Neither identifies the note, and closing an app doesn’t help when nothing has it open.
This change makes the error more useful:
Following CONTRIBUTING, the wording change replaces error_sync_locked with error_sync_unknown_note_locked. Added error_sync_note_locked, error_sync_notes_locked, error_dialog_tip_note_locked_close and error_dialog_tip_note_locked_unlock.
I reproduced this on my phone using Nextcloud 35.0.2, files_lock 35.0.1 and Text 9.0.1. Opening a .md note through Files Android’s TextEditorWebView and closing it with X left an oc_files_lock entry behind: owner “Text”, type 1, TTL -60. Nobody had the note open, but every subsequent push from Notes returned HTTP 423.
A manual “Lock file” lock set by my own user did not block my own Notes sync. Text app locks and other users’ locks did. In this setup, Files Android’s action sheet only showed “Locked by …”, without an Unlock action; unlocking was available in the web interface.
I tested both main and this branch on my phone and captured:
There’s no before-dialog screenshot: main only shows the technical details there, with no lock-specific guidance.
This doesn’t add a list badge, prevent editing locked notes or provide in-app unlocking. I verified that the owner can clear a Text app lock using DELETE /ocs/v2.php/apps/files_lock/lock/{fileId} with X-User-Lock-Type: 1 on Nextcloud 35.0.2 / files_lock 35.0.1. That would address the “Ideally” part of #3387, but I’d like maintainer input first.
The lock remaining after closing the editor and the missing Android Unlock action are possible follow-ups for nextcloud/text and nextcloud/android.
Checks on 2026-11-03 with Temurin 21:
Relates to #3387 (minimum part: tell the user which note is locked + how to unlock it). Same symptom reported in #2332 and #3420.
AI-assistant: Claude Code 2.1.309 (Claude Fable 5.1)
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)