Repository navigation
Toggle the inspector without animation to avoid a hang on macOS 27 - #27
Merged
phalladar merged 2 commits intoNov 25, 2026
Merged
Conversation
Animating the inspector while the treemap has a .contextMenu loops AppKit's constraint pass until it throws. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On macOS 27, clicking the Inspector button after a scan hangs the app at 100% CPU. Sometimes it recovers after several seconds. Other times AppKit throws from
-[NSWindow _postWindowNeedsUpdateConstraints]while collapsing the split view item, and the app aborts.Cause
Animating the
.inspectorloops AppKit's constraint pass when the treemap view has a.contextMenu. Any context menu triggers it, even a static one with a single button. Without the context menu, or without the animation, it doesn't happen.NavigationSplitView,.inspectorand the same toolbar button doesn't hang.mainand back to 1c963ec (Nov 5), on both a local SDK 15 build and one stamped as SDK 26. So it looks like a change in macOS 27 rather than in a recent commit.Fix
Toggle
showInspectorwithout animation. The inspector now appears and disappears without sliding.I didn't try to keep the animation. That would likely mean replacing the treemap's SwiftUI
.contextMenuwith an AppKitNSMenu, a much bigger PR, and I didn't want to drop a large review on you for a cosmetic gain. Still, it would be worth digging deeper, either to restore the animation or to find out whether a later macOS 27 update fixes it.Validation
mainit hangs at about 99% CPU, with_setCollapsed:animated:in the stack. On this branch it stays at 0% after three clicks, on a local SDK 15 build and on one stamped as SDK 26.swift build,swift test.🤖 Generated with Claude Code