Skip to content

fix(cli): guard ErrorComponent against missing renderer context#8782

Open
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
fix/cli-error-boundary-no-renderer
Open

fix(cli): guard ErrorComponent against missing renderer context#8782
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
fix/cli-error-boundary-no-renderer

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot bot commented Apr 11, 2026

Summary

  • The ErrorBoundary fallback (ErrorComponent) called useRenderer() and useTerminalDimensions() directly, which throw "No renderer found" when the OpenTUI renderer context is unavailable during error handling
  • Wrapped these hooks in safe tryUseRenderer() / tryUseTerminalDimensions() helpers that return undefined when context is missing, falling back to process.stdout.rows for terminal height
  • Also guarded the useKeyboard() call so Ctrl+C still works via the default signal handler when the renderer context is absent

Closes #8774

Built for Mark IJbema by Kilo for Slack

The ErrorBoundary fallback (ErrorComponent) called useRenderer() and
useTerminalDimensions() which throw "No renderer found" when the
OpenTUI renderer context is unavailable. This causes the CLI to crash
on startup instead of showing the error UI.

Wrap these hooks in try/catch helpers (tryUseRenderer,
tryUseTerminalDimensions) that return undefined when the context is
missing, and fall back to process.stdout dimensions. Also guard
useKeyboard the same way.

Closes #8774
@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot bot commented Apr 11, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/opencode/src/cli/cmd/tui/app.tsx

Reviewed by gpt-5.4-20260305 · 561,227 tokens

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.

Kilo CLI 7.2.4 fails to load with "No renderer found" error

1 participant