Skip to content

Conversation

@0xbrayo
Copy link
Member

@0xbrayo 0xbrayo commented Jan 7, 2026

Important

Fixes indefinite restarts of aw-notify by preventing further restarts after a limit and refactoring module restart handling in manager.rs.

  • Behavior:
    • Prevents indefinite restarts of aw-notify by setting modules_pending_shutdown to true after restart limit is reached in handle().
    • Introduces start_generic_module_thread() to handle module restarts generically, used in start_module_thread() and start_notify_module_thread().
  • Functions:
    • Modifies start_notify_module_thread() to fallback to start_generic_module_thread() if --output-only flag is unsupported.
    • Updates handle() to prevent further restarts by inserting into modules_pending_shutdown.
  • Misc:
    • Minor refactoring in manager.rs to improve module restart handling.

This description was created by Ellipsis for 05ca488. You can customize this summary. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 05ca488 in 1 minute and 4 seconds. Click for details.
  • Reviewed 43 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src-tauri/src/manager.rs:341
  • Draft comment:
    When marking a module as pending shutdown after exceeding the crash limit, consider adding logic to clear this flag when a manual restart is attempted. This ensures that a module isn’t permanently blocked if the underlying issue is resolved.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. src-tauri/src/manager.rs:383
  • Draft comment:
    Refactoring by introducing start_generic_module_thread avoids recursive special-case calls. Ensure that any initialization previously performed in start_module_thread is preserved in the generic variant.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. src-tauri/src/manager.rs:477
  • Draft comment:
    In the aw-notify fallback, the error is checked with a string match for '--output-only'. While this avoids recursion, consider using a more robust method for error detection to avoid potential false positives.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_myIs3K9fmO4hw7As

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@0xbrayo
Copy link
Member Author

0xbrayo commented Jan 7, 2026

start_generic_module_thread() prevents some recursion bugs that I noticed.

@0xbrayo 0xbrayo merged commit 79f5342 into ActivityWatch:master Jan 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant