diff --git a/web/bun.lockb b/web/bun.lockb index 1c0d17df..74e0eb97 100755 Binary files a/web/bun.lockb and b/web/bun.lockb differ diff --git a/web/package.json b/web/package.json index a72c06d1..95c7de10 100644 --- a/web/package.json +++ b/web/package.json @@ -38,7 +38,7 @@ "@radix-ui/react-tabs": "^1.1.3", "@radix-ui/react-tooltip": "^1.1.8", "@tailwindcss/vite": "^4.0.7", - "@tanstack/react-query": "^5.66.7", + "@tanstack/react-query": "^5.66.8", "@tanstack/react-router": "^1.106.0", "@tanstack/router-devtools": "^1.106.0", "class-variance-authority": "^0.7.1", @@ -51,7 +51,7 @@ "react-hook-form": "^7.54.2", "react-i18next": "^15.4.1", "react-syntax-highlighter": "^15.6.1", - "sonner": "^2.0.0", + "sonner": "^2.0.1", "tailwind-merge": "^3.0.1", "tailwind-scrollbar": "^4.0.0", "tailwindcss-animate": "^1.0.7", diff --git a/web/src/components/shell-result.tsx b/web/src/components/shell-result.tsx index b0232629..e29adddd 100644 --- a/web/src/components/shell-result.tsx +++ b/web/src/components/shell-result.tsx @@ -29,7 +29,7 @@ import { } from "@/types/shell.ts"; import { TFunction } from "i18next"; import { CircleHelpIcon, FileTextIcon, ScrollTextIcon, TriangleAlertIcon } from "lucide-react"; -import { Fragment, useState } from "react"; +import { Fragment, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { toast } from "sonner"; @@ -280,6 +280,14 @@ function MultiPackResult({ const packMethods = Object.keys(allPackResults ?? {}); const [selectedMethod, setSelectedMethod] = useState(packMethods[0]); const [packResult, setPackResult] = useState(allPackResults?.[selectedMethod as keyof typeof allPackResults] ?? ""); + + useEffect(() => { + const methods = Object.keys(allPackResults ?? {}); + const firstMethod = methods[0]; + setSelectedMethod(firstMethod); + setPackResult(allPackResults?.[firstMethod as keyof typeof allPackResults] ?? ""); + }, [allPackResults]); + return (