Skip to content

fix(opentui): handle SIGINT to prevent garbled output on Windows - #10433

Closed
Arthur742Ramos wants to merge 2 commits into
anomalyco:devfrom
Arthur742Ramos:fix/windows-ctrl-c-garbled-output
Closed

fix(opentui): handle SIGINT to prevent garbled output on Windows#10433
Arthur742Ramos wants to merge 2 commits into
anomalyco:devfrom
Arthur742Ramos:fix/windows-ctrl-c-garbled-output

Conversation

@Arthur742Ramos

Copy link
Copy Markdown
Contributor

Fixes#10414

Summary

  • Adds SIGINT handler in App component to properly cleanup renderer on Ctrl+C
  • Prevents 60 FPS render loop from continuing to output ANSI sequences after exit

Verification

  1. Ran bun dev on Windows
  2. Pressed Ctrl+C
  3. Terminal exited cleanly without garbled escape sequence output

Fixesanomalyco#10414
On Windows, pressing Ctrl+C caused the terminal to output ANSI escape sequences because the 60 FPS renderer was not being properly cleaned up. This adds a SIGINT handler in the App component that calls the exit function to properly destroy the renderer.
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Related PR Found:

@Arthur742Ramos

Copy link
Copy Markdown
ContributorAuthor

The test failures are pre-existing issues on the dev branch (e2e tests in packages/app are failing). This PR only modifies TUI code in packages/opencode/src/cli/cmd/tui/app.tsx which is not covered by those e2e tests. The typecheck workflow passes.

@github-actions

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

Sign up for freeto 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.

OpenCode crashes during use on Windows (garbled console output)

1 participant

@Arthur742Ramos