From d0271cb46f2871c201f39c51e35356efd4658eac Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Mon, 10 Aug 2026 08:45:11 -0700 Subject: [PATCH] test(sidebar): lock host sticky geometry --- .../sidebar/worktree-list-virtual-rows.test.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/sidebar/worktree-list-virtual-rows.test.ts b/src/renderer/src/components/sidebar/worktree-list-virtual-rows.test.ts index 07216831f62..77e844a8681 100644 --- a/src/renderer/src/components/sidebar/worktree-list-virtual-rows.test.ts +++ b/src/renderer/src/components/sidebar/worktree-list-virtual-rows.test.ts @@ -2,6 +2,7 @@ import { describe, expect, it } from 'vitest' import type { VirtualItem } from '@tanstack/react-virtual' import type { ExecutionHostId } from '../../../../shared/execution-host' import { + HOST_HEADER_INNER_TOP_PADDING, HOST_STICKY_GROUP_TOP_PX, HOST_STICKY_PINNED_HEIGHT, buildLineageRowRekeyMap, @@ -207,9 +208,11 @@ describe('getActiveStickyIndexesForScroll', () => { groupRow('b1'), itemStub('wt-2') ] - expect(estimateRenderRowSize(multiGroupRows, 0, 0, null)).toBe(HOST_STICKY_PINNED_HEIGHT) - expect(estimateRenderRowSize(multiGroupRows, 3, 0, null)).toBe(HOST_STICKY_PINNED_HEIGHT + 4) - expect(HOST_STICKY_GROUP_TOP_PX).toBe(HOST_STICKY_PINNED_HEIGHT - 1) + expect(HOST_HEADER_INNER_TOP_PADDING).toBe(4) + expect(HOST_STICKY_PINNED_HEIGHT).toBe(36) + expect(estimateRenderRowSize(multiGroupRows, 0, 0, null)).toBe(36) + expect(estimateRenderRowSize(multiGroupRows, 3, 0, null)).toBe(40) + expect(HOST_STICKY_GROUP_TOP_PX).toBe(35) const multiSticky = getStickyHeaderIndexes(multiGroupRows) const gap = 6