Skip to content

fix: allow idle Ctrl+C to exit completed worker views - #33

Merged
Mouhand-Kaddo merged 1 commit into
mainfrom
fix/idle-ctrl-c-completed-worker
Oct 8, 2026
Merged

Mouhand-Kaddo merged 1 commit into
mainfrom
fix/idle-ctrl-c-completed-worker

Conversation

@Mouhand-Kaddo

@Mouhand-Kaddo Mouhand-Kaddo commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Ctrl+C did nothing while viewing a completed worker, even when LeCode was idle and the input was empty. Only intercept Ctrl+C for the worker view while a root turn, plan loop, or worker is still running. Idle views can now use the existing clear-input and exit behavior.

-if self._focused_worker_id is not None:
+if self._focused_worker_id is not None and self.turn_busy():

Evidence

  • Before: test_ctrl_c_completed_worker_view[False] failed because Ctrl+C did not exit the idle completed-worker view.
    After: The regression passes for both an idle app and an active root turn. The active root remains running when a completed worker is focused.
  • Ruff lint and format checks pass. The focused TUI, feed, streaming PTY, and worker tests passed (252 tests).
  • Real PTY checks exit successfully from an idle completed-worker view with standard Ctrl+C, xterm modifyOtherKeys, and Kitty CSI-u input.
  • Full suite: 2,290 passed, 2 failed. Both failures also reproduce on untouched main (d827078): test_headless_timeout_kills_foreground_shell returns exit 0 instead of the timeout code, and test_sse_oauth_full_dance_and_token_reuse observes two client registrations instead of one. These existing failures are outside this TUI change. Tests were run with the worktree root explicitly on PYTHONPATH because the local runner otherwise cannot import the tests package.

Merge Danger

Door: two-way

Blast Radius: TUI

The change affects Ctrl+C routing while a worker is focused. Approval and question handling retain their existing priority. No provider configuration changes are included.

@Mouhand-Kaddo
Mouhand-Kaddo merged commit 322b1c3 into main Oct 8, 2026
4 checks passed
@Mouhand-Kaddo
Mouhand-Kaddo deleted the fix/idle-ctrl-c-completed-worker branch October 8, 2026 18:43
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