Skip to content

Data loss when Note triggers "automatic read-only" threshold #5717

Closed
TriliumNext/Notes
#1918
@perfectra1n

Description

@perfectra1n
Member
  1. Changed my Text Note "automatic read-only" size to 2000 characters
  2. Pasted something like 1950 characters, saved+refreshed
  3. Type characters past the automatic read-only limit (to something like 2050 characters)

Image

If you keep typing within the Note after this happens, all of your changes are lost since the "bug" happened (and shows duplicated text).

If you have many white spaces while editing, you might not even notice this issue even happening.

Activity

added theissue type on May 8, 2025
perfectra1n

perfectra1n commented on May 8, 2025

@perfectra1n
MemberAuthor

cc @pano9000 since you might find it interesting

changed the title [-]Data loss when transitioning from "editable" Note to "read-only"[/-] [+]Data loss when Note triggers "automatic read-only" threshold[/+] on May 8, 2025
perfectra1n

perfectra1n commented on May 8, 2025

@perfectra1n
MemberAuthor

I personally loathe the "automatic read-only" feature as I think it provides a poor user experience. This is the only application I've ever seen that even has something like this, and I don't think most users even know it's a feature...

It comes as a "surprise" since it wasn't initiated by the user

JYC333

JYC333 commented on Jun 5, 2025

@JYC333
Member

I have tried what you did in the screen record, but I couldn't reproduce it. Is that somehow fixed? Could you try it again in latest develop? Or any specific setup?

perfectra1n

perfectra1n commented on Jun 5, 2025

@perfectra1n
MemberAuthor

Yep, it still happens on the latest develop @JYC333.

  1. Changed my Text Note "automatic read-only" size to 50 characters
  2. Create new Text Note, type in < 50 characters.
  3. If you're on a Desktop App, sync.
  4. After sync, go back to the new Text Note with < 50 characters, type to >50 characters
  5. Hit sync if on desktop (or just wait 5s if you're on the webapp)
  6. Kaboom, duplicated text and data loss 😂
  7. If you keep typing in that Text Note, leave it, and then navigate to it, everything that you typed after the >50 character sync will be lost
JYC333

JYC333 commented on Jun 5, 2025

@JYC333
Member

Ok, so it's happened with sync? I'll try it again tomorrow.

perfectra1n

perfectra1n commented on Jun 5, 2025

@perfectra1n
MemberAuthor

Yeah, the video posted at the top was recorded within Chrome - so the sync was happening "invisibly" :)

eliandoran

eliandoran commented on Jun 6, 2025

@eliandoran
Contributor

For further reference:

  • The issue is not related to the sync, but you need to click near the bottom of the note to trigger a refresh which calculates again whether the note is read-only or not.
  • The issue has existed since the OG Trilium, not a regression on our side.
added theissue type on Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @perfectra1n@eliandoran@JYC333

      Issue actions

        Data loss when Note triggers "automatic read-only" threshold · Issue #5717 · TriliumNext/Trilium