Repository navigation
Conversation
TUI crash: TypeError Object.entries requires that input parameter not be null or undefined. Harden theme resolve, MCP status views, tool input formatting, and attention packs so missing objects do not take down the renderer.
|
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. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Low-risk hardening, but I'd push back on the approach: most of these guards defend an invariant that the codebase already enforces, and scattering
Happy with #2/#3 as-is; #1 needs either a repro or a narrower scope before this lands. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #44100
Type of change
What does this PR do?
TUI dies with
TypeError: Object.entries requires that input parameter not be null or undefinedon 0.0.0-beta-17823 (same stack as #44100). Solid is iterating a value that is still null: theme colors, MCP status, toolinput, attention sounds.This PR passes
?? {}(or optional chaining) at those call sites, falls back to the built-inopencodetheme if the active one is missing, and adds a test thatresolveTheme({})does not throw.How did you verify your code works?
Added
packages/tui/test/theme.test.tscoverage for a theme object with nothemekey.Screenshots / recordings
N/A (crash guard, no UI change).
Checklist