Let the studio page scroll again instead of locking both columns to the viewport.

Output and the library now stop at the input panel height, then scroll inside.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-02 15:24:05 -05:00
co-authored by Cursor
parent 1be9bcb23f
commit b3d16b4817
+44 -10
View File
@@ -1,16 +1,14 @@
<template> <template>
<div class="min-h-dvh min-w-0 lg:flex lg:h-dvh lg:flex-col lg:overflow-hidden"> <div class="min-h-dvh min-w-0">
<div class="shrink-0">
<AppHeader <AppHeader
:subtitle="ltxEnabled ? 'MiniMax H3 · LTX-2.3 · Flux.2 Klein' : 'MiniMax H3 · Flux.2 Klein'" :subtitle="ltxEnabled ? 'MiniMax H3 · LTX-2.3 · Flux.2 Klein' : 'MiniMax H3 · Flux.2 Klein'"
current="studio" current="studio"
:queue-count="queueBadgeCount" :queue-count="queueBadgeCount"
@gpu="pollComfyHealth" @gpu="pollComfyHealth"
/> />
</div>
<main class="mx-auto grid min-w-0 max-w-7xl flex-1 gap-6 px-4 py-6 sm:px-6 lg:min-h-0 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] lg:items-stretch lg:overflow-hidden"> <main class="mx-auto grid min-w-0 max-w-7xl gap-6 px-4 py-6 sm:px-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] lg:items-start">
<section id="studio-input" class="glass min-w-0 max-w-full space-y-5 rounded-3xl p-5 sm:p-6 lg:min-h-0 lg:overflow-y-auto"> <section id="studio-input" ref="studioInput" class="glass min-w-0 max-w-full space-y-5 rounded-3xl p-5 sm:p-6">
<div> <div>
<div class="mb-4 grid grid-cols-2 gap-3"> <div class="mb-4 grid grid-cols-2 gap-3">
<button <button
@@ -1209,8 +1207,11 @@
</div> </div>
</section> </section>
<section class="flex min-w-0 max-w-full flex-col gap-5 lg:h-full lg:min-h-0 lg:overflow-hidden"> <section
<div ref="outputPanel" class="glass min-w-0 max-w-full rounded-3xl p-5 sm:p-6 lg:max-h-[min(58dvh,38rem)] lg:shrink-0 lg:overflow-y-auto"> class="flex min-w-0 max-w-full flex-col gap-5 lg:overflow-hidden"
:style="studioColumnMax ? { maxHeight: studioColumnMax } : undefined"
>
<div ref="outputPanel" class="glass min-w-0 max-w-full rounded-3xl p-5 sm:p-6 lg:shrink-0">
<div class="flex items-center justify-between gap-3"> <div class="flex items-center justify-between gap-3">
<div class="flex items-center gap-3"> <div class="flex items-center gap-3">
<h2 class="font-display text-2xl font-bold">Output</h2> <h2 class="font-display text-2xl font-bold">Output</h2>
@@ -1300,15 +1301,15 @@
<div v-show="outputPreviewKind === 'video'"> <div v-show="outputPreviewKind === 'video'">
<div <div
class="relative mx-auto mt-5 w-full max-w-full overflow-hidden rounded-2xl bg-black/50 lg:sticky lg:top-0 lg:z-10" class="relative mx-auto mt-5 w-full max-w-full overflow-hidden rounded-2xl bg-black/50"
:class="{ 'sensitive-glow': awaitingReveal || lockedSave }" :class="{ 'sensitive-glow': awaitingReveal || lockedSave }"
:style="{ aspectRatio: `${playerSize.width} / ${playerSize.height}`, maxHeight: 'min(36dvh, 20rem)' }" :style="{ aspectRatio: `${playerSize.width} / ${playerSize.height}`, maxHeight: 'min(70dvh, 32rem)' }"
> >
<video <video
v-if="videoUrl && !lockedSave" v-if="videoUrl && !lockedSave"
ref="player" ref="player"
:src="videoUrl" :src="videoUrl"
class="h-full w-full max-h-[min(36dvh,20rem)] bg-black object-contain" class="h-full w-full max-h-[min(70dvh,32rem)] bg-black object-contain"
:class="{ 'opacity-0': awaitingReveal }" :class="{ 'opacity-0': awaitingReveal }"
:controls="!awaitingReveal" :controls="!awaitingReveal"
:autoplay="autoplayEnabled && !awaitingReveal" :autoplay="autoplayEnabled && !awaitingReveal"
@@ -2451,6 +2452,36 @@ const imageFillWithoutPrompt = computed(() => (
const player = ref<HTMLVideoElement | null>(null) const player = ref<HTMLVideoElement | null>(null)
const outputPanel = ref<HTMLElement | null>(null) const outputPanel = ref<HTMLElement | null>(null)
const studioInput = ref<HTMLElement | null>(null)
const studioColumnMax = ref('')
let studioLayoutObserver: ResizeObserver | null = null
function syncStudioColumnMax() {
const input = studioInput.value
const output = outputPanel.value
if (!input || !window.matchMedia('(min-width: 1024px)').matches) {
studioColumnMax.value = ''
return
}
const next = Math.max(input.offsetHeight, (output?.offsetHeight || 0) + 256)
studioColumnMax.value = `${next}px`
}
function bindStudioColumnMax() {
unbindStudioColumnMax()
syncStudioColumnMax()
if (typeof ResizeObserver === 'undefined') return
studioLayoutObserver = new ResizeObserver(() => syncStudioColumnMax())
if (studioInput.value) studioLayoutObserver.observe(studioInput.value)
if (outputPanel.value) studioLayoutObserver.observe(outputPanel.value)
window.addEventListener('resize', syncStudioColumnMax)
}
function unbindStudioColumnMax() {
studioLayoutObserver?.disconnect()
studioLayoutObserver = null
window.removeEventListener('resize', syncStudioColumnMax)
}
const editLightbox = ref<HTMLElement | null>(null) const editLightbox = ref<HTMLElement | null>(null)
const editLightboxUrl = ref('') const editLightboxUrl = ref('')
const file = ref<File | null>(null) const file = ref<File | null>(null)
@@ -3932,9 +3963,12 @@ onMounted(async () => {
if (route.query.clip || route.query.still) applyIncomingLibraryItem() if (route.query.clip || route.query.still) applyIncomingLibraryItem()
else applyIncomingDirectorScript() else applyIncomingDirectorScript()
window.addEventListener('keydown', onStudioKey) window.addEventListener('keydown', onStudioKey)
await nextTick()
bindStudioColumnMax()
}) })
onBeforeUnmount(() => { onBeforeUnmount(() => {
unbindStudioColumnMax()
unbindConcealListeners() unbindConcealListeners()
window.removeEventListener('keydown', onStudioKey) window.removeEventListener('keydown', onStudioKey)
studioPollAlive = false studioPollAlive = false