matcha icon indicating copy to clipboard operation
matcha copied to clipboard

BUG: Plugin execution blocks main thread

Open andrinoff opened this issue 7 months ago • 2 comments

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

andrinoff avatar Apr 16 '26 20:04 andrinoff

This has had no activity for 30 days. It will be closed in 14 days unless updated. Comment or remove the stale label to keep it open.

floatpanebot avatar May 17 '26 05:05 floatpanebot

Closing due to inactivity. Reopen if still relevant.

floatpanebot avatar May 31 '26 06:05 floatpanebot