ransome1 / sleek

todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)
https://github.com/ransome1/sleek/wiki
MIT License
1.33k stars 104 forks source link

Sleek prompts to open a todo.txt file when it already has one open #521

Closed Piscean closed 11 months ago

Piscean commented 11 months ago

Bug Report

IMPORTANT: Please follow this template strictly when reporting bugs. Providing detailed and accurate information helps the development team to understand and address the issue effectively.

App Version: 1.3.1

Platform: Windows

Installation Method: App Store

Bug Description: Multiple times per day, Sleek will prompt asking me to open or create a todo.txt file. Happens frequently when the laptop is coming out of connected standby or hibernation. But sometimes it just happens while the laptop is awake and in use.

I sync the todo.txt file across machines using Google Drive. My guess is Drive is updating the todo.txt file at the split second Sleek tries to access it and there is a conflict, so Sleek fails and prompts for a new file. (Just guessing)

When Sleek prompts for a new file, it is already displaying the todo items from the file it has been using. You can see that in the screen shot.

Steps to Reproduce:

  1. Setup Sleek to access a todo.txt file in the Google Drive folder of your machine.
  2. Make sure the todo folder is marked to always be available on the drive, not streamed
  3. Allow the computer to go to sleep. Leave it a few hours.
  4. Wake the computer up

Expected Behavior: Sleek should see the file has changed while this machine was sleeping. Sleek should just reload the file and go on with life.

Actual Behavior: Frequently, Sleek will prompt me to open an existing todo.txt file, or create a new one.

Additional Information:

Screenshots: image

System Information:

Reproducibility:

Impact:

Workaround: No work around. I have to reload the todo.txt file each time this happens.

ransome1 commented 11 months ago

Thanks for reporting this. Has been reported a couple of times before with many different syncing setups involved. Dropbox, Syncthing, now Google.

Could you check out the latest developer preview? You'll find it here on GitHub.

It contains a differently configured implementation of the file watcher, which is most likely to be the issue here. I wonder if it also happens with that one.

Piscean commented 11 months ago

I grabbed sleek-2.0.0-dev9-win.exe. I'll run with it and see how it does. Thanks for the prompt reply!

Piscean commented 11 months ago

I haven't seen this problem since switching to the Dev image. I think your changes fixed it. Closing the issue.

Piscean commented 11 months ago

I've been keeping up on the 2.x builds. Is it acceptable to file bugs against those builds, or would you rather I wait until it's officially released?

The specific bug I'm seeing, which is also in the 1.x versions, has to do with the creation date. Actually 2 bugs.

  1. The Settings dialog says "Append creation date when todo is created"
    But since you are putting that creation date at the beginning, it's actually prepending, not appending. (Small issue, who cares.)
  2. The real issue is when that is turned off, Sleek still adds the creation date on Recurring tasks when they are regenerated after the initial task is completed.

Repro looks like this:

  1. Turn Append creation date off in settings
  2. Create a daily recurring event --> Verify the creation date wasn't prepended
  3. Complete that task --> Check the todo.txt file and you'll see the task now has a creation date prepended.

If it's acceptable to file bugs on 2.x, I will file it tomorrow.
Otherwise I'll hold off and hope it gets fixed.

Thanks.

Eric

------ Original Message ------ From: "ransome" @.> To: "ransome1/sleek" @.> Cc: "Eric" @.>; "Author" @.> Sent: 9/15/2023 9:39:07 AM Subject: Re: [ransome1/sleek] Sleek prompts to open a todo.txt file when it already has one open (Issue #521)

Thanks for reporting this. Has been reported a couple of times before with many different syncing setups involved. Dropbox, Syncthing, now Google.

Could you check out the latest developer preview? You'll find it here on GitHub.

It contains a differently configured implementation of the file watcher, which is most likely to be the issue here. I wonder if it also happens with that one.

— Reply to this email directly, view it on GitHub https://github.com/ransome1/sleek/issues/521#issuecomment-1721560769, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQUJ3PSG2WTM7L2AHTEKOTX2SACXANCNFSM6AAAAAA42BWM7Q. You are receiving this because you authored the thread.Message ID: @.***>

ransome1 commented 11 months ago

Hi Eric. Since the recurrence module has been completely re-implemented, it is absolutely ok to open a bug report for this.