ayoisaiah / focus

A fully featured productivity timer for the command line, based on the Pomodoro Technique. Supports Linux, Windows, and macOS.
https://github.com/ayoisaiah/focus
MIT License
437 stars 21 forks source link

Focus panics when attempting to resume a deleted session #34

Closed ayoisaiah closed 10 months ago

ayoisaiah commented 10 months ago

Tick this box to confirm you have reviewed the above.

What version of Focus are you using?

focus v1.4.2

How did you install Focus?

Go toolchain

What operating system are you using Focus on?

Fedora 39

What is your Focus configuration?

work_mins: 50 work_msg: Focus on your task short_break_mins: 10 short_break_msg: Take a breather long_break_mins: 30 long_break_msg: Take a long break long_break_interval: 4 notify: true auto_start_work: false auto_start_break: true 24hr_clock: false sound: '' sound_on_break: false work_sound: loud_bell break_sound: bell

Describe your bug.

Panic when resuming a deleted session

What are the steps to reproduce the behavior?

  1. Start a new session
  2. Pause session with Ctrl-C
  3. Delete session with focus delete
  4. Type focus resume -s to resume interrupted session (which was just deleted)

What behaviour did you observe?

image

What is the expected behaviour?

Such occurrences could be prevented by deleting all references to the session once it is deleted

jonnieey commented 8 months ago

This still occurs in v1.4.2 installed via go toolchain 2024-01-19-181208

ayoisaiah commented 8 months ago

@jonnieey I can't reproduce it anymore:

image

Can you please provide the steps to reproduce?

Or please upload your log file here (~/.local/share/focus/log/focus.log)

ayoisaiah commented 8 months ago

@jonnieey Update to v1.4.3 please