fix(macos): keep menu width stable while open
This commit is contained in:
@@ -66,6 +66,7 @@
|
|||||||
- Chat UI polish: tool call cards + merged tool results, glass background, tighter composer spacing, visual effect host tweaks.
|
- Chat UI polish: tool call cards + merged tool results, glass background, tighter composer spacing, visual effect host tweaks.
|
||||||
- OAuth storage moved; legacy session syncing metadata removed.
|
- OAuth storage moved; legacy session syncing metadata removed.
|
||||||
- Remote SSH tunnels now get health checks; Debug → Ports highlights unhealthy tunnels and offers Reset SSH tunnel.
|
- Remote SSH tunnels now get health checks; Debug → Ports highlights unhealthy tunnels and offers Reset SSH tunnel.
|
||||||
|
- Menu bar session/node sections no longer reflow while open, keeping hover highlights aligned.
|
||||||
|
|
||||||
### Nodes & Canvas
|
### Nodes & Canvas
|
||||||
- Debug status overlay gated and toggleable on macOS/iOS/Android nodes.
|
- Debug status overlay gated and toggleable on macOS/iOS/Android nodes.
|
||||||
|
|||||||
@@ -52,27 +52,17 @@ final class MenuSessionsInjector: NSObject, NSMenuDelegate {
|
|||||||
self.inject(into: menu)
|
self.inject(into: menu)
|
||||||
self.injectNodes(into: menu)
|
self.injectNodes(into: menu)
|
||||||
|
|
||||||
// Refresh in background for the next open (but only when connected).
|
// Refresh in background for the next open (but do not re-inject while open).
|
||||||
self.loadTask?.cancel()
|
self.loadTask?.cancel()
|
||||||
self.loadTask = Task { [weak self] in
|
self.loadTask = Task { [weak self] in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
await self.refreshCache(force: false)
|
await self.refreshCache(force: false)
|
||||||
await MainActor.run {
|
|
||||||
guard self.isMenuOpen else { return }
|
|
||||||
// SwiftUI might have refreshed menu items; re-inject once.
|
|
||||||
self.inject(into: menu)
|
|
||||||
self.injectNodes(into: menu)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.nodesLoadTask?.cancel()
|
self.nodesLoadTask?.cancel()
|
||||||
self.nodesLoadTask = Task { [weak self] in
|
self.nodesLoadTask = Task { [weak self] in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
await self.nodesStore.refresh()
|
await self.nodesStore.refresh()
|
||||||
await MainActor.run {
|
|
||||||
guard self.isMenuOpen else { return }
|
|
||||||
self.injectNodes(into: menu)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user