Skip to content

Bug: "New from Template" overwrites existing files (Data Loss) #46

@sudo-Harshk

Description

@sudo-Harshk

Hi! I pulled v0.5.0 and ran a stress test on the new Templates feature.

Overall, the implementation is excellent and handles most edge cases gracefully! However, I found one Critical Data Loss issue that needs immediate attention.

Critical Bug: Silent Overwrite (Data Loss)

The "New from Template" action creates the file immediately without checking if a note with that name already exists.

Steps to reproduce:

  1. Create a note named Data and add some unique text.
  2. Click + New -> New from Template.
  3. Select any template.
  4. Enter the name Data (same as step 1).
  5. Click Create.

Result: The original Data.md is silently overwritten with the template content. The user's original text is lost permanently.
Expected: The system should alert "File already exists" or auto-rename to Data-1.md.

Evidence:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions