Notch stays open while the «Дела» popover is open

- isHeldOpen counts the open popover (only while the notch is expanded).
- Any fold — ⌃, Escape, AppState hiding the island, setMode — clears the flag in
  AppState.mode's didSet, so a stale flag can neither hold the notch nor pop the menu up
  on the next opening.
- When the popover closes with the pointer already away, the FSM gets mouseLeft, so the
  notch folds on its usual delay instead of waiting for the next hover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maksarsanjeev
2026-10-10 03:47:26 +03:00
parent 18aed2beb9
commit 011c709acf
2 changed files with 16 additions and 1 deletions
+5 -1
View File
@@ -8,7 +8,11 @@ final class AppState: ObservableObject {
static let shared = AppState()
// Island state
@Published var mode: IslandMode = .hidden
@Published var mode: IslandMode = .hidden {
// The «Дела» popover lives only in the open notch: whatever folds it, the flag
// goes with it (a stale flag would hold the notch or pop the menu up later).
didSet { if mode != .expanded && botMenuOpen { botMenuOpen = false } }
}
@Published var view: IslandView = .overview {
didSet {
// Any way into the chat (drop → "Задать вопрос", shortcuts…) lands in a brov-chat tab.