Repository navigation
Show which note is locked and how to unlock it - #3422
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>
6d4c9ad to
f9ad223
Compare
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
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)