保持弹窗打开时的位置稳定 - #22
Merged
Merged
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — locks NSStatusItem length while the popover is open so the anchor position stays stable when ticker content width changes. Also tightens NotificationCenter observer lifecycle in PopoverController.
- Lock popover anchor width —
StatusItemController.lockedPopoverLengthoverridestickerView.totalWidthin all sizing paths while non-nil, set before showing the popover and cleared on close. - Popover close callback —
PopoverController.onClosewired tounlockPopoverLength(), ensuring the width lock is released regardless of how the popover closes (.transientbehavior, programmatic close, or outside-click). - Observer lifecycle fix —
didCloseObservercorrectly stores the block-based observer token for targeted removal indeinit; previousremoveObserver(self)was a no-op for block-based observers. - MainActor safety —
handlePopoverClosedwrapped inTask { @MainActor }in the notification callback, guarding against non-main-thread delivery.
DeepSeek Flash | 𝕏
This was referenced Jun 4, 2026
Merged
Merged
Merged
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.

这个 PR 调整菜单栏弹窗的锚点逻辑,避免菜单栏内容宽度变化时弹窗左右跳动。
改动内容:
验证: