Skip to content

fix(sidebar): remove group header underline; eliminate drag-resize lag#658

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

fix(sidebar): remove group header underline; eliminate drag-resize lag#658
Kewton merged 1 commit intodevelopfrom
feature/651-worktree

Conversation

@Kewton
Copy link
Copy Markdown
Owner

@Kewton Kewton commented Apr 14, 2026

Summary

  • グループヘッダーのアンダーライン削除: GroupHeader から border-b border-gray-700 を除去
  • ドラッグリサイズのタイムラグ解消: ドラッグ中はReact stateをバイパスしてDOM直接書き込みで即時追従。mouseup時のみReact state(localStorage)に永続化

Changes

File Change
src/components/layout/Sidebar.tsx GroupHeaderのborder-b削除
src/components/layout/AppShell.tsx ResizeHandleをDirect DOM方式に変更(sidebarRef/mainRef経由)、ドラッグ中のpadding transition無効化

Technical detail (drag-resize lag fix)

ドラッグ中のタイムラグの根本原因:

  1. mousemove のたびに setWidth → React state更新 → 再レンダリング発生
  2. transition-[padding] duration-300 が毎ピクセルの変化をアニメーション

対応:

  • ドラッグ中: sidebarRef.current.style.widthmainRef.current.style.paddingLeft をDOM直接更新(React state変更なし)
  • ドラッグ中: main.style.transition = 'none' でアニメーション抑制
  • mouseup時: main.style.transition = '' でアニメーション復元
  • mouseup時: setWidth(finalWidth) で一度だけ React state + localStorage に永続化

Test plan

  • npx tsc --noEmit — 0 errors
  • npm run lint — 0 errors/warnings
  • npm run test:unit — 334 files, 6319 tests passed

🤖 Generated with Claude Code

- Remove border-b from GroupHeader in Sidebar.tsx
- ResizeHandle: bypass React state during drag via direct DOM writes to
  sidebar.style.width and main.style.paddingLeft; disable padding
  transition while dragging; commit final width to React state on mouseup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Kewton Kewton merged commit aaf93b9 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