From 93601e58e0a5cb4789592fba3e8d918eae155a60 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 1 Sep 2026 19:07:20 +0200 Subject: [PATCH] feat: Studio bulk ops, perf fixes, bug fixes, confirm dialog visibility Confirm Dialog: - Overlay opacity 80% -> 95% (solid black) - Card uses bg-surface with glow shadow ring-primary/40 - Added AlertTriangle icon for danger variant - Removed backdrop-blur for maximum opacity Studio features: - Bulk delete: select imported items and delete in batch - Bulk nitro regen: select items missing .nitro and regenerate all - Added Trash2 and RefreshCw toolbar buttons for bulk actions Performance: - BatchProgress: React.memo + useMemo for entries/total/completed/percent - BatchProgress: ETA interval uses useRef to avoid re-creation per completed - CatalogRail: React.memo + useCallback for toggle - Removed redundant double setBatchProgress calls - Removed redundant new Map(initial) wrapping Bug fixes: - importBatch: stale batchDone closure always cleared progress panel (use ref) - importBatch: added missing toast.error on HTTP failure - bulkRegenNitro: now checks per-item results instead of marking all as succeeded - single deleteItem: now removes classname from selected set - retryFailed: clears progress panel on HTTP error and stream error - Removed unused 'done' variable (2x) from cloneAllMissing/retryFailed Lint: - biome format fixes for selectedMissingNitro and setItems --- src/components/admin/confirm-dialog.tsx | 24 ++- .../admin/studio/batch-progress.tsx | 47 +++-- src/components/admin/studio/catalog-rail.tsx | 10 +- src/components/admin/studio/studio-client.tsx | 178 ++++++++++++++++-- 4 files changed, 214 insertions(+), 45 deletions(-) diff --git a/src/components/admin/confirm-dialog.tsx b/src/components/admin/confirm-dialog.tsx index 615a85567e..9170492926 100644 --- a/src/components/admin/confirm-dialog.tsx +++ b/src/components/admin/confirm-dialog.tsx @@ -1,5 +1,6 @@ "use client"; +import { AlertTriangle } from "lucide-react"; import { AnimatePresence, motion } from "motion/react"; import { useCallback, useEffect, useRef, useState } from "react"; import { createPortal } from "react-dom"; @@ -77,7 +78,7 @@ export function ConfirmDialog({ )} + + {selectedMissingNitro.length > 0 && !batchProgress && ( + + )} + + {selectedImported.length > 0 && !batchProgress && ( + + )} {/* ── Body: rail + grid + drawer ────────────────────── */}