From 710d3e5f2c2b482c2ed1d1db1e0934ab15145f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Such=C3=A1nek?= <16311043+immakermatty@users.noreply.github.com> Date: Fri, 20 Nov 2026 21:49:18 +0000 Subject: [PATCH 1/4] feat(lazurio): Buddy's small window offers neither the right panel nor the terminal In a Lazurio host's frame narrower than the inline right panel's width (the small window the person moves about), the chat offers neither the right panel nor the terminal drawer, and draws neither. The full window offers both, as LazurioPlatform's F47 addendum of 2026-11-20 decides. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/components/ChatView.tsx | 9 +++++++-- apps/web/src/lazurio/BuddySurface.tsx | 9 ++++++++- apps/web/src/lazurio/buddySurfaceFrame.test.ts | 18 +++++++++++++++++- apps/web/src/lazurio/buddySurfaceFrame.ts | 7 +++++++ 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 788a82b228253..12d3fd434da91 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -190,6 +190,7 @@ import { buddyTerminalUiState, useBuddyChatShortcuts, useBuddyPage, + useBuddyPanelsOffered, useBuddyQueuedRunCount, useBuddyWindowInView, useBuddyHermesControls, @@ -604,6 +605,8 @@ export default function ChatView(props: ChatViewProps) { // default and the chat is only the conversation; Buddy's window on the shared server is a whole // T3 thread (GEN4). const buddySurface = useBuddyHermesControls(environmentId); + // Lazurio overlay: Buddy's small window offers neither the right panel nor the terminal. + const buddyPanels = useBuddyPanelsOffered(); // The page Buddy is asked from travels with the person's next message (buddySurfacePage.ts). const buddyPage = useBuddyPage(environmentId); const buddyInView = useBuddyWindowInView(environmentId); @@ -799,7 +802,7 @@ export default function ChatView(props: ChatViewProps) { // (BuddySurface.tsx). Read inside the selector, as the right panel's state below is. const terminalUiState = useTerminalUiStateStore((state) => buddyTerminalUiState( - buddySurface, + buddySurface || !buddyPanels, selectThreadTerminalUiState(state.terminalUiStateByThreadKey, routeThreadRef), ), ); @@ -1112,7 +1115,7 @@ export default function ChatView(props: ChatViewProps) { // changed on every render and looped as soon as the panel opened. const rightPanelState = useRightPanelStore((state) => buddyRightPanelState( - buddySurface, + buddySurface || !buddyPanels, selectThreadRightPanelState(state.byThreadKey, activeThreadRef), ), ); @@ -3383,6 +3386,8 @@ export default function ChatView(props: ChatViewProps) { onToggleTerminal: toggleTerminalVisibilityStable, onToggleThreadPanel: toggleThreadPanelStable, onToggleRightPanel: toggleRightPanelStable, + showTerminalControl: buddyPanels, + showRightPanelControl: buddyPanels, } satisfies PanelLayoutControlsProps; const panelToggleControls = ( isBuddySurfaceConfig(appAtomRegistry.get(primaryServerConfigAtom)); diff --git a/apps/web/src/lazurio/buddySurfaceFrame.test.ts b/apps/web/src/lazurio/buddySurfaceFrame.test.ts index 8c5d5d000e8c4..26934886057a4 100644 --- a/apps/web/src/lazurio/buddySurfaceFrame.test.ts +++ b/apps/web/src/lazurio/buddySurfaceFrame.test.ts @@ -1,6 +1,11 @@ import { describe, expect, it } from "vite-plus/test"; -import { buddyHostOfWindow, buddyWindowInView, startBuddyFrame } from "./buddySurfaceFrame"; +import { + buddyHostOfWindow, + buddyPanelsOffered, + buddyWindowInView, + startBuddyFrame, +} from "./buddySurfaceFrame"; const HOST = "https://launchpad.example-person.lazurio.io"; // What the host sends after the frame's ready, about its own Environment. @@ -136,6 +141,17 @@ describe("Buddy's frame", () => { ).toBe(true); }); + it("offers the right panel and the terminal in the full window and in neither in the small one", () => { + const { win } = frameWindow(); + const framed = buddyHostOfWindow(win) !== null; + // The small window the person moves about: too narrow, so neither panel. + expect(buddyPanelsOffered(framed, true)).toBe(false); + // Full screen on a computer: both. + expect(buddyPanelsOffered(framed, false)).toBe(true); + // Chat on its own page, also a narrow one, keeps T3's own layout. + expect(buddyPanelsOffered(false, true)).toBe(true); + }); + it("talks to nobody outside a host's frame", () => { const { win, posted, key } = frameWindow({ host: "https://example.com" }); const frame = startBuddyFrame(win); diff --git a/apps/web/src/lazurio/buddySurfaceFrame.ts b/apps/web/src/lazurio/buddySurfaceFrame.ts index 20c0ab79b8542..41fa715ba5086 100644 --- a/apps/web/src/lazurio/buddySurfaceFrame.ts +++ b/apps/web/src/lazurio/buddySurfaceFrame.ts @@ -38,6 +38,13 @@ export const buddyWindowInView = ( heardContext: boolean, ): boolean => !framed || shown === true || (shown === null && heardContext); +/** + * Whether Buddy's window offers the right panel and the terminal: not in a host's frame too narrow + * for them, where the right panel would only cover the conversation (the small window). The full + * window offers both (LazurioPlatform F47, addendum of 2026-11-20). + */ +export const buddyPanelsOffered = (framed: boolean, narrow: boolean): boolean => !framed || !narrow; + /** An open menu, dialog or list inside the surface takes Escape before the frame does. */ const ESCAPE_TAKERS = '[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'; From d94c4b074106df1a0885974f5dae9c7efede2ef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Such=C3=A1nek?= <16311043+immakermatty@users.noreply.github.com> Date: Fri, 20 Nov 2026 21:56:10 +0000 Subject: [PATCH 2/4] fix(lazurio): Buddy's small window leaves the panels' keys to the browser A key for the right panel or the terminal no longer toggles their stored state in the small window, where neither is drawn, so neither appears by itself when the window grows to full screen (T3 RELEASE's note on eea9e16f). Co-Authored-By: Claude Opus 5.5 --- apps/web/src/components/ChatView.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 12d3fd434da91..c6117dadbccef 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -2797,9 +2797,9 @@ export default function ChatView(props: ChatViewProps) { } }); - // Lazurio overlay (plan DEV-6676): Buddy's surface has no terminal or right panel, so their keys - // stay the browser's there (buddySurfaceControls.ts). - useBuddyChatShortcuts(buddySurface, { + // Lazurio overlay (plan DEV-6676): Buddy's surface, and his small window, have no terminal or right + // panel, so their keys stay the browser's there (buddySurfaceControls.ts). + useBuddyChatShortcuts(buddySurface || !buddyPanels, { enabled: activeThreadId !== null && !backgroundThread, embedded, composerElement: composerOverlayElement, From 0d82090c66af64bad9ea8402b43f2a0c61a2db2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Such=C3=A1nek?= <16311043+immakermatty@users.noreply.github.com> Date: Fri, 20 Nov 2026 22:08:48 +0000 Subject: [PATCH 3/4] test(lazurio): the release contract pins Buddy's small window seams Co-Authored-By: Claude Opus 5.5 --- scripts/lazurio-release-contract.test.mjs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/lazurio-release-contract.test.mjs b/scripts/lazurio-release-contract.test.mjs index e200562309998..6245dc2360066 100644 --- a/scripts/lazurio-release-contract.test.mjs +++ b/scripts/lazurio-release-contract.test.mjs @@ -3416,25 +3416,28 @@ NodeTest.test("Buddy's chat reads like a chat with a friend through its seams", ); NodeAssert.match( chat, - /\n\s+useBuddyChatShortcuts\(buddySurface, \{\n\s+enabled: activeThreadId !== null && !backgroundThread,/, + /\n\s+useBuddyChatShortcuts\(buddySurface \|\| !buddyPanels, \{\n\s+enabled: activeThreadId !== null && !backgroundThread,/, ); NodeAssert.doesNotMatch(chat, /\buseChatShortcuts\(/); NodeAssert.doesNotMatch(chat, /activeTasksProgress|activeComposerTask/); NodeAssert.match(root, /\{buddySurface \? null : \}/); + // Buddy GEN4's small window offers neither panel either (LazurioPlatform F47, addendum of + // 2026-11-20): `buddyPanels` from `useBuddyPanelsOffered`. + NodeAssert.match(chat, /\n\s+const buddyPanels = useBuddyPanelsOffered\(\);\n/); // Root decision 0210, addendum of HumanAndMachines/Lazurio#648: Buddy's surface shows neither T3's // terminal nor its right panel. Their states are read closed inside the stores' selectors (outside, // the React Compiler leaves what reads them unmemoized and the panel re-rendered until React error // 301), no thread tabs are followed, code blocks get no Run in terminal, links open in a new tab. NodeAssert.match( chat, - /\n\s+const terminalUiState = useTerminalUiStateStore\(\(state\) =>\n\s+buddyTerminalUiState\(\n\s+buddySurface,\n\s+selectThreadTerminalUiState\(state\.terminalUiStateByThreadKey, routeThreadRef\),\n/, + /\n\s+const terminalUiState = useTerminalUiStateStore\(\(state\) =>\n\s+buddyTerminalUiState\(\n\s+buddySurface \|\| !buddyPanels,\n\s+selectThreadTerminalUiState\(state\.terminalUiStateByThreadKey, routeThreadRef\),\n/, ); NodeAssert.equal(chat.match(/\bselectThreadTerminalUiState\(/g)?.length, 1); NodeAssert.match(chat, /\{embedded \|\| buddySurface \? null : \(\n\s+\n\s+buddyRightPanelState\(\n\s+buddySurface,\n\s+selectThreadRightPanelState\(state\.byThreadKey, activeThreadRef\),\n/, + /\n\s+const rightPanelState = useRightPanelStore\(\(state\) =>\n\s+buddyRightPanelState\(\n\s+buddySurface \|\| !buddyPanels,\n\s+selectThreadRightPanelState\(state\.byThreadKey, activeThreadRef\),\n/, ); NodeAssert.equal(chat.match(/\bselectThreadRightPanelState\(/g)?.length, 1); NodeAssert.match(chat, /\n\s+const rightPanelOpen = rightPanelState\.isOpen;\n/); From 62d0908914aa894d87e0ae23860f0d345e0f6f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Such=C3=A1nek?= <16311043+immakermatty@users.noreply.github.com> Date: Sat, 21 Nov 2026 07:15:34 +0000 Subject: [PATCH 4/4] docs(lazurio): Buddy's narrow full-screen window without panels is an interim step Co-Authored-By: Claude Opus 5.5 --- apps/web/src/lazurio/buddySurfaceFrame.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/lazurio/buddySurfaceFrame.ts b/apps/web/src/lazurio/buddySurfaceFrame.ts index 41fa715ba5086..9f70d83dff7b5 100644 --- a/apps/web/src/lazurio/buddySurfaceFrame.ts +++ b/apps/web/src/lazurio/buddySurfaceFrame.ts @@ -40,8 +40,8 @@ export const buddyWindowInView = ( /** * Whether Buddy's window offers the right panel and the terminal: not in a host's frame too narrow - * for them, where the right panel would only cover the conversation (the small window). The full - * window offers both (LazurioPlatform F47, addendum of 2026-11-20). + * for them (the small window). Interim: the decision offers them full screen on a phone too, which + * width cannot tell; Lazurio/LazurioPlatform#1139 has the host send the window's mode. */ export const buddyPanelsOffered = (framed: boolean, narrow: boolean): boolean => !framed || !narrow;