diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 952d9d3..daf845b 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -56,6 +56,8 @@ function App() { const [updateInstruction, setUpdateInstruction] = useState(""); const [isImportedFromCode, setIsImportedFromCode] = useState(false); + const textareaRef = useRef(null); + const { disableInSelectAndEditMode } = useAppStore(); // Settings @@ -403,6 +405,13 @@ function App() { setAppState(AppState.CODE_READY); } + // When coding is complete, focus on the update instruction textarea + useEffect(() => { + if (appState === AppState.CODE_READY && textareaRef.current) { + textareaRef.current.focus(); + } + }, [appState]); + return (
{IS_RUNNING_ON_CLOUD && } @@ -501,8 +510,14 @@ function App() {