Skip to content

fix(tui): guard Object.entries against null MCP/theme/input - #44356

Open
pantha704 wants to merge 1 commit into
anomalyco:devfrom
pantha704:fix/tui-object-entries-null
Open

fix(tui): guard Object.entries against null MCP/theme/input#44356
pantha704 wants to merge 1 commit into
anomalyco:devfrom
pantha704:fix/tui-object-entries-null

Conversation

@pantha704

@pantha704 pantha704 commented Aug 23, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #44100

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

TUI dies with TypeError: Object.entries requires that input parameter not be null or undefined on 0.0.0-beta-17823 (same stack as #44100). Solid is iterating a value that is still null: theme colors, MCP status, tool input, attention sounds.

This PR passes ?? {} (or optional chaining) at those call sites, falls back to the built-in opencode theme if the active one is missing, and adds a test that resolveTheme({}) does not throw.

How did you verify your code works?

Added packages/tui/test/theme.test.ts coverage for a theme object with no theme key.

Screenshots / recordings

N/A (crash guard, no UI change).

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.
@github-actions github-actions Bot added needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Aug 23, 2026
@github-actions

Copy link
Copy Markdown
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 github-actions Bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Aug 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Aug 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

TUI crash: Object.entries requires that input parameter not be null or undefined

1 participant