You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c014e36
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(web): resize drags, panel shells and the browser host own their listeners
The right panel, sidebar rail and Electron browser host kept DOM listeners,
leases and drag state alive through effects that re-read "latest" refs, and
the panel shell re-rendered two frames after every resize to restore its
width transition.
- useResizeDrag: one drag object per handle; blur is listened to only during
a drag, the handle's ref abandons a drag on unmount, and bounds travel with
the session instead of a latest-options ref.
- useResizableWidth: a drag commits to the storage key and width it started
from; only the mid-drag bounds refresh stays a layout effect.
- usePreviewPanelInlineSize / PreviewPanelShell: the shell's ref callback
measures the row; the width transition is disabled in the commit that
changes width and re-enabled by the next open/close, so no rAF effect or
extra render. Focus/inert effects are unchanged.
- sidebar: open state lives in a per-provider store, so collapsing moves
focus out and cancels a rail drag from the handler; inert is a prop. The
rail's width-restore effect is dropped (AppSidebarLayout already restores).
- RightPanelTabs: the tab strip's scroll, resize and wheel listeners are owned
by its ref callback.
- BrowserSurfaceSlot: the surface lease is owned by the slot's ref callback.
- ElectronBrowserHost: annotation theme sync, agent pointer and open-link
listeners start with the app services.
Effects in touched files: 21 -> 7. Kept: tab scrollIntoView, the two
keyboard listeners in RightPanelTabs, the panel shell focus/inert pair, the
slot's presentation update, and the resizable width bounds refresh.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
0 commit comments