📦 opentui package pin - resolves rendering on darwin64#18
Merged
benvinegar merged 2 commits intobenvinegar:mainfrom Apr 26, 2026
Merged
📦 opentui package pin - resolves rendering on darwin64#18benvinegar merged 2 commits intobenvinegar:mainfrom
benvinegar merged 2 commits intobenvinegar:mainfrom
Conversation
it seems that leaving these deps "open to interpretation" causes some unpredictable rendering bugs due to upstream module resolution
8427d1f to
14a36c5
Compare
Owner
|
Thanks @sdougbrown! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes packaged/global
termdrawrendering with incorrect colors by pinning OpenTUI runtime dependencies to exact versions.The app CLI bundles OpenTUI JS into
dist/cli.js, but the bundled code still dynamically loads the platform native OpenTUI package at runtime. With^0.1.97ranges, npm can install a newer@opentui/core/ native optional dependency version than the one the CLI bundle was built against. In my case, the globally installed CLI still worked interactively, but the UI rendered only red on a black background.This also updates the app CLI source import to use the workspace package entrypoint,
@termdraw/opentui, instead of reaching into../../opentui/src.Reproduction
From the original package state:
Observed: the UI opens and remains interactive, but colors render incorrectly as red on black.
After this change:
Observed: the UI renders with the expected full color palette.
Why
This appears to match an OpenTUI optional dependency/version mismatch issue described here:
anomalyco/opentui#29 (comment)
That comment notes that loose optional dependency versions could cause the wrong native package version to be downloaded, and that explicit versions fix it.
Since
@termdraw/apppublishes a bundled CLI but relies on OpenTUI’s installed native package at runtime, exact OpenTUI pins keep the JS bundle and native package aligned for npm consumers.Screenshots
BEFORE:

AFTER:

Validation
Manually verified by packing and globally installing the app tarball before and after the dependency pin change.
Also fixed a workspace relative link because it bugged me to see. Probably unrelated. 😅
Used codex to help diagnose. I'm on a plane rn.✈️