fix(sidebar): remeasure visible rows after density changes (#1489)

* fix(sidebar): remeasure visible rows after density changes

* test(credentials): avoid flaky Ed25519 key generation
This commit is contained in:
ZacharyZcR authored and GitHub committed 2026-09-27 17:36:11 -05:00
1 parent 107cf55d8c
commit 5f3372f9f6
2 files changed
+135

No files matched your search

+6
View File
@@ -861,6 +861,12 @@ export function SidebarTree({
// and made the list visibly jump apart on every pointer move.
useLayoutEffect(() => {
virtualizer.measure();
// Rebuild the cleared size cache before measuring the mounted rows again.
virtualizer.getTotalSize();
// Unchanged rows will not trigger ResizeObserver after their cache is cleared.
parentRef.current
?.querySelectorAll<HTMLElement>("[data-index]")
.forEach((element) => virtualizer.measureElement(element));
}, [virtualizer, density, trayTrigger, showTags, showResourceBars]);
if (loading) {