From a6fa9b04dc823bf16b6ed11cf3f58166fc07be41 Mon Sep 17 00:00:00 2001 From: Sucukdeluxe <259325684+Sucukdeluxe@users.noreply.github.com> Date: Sat, 26 Sep 2026 03:02:15 +0200 Subject: [PATCH] Re-clamp recent panel when queue view layout changes The recent-files panel was only clamped on window resize and tab switches. When the queue toolbar wrapped to a second row afterwards, the queue could shrink below its minimum height. Observe the queue shell and its fixed rows and re-clamp on size changes. --- renderer/app.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/renderer/app.js b/renderer/app.js index f5f496b..8cd05bd 100644 --- a/renderer/app.js +++ b/renderer/app.js @@ -10282,10 +10282,21 @@ function showCopyToast(msg, durationMs) { if (Math.abs(nextHeight - requestedHeight) > 0.5) panel.style.flex = `0 0 ${nextHeight}px`; }; - window.addEventListener('resize', () => { + const scheduleRecentPanelClamp = () => { window.cancelAnimationFrame(resizeFrame); resizeFrame = window.requestAnimationFrame(clampRecentPanelHeight); - }); + }; + + window.addEventListener('resize', scheduleRecentPanelClamp); + + const shell = panel.closest('.queue-shell'); + if (shell && typeof window.ResizeObserver === 'function') { + const shellLayoutObserver = new window.ResizeObserver(scheduleRecentPanelClamp); + shellLayoutObserver.observe(shell); + for (const element of shell.children) { + if (element !== panel && element.id !== 'queueContainer') shellLayoutObserver.observe(element); + } + } resizer.addEventListener('mousedown', (e) => { e.preventDefault();