From 134867cf93aa906ec5c59543291109199651d404 Mon Sep 17 00:00:00 2001 From: b1rdmania <102524336+b1rdmania@users.noreply.github.com> Date: Fri, 26 Dec 2025 21:29:17 +0000 Subject: [PATCH] Allow scrolling back to search after generation. Keeps the search UI visible in generated mode (so you can scroll up), but locks it to prevent changing choices until tapping New search. --- index.html | 3 +++ src/main.ts | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 26a995c..59cc4b0 100644 --- a/index.html +++ b/index.html @@ -239,6 +239,9 @@ justify-content: center; max-width: 720px; } + .controls.locked { + opacity: 0.35; + } button { background: var(--color-surface); diff --git a/src/main.ts b/src/main.ts index a56c814..1374b58 100644 --- a/src/main.ts +++ b/src/main.ts @@ -775,10 +775,13 @@ class MotifApp { // collapse results when selected/generated this.resultsSection.classList.toggle('collapsed', state === 'selected'); - // Search affordances: hidden after generation (no choice) - const hideSearch = state === 'generated'; - this.controlsEl.style.display = hideSearch ? 'none' : ''; - this.status.style.display = hideSearch ? 'none' : ''; + // Keep search visible so you can scroll back up, but lock it during generated mode. + const lockSearch = state === 'generated'; + this.controlsEl.classList.toggle('locked', lockSearch); + this.songInput.disabled = lockSearch; + this.searchBtn.disabled = lockSearch; + // Keep status visible for layout continuity; just de-emphasize content in generated mode. + if (lockSearch) this.status.textContent = ''; // Selected pre-generation content const showPreGen = state === 'selected';