fix(sandbox): fetch artifacts on mount for blue dot indicator

Remove enabled condition so data is fetched when component mounts,
allowing blue dot to show when files exist even before expanding.
TanStack Query handles request deduplication automatically.
This commit is contained in:
yyh 2026-01-26 16:53:08 +08:00
parent 5cdd69e7e0
commit 2c02c8ac18
No known key found for this signature in database

View File

@ -23,9 +23,7 @@ const ArtifactsSection: FC<ArtifactsSectionProps> = ({ className }) => {
const [isExpanded, setIsExpanded] = useState(false)
const { data: treeData, hasFiles, isLoading } = useSandboxFilesTree(sandboxId, {
enabled: isExpanded,
})
const { data: treeData, hasFiles, isLoading } = useSandboxFilesTree(sandboxId)
const downloadMutation = useDownloadSandboxFile(sandboxId)