From 733f44cfdc82935832097dfeb4e33c7f3c7f8fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=A5=87?= <16399091+binaricat@users.noreply.github.com> Date: Mon, 26 Oct 2026 11:10:11 +0000 Subject: [PATCH] test(plugin-sidebar): cover production bridge callback projection --- components/terminalLayer/TerminalLayerTabBridge.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/terminalLayer/TerminalLayerTabBridge.test.ts b/components/terminalLayer/TerminalLayerTabBridge.test.ts index 8020c62e0..f68169eab 100644 --- a/components/terminalLayer/TerminalLayerTabBridge.test.ts +++ b/components/terminalLayer/TerminalLayerTabBridge.test.ts @@ -32,6 +32,13 @@ test('terminal layer bridge passes vault open callbacks into the side panel cont assert.match(source, /onOpenVaultSectionFromChat: s\.onOpenVaultSectionFromChat/); }); +test('production terminal layer context forwards extension sidebar owner and pane callbacks', () => { + const contextProjection = source.slice(source.indexOf('const ctx = useMemo(')); + for (const callback of ['getActiveTerminalSessionId', 'handleSwitchSidePanelTab', 'handleWithdrawPluginSidebarPane']) { + assert.match(contextProjection, new RegExp(`${callback}: s\\.${callback}\\b`)); + } +}); + test('terminal layer bridge updates side panel live state after render', () => { assert.match(source, /const sidePanelLiveSnapshot = useMemo/); assert.match(