Skip to content

feat(opentui-solid,ui): add solidjs export#309

Draft
khoaHyh wants to merge 3 commits into
modem-dev:mainfrom
khoaHyh:feat/opentui-solid-export
Draft

feat(opentui-solid,ui): add solidjs export#309
khoaHyh wants to merge 3 commits into
modem-dev:mainfrom
khoaHyh:feat/opentui-solid-export

Conversation

@khoaHyh
Copy link
Copy Markdown

@khoaHyh khoaHyh commented May 14, 2026

Playing with hunkdiff internals for an opencode plugin.

Trying to embed hunkdiff to render inside OpenCode's TUI via a custom route, backed by a new Solid OpenTUI component export.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 14, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedsolid-js@​1.9.1310010010096100
Added@​opentui/​solid@​0.1.1079710010098100

View full report

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 14, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm entities is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: ?npm/@opentui/solid@0.1.107npm/entities@6.0.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/entities@6.0.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@benvinegar
Copy link
Copy Markdown
Member

benvinegar commented May 14, 2026

Am I misinterpreting, but does this mean maintaining an internal solidjs fork going forward?

Edit (after more than a passing glance): Okay, I guess it's not that bad. Just wondering how we can avoid drift between the React and Solid JS exports.

khoaHyh added 2 commits May 15, 2026 19:37
- The @opentui/solid reconciler silently drops raw `fg` and `bg` props on TextNodeRenderable (span) elements which made the colours off when hunkdiff was embedded inside OpenCode.
- Replaced every `<span fg={...} bg={...}>` with `<span style={{ fg: ..., bg: ... }}>` in the opentui-solid export, since the Solid reconciler already handles `style` on text nodes correctly.
- When a diff file is created from a patch, the highlighter now receives the proper filetype (e.g. `typescript`, `javascript`) via `getFiletypeFromFileName` instead of defaulting to plain `"text"`, ensuring syntax tokens are generated.
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.

2 participants