0 ? archivedTotalSize : undefined,
- width: '100%',
- }}
- >
- {archivedVirtualRows.map((virtualRow) => {
- const node = visibleSessions[virtualRow.index];
- if (!node) return null;
- return (
-
- {renderSessionNode(node, 0, group.directory, projectId, true)}
-
- );
- })}
+
+
+ {(node) => renderSessionNode(node, 0, group.directory, projectId, true) as React.ReactElement}
+
) : (
visibleSessions.map((node) => renderSessionNode(node, 0, group.directory, projectId, group.isArchivedBucket === true))
diff --git a/packages/ui/src/components/ui/JsonTreeViewer.tsx b/packages/ui/src/components/ui/JsonTreeViewer.tsx
index 6e094a9d..d5b7b0e1 100644
--- a/packages/ui/src/components/ui/JsonTreeViewer.tsx
+++ b/packages/ui/src/components/ui/JsonTreeViewer.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { useVirtualizer } from '@tanstack/react-virtual';
+import { Virtualizer } from 'virtua';
import {
parseJsonToTree,
@@ -204,14 +204,6 @@ const JsonTreeViewer = React.forwardRef<{ expandAll: () => void; collapseAll: ()
const shouldVirtualize = flatNodes.length > VIRTUALIZE_THRESHOLD;
const parentRef = React.useRef
(null);
- const virtualizer = useVirtualizer({
- count: flatNodes.length,
- getScrollElement: () => parentRef.current,
- estimateSize: () => ROW_HEIGHT,
- overscan: 20,
- enabled: shouldVirtualize,
- });
-
const handleToggle = React.useCallback((id: string) => {
setCollapsedPaths((prev) => {
const next = new Set(prev);
@@ -246,37 +238,21 @@ const JsonTreeViewer = React.forwardRef<{ expandAll: () => void; collapseAll: ()
className={className}
style={{ maxHeight, overflow: 'auto' }}
>
-
- {virtualizer.getVirtualItems().map((virtualRow) => {
- const flatNode = flatNodes[virtualRow.index];
- if (!flatNode) return null;
- return (
-
-
-
- );
- })}
-
+ {(flatNode) => (
+
+ )}
+
);
}
diff --git a/packages/ui/src/components/ui/UpdateDialog.tsx b/packages/ui/src/components/ui/UpdateDialog.tsx
index 757d0128..b50add83 100644
--- a/packages/ui/src/components/ui/UpdateDialog.tsx
+++ b/packages/ui/src/components/ui/UpdateDialog.tsx
@@ -369,7 +369,7 @@ export const UpdateDialog: React.FC