Skip to content

Fix sidebar virtual scroll anchoring#2114

Merged
nwparker merged 1 commit into
mainfrom
nwparker/sidebar-virtual-row-repro-v2
May 16, 2026
Merged

Fix sidebar virtual scroll anchoring#2114
nwparker merged 1 commit into
mainfrom
nwparker/sidebar-virtual-row-repro-v2

Conversation

@nwparker

Copy link
Copy Markdown
Contributor

Summary

  • Preserve sidebar scroll from live virtual-row DOM keys before sleep, delete, and group collapse mutations
  • Ignore stale TanStack Virtual measurements for disconnected/mismatched row elements
  • Avoid sleep-triggered PTY exits bumping worktree activity while keeping the marker outside Zustand render state

Verification

  • Electron CDP: right-click Sleep on bottom workspace nwparker/orca-launchctl-env: targetTop 220.00 -> 219.87, maxOverlapAfter 0, shutdown functions stubbed so no real worktree was touched
  • Electron CDP: stubbed context-menu Delete on bottom workspace: delete handler invoked, next row corrected to ~220px, maxOverlapAfter 0, no disk deletion
  • Electron CDP: grouped repo section collapse/expand near bottom: maxOverlapCollapsed 0, maxOverlapExpanded 0
  • pnpm typecheck
  • pnpm lint
  • pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/sidebar/sleep-worktree-flow.test.ts src/renderer/src/components/sidebar/delete-worktree-flow.test.ts src/renderer/src/components/sidebar/worktree-list-groups.test.ts

@nwparker nwparker merged commit 0247190 into main May 16, 2026
2 checks passed
@nwparker nwparker deleted the nwparker/sidebar-virtual-row-repro-v2 branch May 16, 2026 22:05
thomaszdxsn pushed a commit to thomaszdxsn/orca that referenced this pull request Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant