From 9856c7fb90502a5106c80ee55376376ce6d41f5b Mon Sep 17 00:00:00 2001 From: Zak Bearman Date: Thu, 10 Sep 2026 15:47:50 +1200 Subject: [PATCH] Collapse request discovery after selecting a title --- .../app/new-requests/NewRequestClient.tsx | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/frontend/app/new-requests/NewRequestClient.tsx b/frontend/app/new-requests/NewRequestClient.tsx index 90c5835..83ff815 100644 --- a/frontend/app/new-requests/NewRequestClient.tsx +++ b/frontend/app/new-requests/NewRequestClient.tsx @@ -124,6 +124,21 @@ export default function NewRequestClient() { if (!getToken()) router.push('/login') }, [router]) + const selectedTitleId = selected?.tmdbId + useEffect(() => { + if (selectedTitleId) configureSectionRef.current?.focus() + }, [selectedTitleId]) + + const changeTitle = () => { + setSelected(null) + setOptions(null) + setSelectedSeasons([]) + setOperation(null) + setError(null) + setSuccess(null) + window.requestAnimationFrame(() => document.getElementById('request-title-search')?.focus()) + } + const resetAfterType = (nextType: MediaType) => { setMediaType(nextType) setQuery('') @@ -197,7 +212,6 @@ export default function NewRequestClient() { setError(null) setSuccess(null) if (item.requestId) { - window.setTimeout(() => configureSectionRef.current?.scrollIntoView({ behavior: 'smooth', block: 'start' }), 80) return } @@ -236,7 +250,6 @@ export default function NewRequestClient() { setError(caught instanceof Error ? caught.message : 'Could not load request options.') } finally { setLoadingOptions(false) - window.setTimeout(() => configureSectionRef.current?.scrollIntoView({ behavior: 'smooth', block: 'start' }), 80) } } @@ -332,7 +345,7 @@ export default function NewRequestClient() { {error &&
{error}
} {success &&
{success}
} -
+ {!selected &&
01
Start here

What are you looking for?

@@ -360,9 +373,9 @@ export default function NewRequestClient() { ))}
-
+
} - {mediaType && ( + {mediaType && !selected && (
02 @@ -384,7 +397,7 @@ export default function NewRequestClient() {
)} - {mediaType && searchAttempted && !searching && ( + {mediaType && !selected && searchAttempted && !searching && (
03 @@ -399,12 +412,11 @@ export default function NewRequestClient() {
{results.map((item) => { const poster = artworkUrl(item.posterPath) - const isSelected = selected?.tmdbId === item.tmdbId && selected.type === item.type return ( ) @@ -425,12 +437,14 @@ export default function NewRequestClient() { )} {selected && ( -
+
04 -
Final step

{selected.requestId ? 'This title is already in the pipeline' : 'Configure your request'}

+
Final step

{selected.requestId ? 'This title is already in the pipeline' : selected.type === 'tv' ? 'Choose seasons and request' : 'Review and request'}

+ +
{selectedPoster ? : No artwork} @@ -448,7 +462,7 @@ export default function NewRequestClient() {
) : loadingOptions ? ( -
Checking Seerr and {selected.type === 'tv' ? 'Sonarr' : 'Radarr'}…

Loading valid profiles and request choices.

+
Checking Seerr and {selected.type === 'tv' ? 'Sonarr' : 'Radarr'}…

Preparing your request options.

) : options ? (
{selected.type === 'tv' && (