Skip to content

fix: prevent UI freeze when running post-commands#17

Merged
Bahaaio merged 9 commits intomainfrom
fix/post-command-timeout
Feb 11, 2026
Merged

fix: prevent UI freeze when running post-commands#17
Bahaaio merged 9 commits intomainfrom
fix/post-command-timeout

Conversation

@Bahaaio
Copy link
Owner

@Bahaaio Bahaaio commented Feb 11, 2026

Post-commands (then) previously blocked the UI until they finished, causing the app to freeze.
They now run in the background with a timeout, and pomo stays responsive throughout.

Changes

  • Post-commands run with a 5-second timeout
  • When quitting, pomo waits for running commands to finish and shows a waiting screen, Press q to force-quit
  • Commands are cancelled immediately when confirming to start next session (onSessionEnd: "ask")
  • Ignore non-quit keys during waiting screen
  • Fixed duplicate confirm tick messages
  • Removed the 50ms sleep between post commands

Waiting Screen

image

Fixes #16

- run post-commands with 5 second timeout using context.WithTimeout
- wait for commands to complete before quitting on user request
- add WaitingForCommands state with waiting screen on quit
- cancel running commands immediately when user confirms next action

Fixes #16
@Bahaaio Bahaaio added the bug Something isn't working label Feb 11, 2026
@Bahaaio Bahaaio changed the title Fix/post command timeout Fix: Prevent UI freeze when running post-commands Feb 11, 2026
@Bahaaio Bahaaio changed the title Fix: Prevent UI freeze when running post-commands fix: Prevent UI freeze when running post-commands Feb 11, 2026
@Bahaaio Bahaaio changed the title fix: Prevent UI freeze when running post-commands fix: prevent UI freeze when running post-commands Feb 11, 2026
@Bahaaio Bahaaio force-pushed the fix/post-command-timeout branch from cf79306 to f548574 Compare February 11, 2026 19:12
@Bahaaio Bahaaio marked this pull request as ready for review February 11, 2026 19:39
@Bahaaio Bahaaio merged commit ae61e14 into main Feb 11, 2026
1 check passed
@Bahaaio Bahaaio deleted the fix/post-command-timeout branch February 11, 2026 19:57
Bahaaio added a commit that referenced this pull request Mar 13, 2026
previously, when onSessionEnd was start, actions wouldn't run,
now they will run in the background, with the same 5 second timeout

see #17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pomo gets stuck when playing longer audio tracks

1 participant