diff --git a/frontend/src/components/FloatingTranscriptDebug.vue b/frontend/src/components/FloatingTranscriptDebug.vue index a2a076a..437ddcf 100644 --- a/frontend/src/components/FloatingTranscriptDebug.vue +++ b/frontend/src/components/FloatingTranscriptDebug.vue @@ -72,6 +72,17 @@ const dragOffset = ref({ x: 0, y: 0 }) const isResizing = ref(false) const size = ref({ w: 480, h: 600 }) +// Size mode: pin (small, anchored to FAB), medium (default), large +type SizeMode = 'pin' | 'medium' | 'large' +const sizeMode = ref('medium') + +function cycleSizeMode() { + const modes: SizeMode[] = ['pin', 'medium', 'large'] + const i = modes.indexOf(sizeMode.value) + sizeMode.value = modes[(i + 1) % modes.length] + hasCustomPosition.value = false +} + // Mobile bottom sheet state const isMobile = ref(false) const sheetHeight = ref(55) @@ -217,6 +228,12 @@ function stopResize() { // COMPUTED STYLE // ============================================================================ +const sizeModePresets: Record = { + pin: { w: 240, h: 300 }, + medium: { w: 480, h: 600 }, + large: { w: 800, h: 760 } +} + const windowStyle = computed((): Record => { if (isMobile.value) { return { @@ -230,21 +247,48 @@ const windowStyle = computed((): Record => { } } - if (!hasCustomPosition.value) { + const preset = sizeModePresets[sizeMode.value] + + // Custom position from dragging (uses current resize size or preset) + if (hasCustomPosition.value) { + const w = sizeMode.value === 'medium' ? size.value.w : preset.w + const h = sizeMode.value === 'medium' ? size.value.h : preset.h return { - width: `${size.value.w}px`, - height: `${size.value.h}px`, + width: `${w}px`, + height: `${h}px`, + top: `${position.value.y}px`, + left: `${position.value.x}px`, + bottom: 'auto', + right: 'auto' + } + } + + // Pin: anchored to FAB button (bottom-left corner aligned) + if (sizeMode.value === 'pin') { + return { + width: `${preset.w}px`, + height: `${preset.h}px`, + bottom: '20px', + left: '80px' + } + } + + // Large: centered-ish, generous size + if (sizeMode.value === 'large') { + return { + width: `${preset.w}px`, + height: `${preset.h}px`, bottom: '16px', left: '90px' } } + + // Medium (default) return { width: `${size.value.w}px`, height: `${size.value.h}px`, - top: `${position.value.y}px`, - left: `${position.value.x}px`, - bottom: 'auto', - right: 'auto' + bottom: '16px', + left: '90px' } }) @@ -352,6 +396,22 @@ onBeforeUnmount(() => { {{ selectedAgent }}
+