Skip to content

Feature/enhanced UI and notifications#2

Open
s0nik42 wants to merge 3 commits intojacks4ever:mainfrom
s0nik42:feature/enhanced-ui-and-notifications
Open

Feature/enhanced UI and notifications#2
s0nik42 wants to merge 3 commits intojacks4ever:mainfrom
s0nik42:feature/enhanced-ui-and-notifications

Conversation

@s0nik42
Copy link
Copy Markdown

@s0nik42 s0nik42 commented Feb 16, 2026

Summary

This PR introduces significant UI/UX improvements to the Zabbix Monitor app, including clickable navigation to the Zabbix web interface, macOS notifications for new problems, and an enhanced menu bar display.

What's New

🔗 Clickable Navigation

  • Click on any host to open its problems page in Zabbix web UI
  • Click on any problem to open its details in Zabbix web UI
  • Proper URL formatting with filter parameters to show exactly what you need

🔔 Smart Notifications

  • Get notified when new problems occur (not when they're resolved)
  • Problems are grouped by host with a 10-second buffer to avoid notification spam
  • Auto-dismissing notifications for a clean experience
  • Tracks problem state between refreshes to detect only new issues

📊 Improved Menu Bar Display

  • Shows individual severity counts with color-coded emoji badges (⚫ Disaster, 🔴 High, 🟠 Average, 🟡 Warning, 🔵 Info, ⚪ Not Classified)
  • Displays ✅ with total host count when no problems exist
  • Shows ⚠ error occurs
  • All severity levels visible at once for complete status at a glance

👁-Over Previews

  • Hover over host problem badges to see a detailed list of all issues for that host
  • Popover shows problem names, severity, and timestamps
  • Click on problems in the popover to open them in Zabbix
  • Adaptive scrolling (only appears when content exceeds 70% of screen height)

🎯 Better Defaults

  • "Hosts" tab now opens by default instead of "Problems"
  • Each host shows individual severity badges instead of a single combined badge
  • Improved visual hierarchy and clarity

Technical Changes

Files Modified

  • ZabbixMenuBar/ZabbixAPIClient.swift - Added notification system, severity counting, and problem tracking
  • ZabbixMenuBar/ZabbixMenuBarApp.swift - New menu bar status view with emoji-based display, notification authorization
  • ZabbixMenuBar/ZabbixStatusView.swift - Clickable links, mouse-over popovers, per-host severity badges, tab order changes
  • Shared/Localizable.xcstrings - New localized strings for notifications and UI elements
  • README.md - Updated documentation to reflect new features

Key Implementation Details

  • Uses UserNotifications framework for native macOS notifications
  • Tracks previous problem state in UserDefaults to detect new issues
  • 10-second notification buffer using DispatchWorkItem to group problems by host
  • Menu bar updates via @Published properties with .onChange() handlers
  • Zabbix URLs constructed with proper filter parameters (filter_set, hostids[], etc.)
  • Adaptive UI with mouse-over delays to prevent accidental popover dismissal

Testing

Tested on macOS Sequoia with:

  • Multiple severity levels active simultaneously
  • New problem detection and notification delivery
  • Clickable links to Zabbix web UI (hosts and problems)
  • Mouse-over popover functionality with adaptive scrolling
  • Menu bar display updates across all states (problems, no problems, error)

Screenshots

Menu bar now shows all active severity counts:

  • ⚫6 🔴4 🟠13 🟡9 🔵22 (when problems exist)
  • ✅ 103 (when no problems, shows total hosts)

Julien Noël and others added 3 commits February 16, 2026 18:56
Major features:
- Clickable links to Zabbix UI (hosts and problems)
- Enhanced menu bar with color-coded severity indicators
- Smart mouse-over problem preview with adaptive scrolling
- macOS notifications for new problems (grouped by host)
- Improved tab layout (Hosts tab now default)
- Per-host severity badges

Technical improvements:
- Fixed ZabbixProblem model to include hostid and hostname
- Fixed MenuBarExtra label updates with @ObservedObject
- Corrected severity colors (Disaster=black, High=red, Average=orange)
- Better Zabbix URL handling with proper filter parameters
- Improved performance with async notification buffering

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Display hostname below problem name in Problems tab for better context
- Include port in server name display when non-standard (not 80/443)
- Enable Information severity filter by default for more visibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant