Checkpoint no commit.

This commit is contained in:
jacob314
2026-03-31 07:45:50 -07:00
parent 7fa8fd6a05
commit 974e25bc29
3 changed files with 6 additions and 2 deletions
@@ -59,6 +59,7 @@ describe('ToolConfirmationQueue', () => {
getPlansDir: () => '/mock/temp/plans',
},
getUseAlternateBuffer: () => false,
getUseTerminalBuffer: () => false,
} as unknown as Config;
beforeEach(() => {
@@ -35,6 +35,7 @@ interface ScrollableListProps<T> extends VirtualizedListProps<T> {
stableScrollback?: boolean;
copyModeEnabled?: boolean;
isStatic?: boolean;
fixedItemHeight?: boolean;
}
export type ScrollableListRef<T> = VirtualizedListRef<T>;
@@ -39,6 +39,7 @@ export type VirtualizedListProps<T> = {
scrollbar?: boolean;
stableScrollback?: boolean;
copyModeEnabled?: boolean;
fixedItemHeight?: boolean;
};
export type VirtualizedListRef<T> = {
@@ -131,6 +132,7 @@ function VirtualizedList<T>(
scrollbar = true,
stableScrollback,
copyModeEnabled = false,
fixedItemHeight = false,
} = props;
const dataRef = useRef(data);
useLayoutEffect(() => {
@@ -443,14 +445,14 @@ function VirtualizedList<T>(
const key = keyExtractor(item, i);
// Always update the key mapping because React can reuse nodes at different indices/keys
nodeToKeyRef.current.set(node, key);
if (!isStatic && !observedNodes.current.has(node)) {
if (!isStatic && !fixedItemHeight && !observedNodes.current.has(node)) {
itemsObserver.observe(node);
}
}
}
for (const node of observedNodes.current) {
if (!currentNodes.has(node)) {
if (!isStatic) {
if (!isStatic && !fixedItemHeight) {
itemsObserver.unobserve(node);
}
nodeToKeyRef.current.delete(node);