@@ -265,21 +311,30 @@ export const OperationsList = ({
// In that case, only match operations with empty name
// If selectedOperationName has a value, match operations with that exact name
const operationName = operation.name || "";
+
+ // Use optimistic selection for immediate feedback, fallback to prop
+ const currentSelection = optimisticSelection || selectedOperation;
const isSelected =
- selectedOperation?.hash === operation.hash &&
- (selectedOperation?.name === null ||
- selectedOperation?.name === undefined
+ currentSelection?.hash === operation.hash &&
+ (currentSelection?.name === null ||
+ currentSelection?.name === undefined
? true // No name filter set, match by hash only
- : selectedOperation?.name === operationName); // Name filter exists, match exact name
+ : currentSelection?.name === operationName); // Name filter exists, match exact name
return (
- onOperationSelect(operation.hash, operation.name || "")
- }
+ onClick={() => {
+ // Update optimistic state immediately for instant UI feedback
+ setOptimisticSelection({
+ hash: operation.hash,
+ name: operationName,
+ });
+ // Then update URL (which will eventually sync back via prop)
+ onOperationSelect(operation.hash, operationName);
+ }}
searchQuery={searchQuery}
sortField={sortField}
/>
diff --git a/studio/src/components/operations/operations-search.tsx b/studio/src/components/operations/operations-search.tsx
index b9661f95cb..006c90850f 100644
--- a/studio/src/components/operations/operations-search.tsx
+++ b/studio/src/components/operations/operations-search.tsx
@@ -7,6 +7,11 @@ import {
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
import {
MagnifyingGlassIcon,
XMarkIcon,
@@ -222,21 +227,30 @@ export const OperationsSearch = ({
{/* Sort Controls */}
-
+
+
+
+
+
+
+ Sort {sortDirection === "desc" ? "ascending" : "descending"}
+
+
+