Skip to content

feat(sidebar): preserve scroll position across branch navigation#664

Merged
Kewton merged 1 commit intodevelopfrom
feature/651-worktree
Apr 14, 2026
Merged

feat(sidebar): preserve scroll position across branch navigation#664
Kewton merged 1 commit intodevelopfrom
feature/651-worktree

Conversation

@Kewton
Copy link
Copy Markdown
Owner

@Kewton Kewton commented Apr 14, 2026

Summary

  • スクロール位置をスクロール時・ブランチクリック時に localStorage へ保存
  • リマウント後、requestAnimationFrame でスクロール位置を復元
  • lastSidebarScrollTop インメモリキャッシュにより、localStorage 読み取り前のクライアントサイドリマウントにも対応

Test plan

  • 全ユニットテスト 334ファイル、6322テスト パス (npm run test:unit)
  • スクロール位置保存テスト追加 (should save branch list scroll position on click)
  • スクロール位置復元テスト追加 (should restore branch list scroll position after remount)

🤖 Generated with Claude Code

Save the branch list scroll position to localStorage on scroll and on
branch click, and restore it after remount via requestAnimationFrame.
Uses an in-memory cache (lastSidebarScrollTop) so the position is also
available during client-side remounts before localStorage is read.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Kewton Kewton merged commit e1f4239 into develop Apr 14, 2026
5 checks passed
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