opentui: theme console log error when using zellij #2652

Closed
opened 2026-02-16 17:36:37 -05:00 by yindo · 5 comments
Owner

Originally created by @jeeeem on GitHub (Nov 6, 2025).

Description

Image

I dont see this error if I downgrade to 1.0.36

OpenCode version

1.0.39

Steps to reproduce

Not really sure how this happen, but already reinstall opencode

Screenshot and/or share link

No response

Operating System

macOS 26.1

Terminal

Ghossty

Originally created by @jeeeem on GitHub (Nov 6, 2025). ### Description <img width="1184" height="291" alt="Image" src="https://github.com/user-attachments/assets/5fb82344-c6e7-430d-97c0-5f5f30d8b8d3" /> I dont see this error if I downgrade to 1.0.36 ### OpenCode version 1.0.39 ### Steps to reproduce Not really sure how this happen, but already reinstall opencode ### Screenshot and/or share link _No response_ ### Operating System macOS 26.1 ### Terminal Ghossty
yindo added the opentuibug labels 2026-02-16 17:36:37 -05:00
yindo closed this issue 2026-02-16 17:36:37 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 6, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3868: Error: undefined is not an object (evaluating 'x3.data.providers' ) - Similar JavaScript evaluation error in opentui
  • #3934: opentui: fatal: undefined is not an object (evaluating 'lines().length') - Similar undefined object evaluation error in opentui
  • #3932: TUI not installed correctly - Similar console log error with opentui installation issues
  • #3794: opentui: fatal: undefined is not an object (evaluating 'lines().length') - Another similar error (closed)

These issues all show JavaScript/console errors in the opentui interface with similar stack traces and symptoms. Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 6, 2025): This issue might be a duplicate of existing issues. Please check: - #3868: Error: undefined is not an object (evaluating 'x3.data.providers' ) - Similar JavaScript evaluation error in opentui - #3934: opentui: fatal: undefined is not an object (evaluating 'lines().length') - Similar undefined object evaluation error in opentui - #3932: TUI not installed correctly - Similar console log error with opentui installation issues - #3794: opentui: fatal: undefined is not an object (evaluating 'lines().length') - Another similar error (closed) These issues all show JavaScript/console errors in the opentui interface with similar stack traces and symptoms. Feel free to ignore if none of these address your specific case.
Author
Owner

@jeeeem commented on GitHub (Nov 6, 2025):

I think this is from the system theme, im using zellij, so I believe it doesnt support zellij.. maybe hide this error, cos I dont really use the system theme.

@jeeeem commented on GitHub (Nov 6, 2025): I think this is from the system theme, im using zellij, so I believe it doesnt support zellij.. maybe hide this error, cos I dont really use the system theme.
Author
Owner

@knotbin commented on GitHub (Nov 7, 2025):

I use ghostty and this only happens when I use zellij with it

@knotbin commented on GitHub (Nov 7, 2025): I use ghostty and this only happens when I use zellij with it
Author
Owner

@kamaal111 commented on GitHub (Nov 8, 2025):

I've made a fix for this after investigating it
https://github.com/sst/opencode/pull/4083

It seems like Zellij is returning 10 colors for the theme palette while 16 is required, the 6 remaining colors items are filled with null and that is passed to RGBA.fromHex which just expects a string as it directly performs replace on that value
https://github.com/sst/opentui/blob/ec136974752098c4b30ba1e5b9b27c33910b36de/packages/core/src/lib/RGBA.ts#L72

Filtering out the null values fixes this issue

@kamaal111 commented on GitHub (Nov 8, 2025): I've made a fix for this after investigating it https://github.com/sst/opencode/pull/4083 It seems like Zellij is returning 10 colors for the theme palette while 16 is required, the 6 remaining colors items are filled with `null` and that is passed to `RGBA.fromHex` which just expects a string as it directly performs replace on that value https://github.com/sst/opentui/blob/ec136974752098c4b30ba1e5b9b27c33910b36de/packages/core/src/lib/RGBA.ts#L72 Filtering out the null values fixes this issue
Author
Owner

@rekram1-node commented on GitHub (Nov 8, 2025):

awesome @kamaal111 ill check it out

@rekram1-node commented on GitHub (Nov 8, 2025): awesome @kamaal111 ill check it out
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2652