feat(rpc): render extension components in the shared host - #1219
Merged
Conversation
code-yeongyu
force-pushed
the
fix/shared-host-extension-ui
branch
5 times, most recently
from
August 30, 2026 16:18
cd4e7cb to
8491434
Compare
code-yeongyu
force-pushed
the
fix/shared-host-extension-ui
branch
from
August 30, 2026 16:44
d5d6a9f to
e842d33
Compare
code-yeongyu
force-pushed
the
fix/shared-host-extension-ui
branch
from
August 30, 2026 17:03
50a66cd to
67e6551
Compare
code-yeongyu
enabled auto-merge
August 30, 2026 17:18
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.
Problem
Extension UI degrades in the shared host (RPC mode): component-factory widgets (
btwpanel,todo-sidebar,prompt-url) trigger the "requires the classic TUI"custom_unsupportedwarning instead of rendering, andsetHeader/setFooterfactories are silently dropped (connection-handler.ts).Ideal state (this PR)
Every extension widget/component renders correctly in the shared host, so the classic-TUI-only warning path is never triggered for built-in components.
src/modes/rpc/widget-line-renderer.ts:createLiveComponentRenderer()renders component factories server-side into text lines — synchronous first render, coalescedrequestRender, unchanged-output suppression, immediatererender(), disposal, factory/render fault isolation, global theme pass-through.setWidgetfactory branch now emits the EXISTING additivesetWidgetlines message (rendered output); thecustom_unsupporteddegradation for widget components is deleted.ctx.ui.custom()keeps its opt-in notice.setHeader/setFooterforwarded as new additiveextension_ui_requestmethods carrying rendered lines.set_client_info { width }; per-connection width (default 80) with live rerender on change. Attached interactive clients send width on attach and on SIGWINCH.docs/rpc.md+src/modes/rpc/changes.mdupdated in the same increment.Additive-only: a default client that ignores unknown methods and never sends
set_client_infosees byte-identical behavior for everything it already used.TDD / evidence (run on a clean remote box)
test/suite/rpc-widget-line-renderer.test.ts).test/rpc-socket-host.test.ts): factory widget rendersw:80, header/footer additive methods, ZEROcustom_unsupportedasserted.set_client_inforerender loop fails the pin; restored = 14/14.test/manual-qa/shared-host-widget-qa.mts): real socket host + realtodotoolsbuiltin over the wire -> renderedtodo-sidebarlines, zerocustom_unsupported, width-60 rerender. QA-PASS transcript captured.packages/coding-agentsuite + rootnpm run checkon the branch; the only full-suite failures (app-server daemon/stdio) reproduce as box-contention flakes: they pass 68/68 focused on this branch AND on origin/main.Summary by cubic
Renders extension component widgets, headers, and footers in the shared RPC host instead of dropping them or showing the
custom_unsupportedwarning. Clients that advertiserendered_componentsvia the newset_client_infocommand receive factory-rendered text lines; clients that ignore unknown methods see byte-identical behavior.setWidgetfactories render server-side into text lines; the widgetcustom_unsupporteddegradation is gone, whilectx.ui.custom()keeps its opt-in notice.setHeaderandsetFooterare new additiveextension_ui_requestmethods; footer factories receive a session-backed footer data provider.rendered_components, report terminal width with live resize updates, re-register after reconnect, and buffer startup UI events so session-start widgets reach the runtime API before the normal listener is installed.Written for commit e425816. Summary will update on new commits.