Repository navigation
fix: degradar slots cuando el host no expone el renderer - #33
Merged
j0k3r-dev-rgl merged 3 commits intoMay 14, 2026
Merged
j0k3r-dev-rgl merged 3 commits into
j0k3r-dev-rgl merged 3 commits into
Conversation
|
🎉 This PR is included in version 1.6.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
fix: degradar slots cuando el host no expone el renderer
🔥 Qué cambia:
Con opencode
1.14.50, los slotshome_bottomysidebar_contenttiranError: No renderer founden el primer render y eso crashea la TUI entera con el overlay de fatal error.Cambios:
safeSlotRender(label, render)envuelve el render del slot. Si caeError("No renderer found")devuelvenull(el slot queda inactivo) y se loguea un warning una sola vez con un mensaje accionable. Cualquier otro error se re-lanza tal cual.getHostVersion(api)y unlog.infocon la versión del host al iniciar, para que los reportes traigan ese dato sin pedirlo.Comandos (
:sdd-model), keybindings y persistencia siguen funcionando. Se pierde solo el badge visual hasta que se restablezca la compatibilidad.🔧 Alcance:
Es un fix defensivo, no la causa raíz. El throw viene de tener dos instancias de
@opentui/soliden memoria (la del host y la que resuelve el loader del plugin), entonces elRendererContextdel host no es visible para eluseContextdel plugin. Arreglar eso de fondo requiere cambios upstream. Este PR evita que el mismatch mate la TUI mientras tanto.🕵️♂️ QA Testing:
Instalar opencode
1.14.50.Apuntar
~/.config/opencode/tui.jsonal plugin compilado de esta branch.Iniciar opencode: no crashea. En stderr aparece:
Ejecutar
:sdd-modelconalt+k: el menú abre.Volver a opencode
1.14.49y reiniciar: el badge renderiza normal sin warnings.Local: