Describe the bug: Lua plugins execute synchronously on main thread. Long-running plugins freeze entire UI. No timeout or cancellation.
To reproduce:
- Create plugin with slow HTTP call or infinite loop
- Trigger plugin on email arrival
- UI completely frozen
- Cannot cancel or interrupt
- 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
Describe the bug: Lua plugins execute synchronously on main thread. Long-running plugins freeze entire UI. No timeout or cancellation.
To reproduce:
Expected behavior:
Additional context: