Skip to content

Fix executor switch detection in UpdateTask#513

Merged
bborn merged 1 commit intomainfrom
fix/executor-switch-detection
Mar 18, 2026
Merged

Fix executor switch detection in UpdateTask#513
bborn merged 1 commit intomainfrom
fix/executor-switch-detection

Conversation

@bborn
Copy link
Owner

@bborn bborn commented Mar 18, 2026

Summary

  • Fixes executor switch not actually restarting the tmux session when changed via the edit form

What was happening

The executor change arrives via UpdateTask() which sets m.task directly. By the time Refresh() runs, prevTask already has the new executor value, so the change was never detected — the old executor's pane stayed running with just a title change.

Fix

Move the executor change detection from Refresh() to UpdateTask(), where we still have the old task to compare against.

Test plan

  • All tests pass
  • golangci-lint clean
  • Manual: switch executor on running task, verify old pane is killed and new executor starts

🤖 Generated with Claude Code

The executor change arrives via UpdateTask() which sets m.task directly.
By the time Refresh() runs, prevTask already has the new executor, so
the change was never detected. Move the detection to UpdateTask() where
we can compare the old and new task executor fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bborn bborn merged commit 09d6fbd into main Mar 18, 2026
3 of 4 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