Skip to content

fix: remove config-context console.warn that leaks into TUI textbox#2184

Open
mertyldrm wants to merge 1 commit intocode-yeongyu:devfrom
mertyldrm:fix/config-context-warning-leak
Open

fix: remove config-context console.warn that leaks into TUI textbox#2184
mertyldrm wants to merge 1 commit intocode-yeongyu:devfrom
mertyldrm:fix/config-context-warning-leak

Conversation

@mertyldrm
Copy link

@mertyldrm mertyldrm commented Feb 27, 2026

Summary

  • Removes console.warn in getConfigContext() that renders inside the TUI textbox during startup
  • The fallback behavior (defaulting to standard CLI paths) is preserved — only the noisy warning is removed

Problem

initConfigContext() runs async (spawns opencode --version subprocess), but modules calling getConfigDir() / getConfigJson() can resolve synchronously before it completes. The console.warn writes to stderr, which the TUI captures, causing the warning to appear in the user's input textbox.

Fixes #2183


Summary by cubic

Removed console.warn in getConfigContext() that wrote to stderr and leaked into the TUI input box during startup. Behavior unchanged: if initConfigContext() hasn’t completed, we default to standard CLI paths.

Written for commit 83c024d. Summary will update on new commits.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Removing a console.warn inside a non-production check is safe and fixes a TUI rendering glitch without changing core logic.

getConfigContext() emitted a console.warn when called before
initConfigContext() completed. Since initConfigContext runs async
(spawns opencode --version subprocess), other modules calling
getConfigDir/getConfigJson could trigger this warning during startup.

The fallback behavior is intentional and safe (defaults to standard
CLI paths), but console.warn writes to stderr which the TUI captures,
causing the warning to render inside the user's textbox.

Fixes code-yeongyu#2183
@mertyldrm mertyldrm force-pushed the fix/config-context-warning-leak branch from 1fccf80 to 83c024d Compare February 27, 2026 10:51
@mertyldrm
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Feb 27, 2026
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.

config-context warning leaks into TUI textbox

1 participant