Skip to content

fix: keep the sidebar from sticking mid-slide when toggled quickly (INC-423) - #513

Merged
arzafran merged 2 commits into
mainfrom
franco/inc-423-sidebar-stuck-mid-slide
Nov 1, 2026
Merged

arzafran merged 2 commits into
mainfrom
franco/inc-423-sidebar-stuck-mid-slide

Conversation

@arzafran

Copy link
Copy Markdown
Member

What this does

Hiding and showing the sidebar quickly with Cmd+B could leave a window stuck partway through the slide: sidebar rows shifted left and cut off, and the sidebar toggle sitting next to the bell instead of after the traffic lights. It stayed that way until something else redrew the window. This keeps the slide from #503 and makes it always finish in the right place.

Linear: INC-423 (follow-up to INC-387)

Summary

  • SidebarState.toggle() now uses completionCriteria: .removed. With the default (logically complete), a second toggle mid-slide fired the first completion immediately, so endInteractiveGeometryResize() ran while the sidebar was still moving and the AppKit-backed views were left at a partial offset.
  • The completion posts programaSidebarToggleDidSettle. ContentView syncs the terminal portal to the final frame on it.
  • TrafficLightsTrailingEdgeView skips measuring while the slide runs (those frames carry the transition offset, and one of them was seeding the shared lastMeasuredMaxX with ~390 pt instead of 79) and measures again on settle.

Test Plan

  • Tagged build, toggles driven over the socket (debug.shortcut.simulate cmd+b) in pairs with gaps cycling 30 ms to 600 ms, checking the settled zoom-button measurement: before the fix 1 of 24 pairs ended stuck; after it 100 of 100 ended at 79 pt.
  • Window captures after the runs show rows unclipped and the toggle right after the traffic lights.
  • By hand: mash Cmd+B for a few seconds, release, and check the sidebar rows and the toggle position.

Screenshots: before/after needed.

…NC-423)

Wait for the slide to visually finish before ending the portal resize, and
measure the traffic lights only once the sidebar has settled.
@arzafran
arzafran merged commit e2dd94a into main Nov 1, 2026
12 checks passed
@arzafran
arzafran deleted the franco/inc-423-sidebar-stuck-mid-slide branch November 1, 2026 13:26
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