When creating a preview, the "Create" button stays in "Creating..." state until the entire build finishes. This can take up to 20 minutes (e.g. Elixir builds), leaving the user with no feedback and a frozen form.
The root cause is that the backend (shell::create_preview → run_cmd_with_env) awaits the full CLI command before returning a response, and the frontend mutation stays in isPending the whole time.
The backend should return immediately after kicking off the creation (fire-and-forget or background job) so the UI unblocks. The preview list already polls every 10 seconds (refetchInterval: 10000 in Previews.tsx:24), so the new preview will appear automatically once it's ready.
When creating a preview, the "Create" button stays in "Creating..." state until the entire build finishes. This can take up to 20 minutes (e.g. Elixir builds), leaving the user with no feedback and a frozen form.
The root cause is that the backend (
shell::create_preview→run_cmd_with_env) awaits the full CLI command before returning a response, and the frontend mutation stays inisPendingthe whole time.The backend should return immediately after kicking off the creation (fire-and-forget or background job) so the UI unblocks. The preview list already polls every 10 seconds (
refetchInterval: 10000inPreviews.tsx:24), so the new preview will appear automatically once it's ready.