Skip to content

BUG: Plugin execution blocks main thread #657

@andrinoff

Description

@andrinoff

Describe the bug: Lua plugins execute synchronously on main thread. Long-running plugins freeze entire UI. No timeout or cancellation.

To reproduce:

  1. Create plugin with slow HTTP call or infinite loop
  2. Trigger plugin on email arrival
  3. UI completely frozen
  4. Cannot cancel or interrupt
  5. Must kill process

Expected behavior:

  • Execute plugins in goroutines
  • Set execution timeout (5s default, configurable)
  • Show "Plugin running..." indicator
  • Allow user to cancel long-running plugins
  • Kill plugin goroutine on timeout
  • Log timeout errors

Additional context:

  • File: plugin/plugin.go
  • Need goroutine + timeout wrapper
  • Context cancellation support
  • Protect against malicious/buggy plugins
  • Severity: Medium - UI freeze
  • Complexity: Medium-High - concurrency + Lua state

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions