fix(tui): remove debug console.log calls leaking into TUI display#15470
fix(tui): remove debug console.log calls leaking into TUI display#15470tda1017 wants to merge 1 commit intoanomalyco:devfrom
Conversation
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
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Potential duplicate PR found:
Related PR:
You should check PR #6546 to confirm whether it's a duplicate or if there are related issues already being addressed. |
|
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. |
Summary
console.logdebug statements inapp.tsx,route.tsx,sync.tsx, andtheme.tsxthat were printing raw output directly into the TUI, corrupting the terminal display.console.logcalls inclipboard.tsto use the structuredLogutility (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— removedconsole.log(JSON.stringify(route.data))debug effectpackages/opencode/src/cli/cmd/tui/context/route.tsx— removedconsole.log("navigate", route)packages/opencode/src/cli/cmd/tui/context/sync.tsx— removedconsole.log("bootstrapping")packages/opencode/src/cli/cmd/tui/context/theme.tsx— removedconsole.log("resolveSystemTheme")andconsole.log(colors.palette)packages/opencode/src/cli/cmd/tui/util/clipboard.ts— replaced allconsole.log("clipboard: ...")withlog.info("copy method selected", { method: "..." })