diff --git a/packages/frontend/editor-ui/src/features/logs/components/ChatMessagesPanel.vue b/packages/frontend/editor-ui/src/features/logs/components/ChatMessagesPanel.vue index 2936ec01ff..7f66114645 100644 --- a/packages/frontend/editor-ui/src/features/logs/components/ChatMessagesPanel.vue +++ b/packages/frontend/editor-ui/src/features/logs/components/ChatMessagesPanel.vue @@ -267,7 +267,7 @@ async function copySessionId() { --chat--message--user--border: none; --chat--input--padding: var(--spacing-xs); --chat--color-typing: var(--color-text-light); - --chat--textarea--max-height: calc(var(--panel-height) * 0.3); + --chat--textarea--max-height: calc(var(--logs-panel-height) * 0.3); --chat--message--pre--background: var(--color-foreground-light); --chat--textarea--height: calc( var(--chat--input--padding) * 2 + var(--chat--input--font-size) * diff --git a/packages/frontend/editor-ui/src/features/logs/composables/useLogsPanelLayout.ts b/packages/frontend/editor-ui/src/features/logs/composables/useLogsPanelLayout.ts index 24c08bd8f6..b07ebdafb7 100644 --- a/packages/frontend/editor-ui/src/features/logs/composables/useLogsPanelLayout.ts +++ b/packages/frontend/editor-ui/src/features/logs/composables/useLogsPanelLayout.ts @@ -11,6 +11,9 @@ import { LOCAL_STORAGE_PANEL_WIDTH, } from '@/features/logs/logs.constants'; +const INITIAL_POPUP_HEIGHT = 400; +const COLLAPSED_PANEL_HEIGHT = 32; + export function useLogsPanelLayout( workflowName: ComputedRef, popOutContainer: Readonly>, @@ -61,7 +64,7 @@ export function useLogsPanelLayout( popOutWindow: popOutWindow, } = usePopOutWindow({ title: popOutWindowTitle, - initialHeight: 400, + initialHeight: INITIAL_POPUP_HEIGHT, initialWidth: window.document.body.offsetWidth * 0.8, container: popOutContainer, content: popOutContent, @@ -109,15 +112,25 @@ export function useLogsPanelLayout( } watch( - [() => logsStore.state, resizer.size], + [() => logsStore.state, resizer.size, isPoppedOut], ([state, height]) => { - logsStore.setHeight( + const updatedHeight = state === LOGS_PANEL_STATE.FLOATING ? 0 : state === LOGS_PANEL_STATE.ATTACHED ? height - : 32 /* collapsed panel height */, - ); + : COLLAPSED_PANEL_HEIGHT; + + if (state === LOGS_PANEL_STATE.FLOATING) { + popOutWindow?.value?.document.documentElement.style.setProperty( + '--logs-panel-height', + '100vh', + ); + } else { + document.documentElement.style.setProperty('--logs-panel-height', `${updatedHeight}px`); + } + + logsStore.setHeight(updatedHeight); }, { immediate: true }, );