Skip to content

fix(tui): remove debug console.log calls leaking into TUI display#15470

Closed
tda1017 wants to merge 1 commit intoanomalyco:devfrom
tda1017:fix/tui-console-log-leak
Closed

fix(tui): remove debug console.log calls leaking into TUI display#15470
tda1017 wants to merge 1 commit intoanomalyco:devfrom
tda1017:fix/tui-console-log-leak

Conversation

@tda1017
Copy link

@tda1017 tda1017 commented Feb 28, 2026

Summary

  • Remove leftover console.log debug statements in app.tsx, route.tsx, sync.tsx, and theme.tsx that were printing raw output directly into the TUI, corrupting the terminal display.
  • Convert console.log calls in clipboard.ts to use the structured Log utility (Log.create({ service: "clipboard" })) so clipboard method selection is properly logged without polluting the TUI.

Files Changed

  • packages/opencode/src/cli/cmd/tui/app.tsx — removed console.log(JSON.stringify(route.data)) debug effect
  • packages/opencode/src/cli/cmd/tui/context/route.tsx — removed console.log("navigate", route)
  • packages/opencode/src/cli/cmd/tui/context/sync.tsx — removed console.log("bootstrapping")
  • packages/opencode/src/cli/cmd/tui/context/theme.tsx — removed console.log("resolveSystemTheme") and console.log(colors.palette)
  • packages/opencode/src/cli/cmd/tui/util/clipboard.ts — replaced all console.log("clipboard: ...") with log.info("copy method selected", { method: "..." })

Remove leftover debug console.log calls that leak into the TUI
terminal output due to disabled stdout interception, causing text
corruption and mixing with the rendered UI.

- Delete dead createEffect that only logged route.data in app.tsx
- Remove debug logs in sync.tsx, route.tsx, and theme.tsx
- Convert clipboard.ts diagnostic logs to structured Log.info()

Closes anomalyco#6830
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Feb 28, 2026
@github-actions
Copy link
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

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

Potential duplicate PR found:

Related PR:

  • chore: use standard logger #14419 - chore: use standard logger
    • This is related as it deals with standardizing logging practices, which aligns with converting to the structured Log utility mentioned in the current PR.

You should check PR #6546 to confirm whether it's a duplicate or if there are related issues already being addressed.

@github-actions
Copy link
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Feb 28, 2026
@github-actions github-actions bot closed this Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant