From 810887e2cdc36e0a32e2f10e01613de16f9caef9 Mon Sep 17 00:00:00 2001 From: Tanish Manku Date: Thu, 16 Apr 2026 09:57:13 -0700 Subject: [PATCH] fix video aspect ratio icon not updating on gallery recreate getCurrentAspectRatioIcon() was reading from aspectRatioList (useState), which is only updated on manual picker clicks, not external store writes. Reading aspectRatio from the store directly fixes the stale icon. --- frontend/libs/components/promptbox/src/lib/PromptBoxVideo.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/libs/components/promptbox/src/lib/PromptBoxVideo.tsx b/frontend/libs/components/promptbox/src/lib/PromptBoxVideo.tsx index ac8b42f630..305f061c94 100644 --- a/frontend/libs/components/promptbox/src/lib/PromptBoxVideo.tsx +++ b/frontend/libs/components/promptbox/src/lib/PromptBoxVideo.tsx @@ -759,9 +759,8 @@ export const PromptBoxVideo = ({ }; const getCurrentAspectRatioIcon = (): SizeIconOption => { - const selectedLabel = aspectRatioList.find((item) => item.selected)?.label; const allOptions = selectedModel?.sizeOptions ?? DEFAULT_RESOLUTIONS; - const match = allOptions.find((o) => o.textLabel === selectedLabel); + const match = allOptions.find((o) => o.textLabel === aspectRatio); return match?.icon ?? SizeIconOption.Landscape; };