Refactor the filter/sort menu to prevent it from closing when the
connection list refreshes. On iOS, use UIButton with UIMenu via
UIViewRepresentable with a Coordinator to track state changes and
only update menu when filter/sort values actually change. On macOS,
extract menu to a separate SwiftUI view to isolate dependencies.