# User Guide - New Features

## 🎯 What's New?

Your HSP (Health Status Page) app now includes powerful monitoring features:

1. **Menu Bar Integration** (macOS only) - Quick access to all your status pages
2. **Smart Notifications** - Get alerted when incidents or maintenances occur
3. **Auto-Refresh** - Background monitoring keeps you updated every minute
4. **Quick Navigation** - Click any status page to jump right to it

---

## 🍎 Menu Bar (macOS)

### What You'll See

Look for the HSP icon in your menu bar (top-right corner of your screen). The icon changes based on your overall status:

- ✅ **Green checkmark** - Everything is operational
- ⚠️ **Yellow triangle** - Something is degraded
- ❌ **Red X** - Something is down or there's an active incident
- 🔧 **Wrench** - Maintenance in progress
- ❓ **Question mark** - No status pages yet

### How to Use It

**Click the icon** to see:

```
🟢 Operational
─────────────────
🟢 Production API
🟡 Staging Server
🔴 Database Cluster
─────────────────
Active Incidents
🚨 Database Performance
─────────────────
Refresh       ⌘R
Open Dashboard ⌘D
─────────────────
Quit          ⌘Q
```

**Actions:**
- **Click a status page** → Opens the app and shows that page's details
- **Click an incident** → Opens the app (future: shows incident details)
- **Click "Refresh"** → Updates all data immediately
- **Click "Open Dashboard"** → Brings the main window to front
- **Click "Quit"** → Closes the app

### Status Indicators

Each item in the menu shows a colored circle:
- 🟢 = Operational (all good!)
- 🟡 = Degraded (having issues)
- 🔴 = Down (offline or critical)
- 🔵 = Under Maintenance (planned work)

---

## 🔔 Notifications

### Setup (First Time Only)

When you first launch the updated app, you'll see:

```
"HSP" Would Like to Send You Notifications
This allows the app to notify you about new incidents
and scheduled maintenances.

[Don't Allow]  [Allow]
```

Click **Allow** to receive notifications.

### What You'll Get Notified About

**Incidents** (Problems that need attention):
```
🚨 New Incident
Database Connectivity Issues

Users may experience slow response times
when accessing the database.
```

**Maintenances** (Scheduled work):
```
🛠️ Scheduled Maintenance
Routine Database Upgrade

We'll be performing database maintenance
tonight from 10 PM to 2 AM.
```

### Notification Behavior

✅ **Smart Detection:**
- Only notifies you of *new* incidents/maintenances
- Won't spam you with repeats
- Checks for changes every minute

✅ **Interactive:**
- Click any notification to open the app
- Dismiss notifications you've seen

⚠️ **Note:** You'll only get notified the *first time* something appears. If you miss it, check the menu bar or dashboard.

---

## 🔄 Auto-Refresh

### How It Works

The app automatically checks for updates every **60 seconds** (1 minute) in the background.

**What Gets Updated:**
- ✅ All status pages
- ✅ Active incidents
- ✅ Scheduled maintenances
- ✅ Menu bar icon and list
- ✅ Dashboard data

**When:**
- Runs automatically as long as the app is open
- Works even when the app is in the background
- Continues even if the main window is closed (on macOS)

**Manual Refresh:**
- Click "Refresh" in the menu bar
- Or use the refresh button in the dashboard

---

## 🧭 Quick Navigation

### From Menu Bar

1. Click the HSP icon in your menu bar
2. Click any status page name
3. App opens and shows that status page automatically

**Example:**
```
Click: 🟡 Staging Server
  ↓
Opens: App → Staging Server detail view
```

### From Notifications

1. Receive a notification about an incident
2. Click the notification
3. App opens to the dashboard

---

## ⚙️ Settings & Cleanup

### Removing Your API Key

If you need to clear your data or switch API keys:

1. Open the app
2. Click the ⚙️ (gear) icon
3. Click "Delete API Key"
4. Confirm the deletion

**What Happens:**
- ✅ Dashboard clears immediately
- ✅ Menu bar resets
- ✅ Polling stops
- ✅ All data is removed
- ✅ You can add a new API key and start fresh

---

## 💡 Tips & Tricks

### Tip 1: Leave It Running
The app is designed to run in the background. Keep it running and it'll notify you when something changes!

### Tip 2: Menu Bar is Fastest
On macOS, the menu bar is the quickest way to check status. One click shows everything.

### Tip 3: Color Coding
Learn the colors:
- 🟢 Green = Good
- 🟡 Yellow = Watch it
- 🔴 Red = Problem
- 🔵 Blue = Maintenance

### Tip 4: Desktop Notifications
Make sure your Mac/iPhone allows notifications from HSP. Check:
- Mac: System Settings → Notifications → HSP
- iPhone: Settings → Notifications → HSP

---

## ❓ FAQ

### Q: Why isn't the menu bar showing?
**A:** Menu bar integration is macOS-only. On iOS, use the main app.

### Q: I'm not getting notifications. Why?
**A:** Check:
1. Did you allow notifications when prompted?
2. Go to System Settings → Notifications → HSP
3. Make sure "Allow Notifications" is ON
4. Make sure your API key is valid

### Q: How often does it check for updates?
**A:** Every 60 seconds (1 minute) automatically.

### Q: Can I change the refresh interval?
**A:** Currently it's fixed at 60 seconds. Future versions may allow customization.

### Q: Does it work offline?
**A:** No, it requires internet connection to fetch status data.

### Q: Will it drain my battery?
**A:** No. The app is very efficient:
- Only checks once per minute
- Uses minimal data
- Optimized network requests
- Background operations are lightweight

### Q: Can I use multiple API keys?
**A:** Not yet. Currently supports one API key at a time. This may be added in the future.

### Q: The icon disappeared from my menu bar!
**A:** Try:
1. Quit and restart the app
2. Check your API key is still valid
3. Make sure you're on macOS (menu bar is Mac-only)

---

## 🆘 Troubleshooting

### Problem: No status pages showing
**Solution:**
1. Check your API key is entered correctly
2. Click "Refresh" in the menu or dashboard
3. Check your internet connection

### Problem: Notifications not appearing
**Solution:**
1. Open System Settings → Notifications
2. Find HSP in the list
3. Enable "Allow Notifications"
4. Try creating a test incident

### Problem: Menu bar icon not updating
**Solution:**
1. Click "Refresh" in the menu
2. Wait 60 seconds for auto-refresh
3. If still stuck, quit and restart the app

### Problem: Can't see incident details from menu
**Solution:**
- Clicking incidents currently opens the app
- Direct navigation to incident details is coming in a future update
- For now, navigate manually once the app opens

### Problem: Dashboard shows old data after API key delete
**Solution:**
- This is now fixed in this version!
- Dashboard should clear immediately
- If not, restart the app

---

## 🎓 Quick Start Guide

**New User? Here's how to get started:**

1. **Add Your API Key**
   - Click ⚙️ settings
   - Paste your StatusPage.me API key
   - Click "Save"

2. **Grant Notification Permission**
   - Click "Allow" when prompted
   - (You can change this later in System Settings)

3. **Check Your Menu Bar** (macOS)
   - Look for the HSP icon top-right
   - Click it to see your status pages

4. **Explore the Dashboard**
   - See all your status pages at a glance
   - Click any page to see details
   - Check incidents, monitors, and components

5. **Let It Run**
   - App monitors in the background
   - You'll be notified of any changes
   - Check the menu bar anytime for quick status

**That's it! You're all set.** 🎉

---

## 📞 Need Help?

- Check the documentation in the repository
- Review FEATURE_IMPLEMENTATION.md for technical details
- File an issue on GitHub for bugs or feature requests

---

**Enjoy your monitoring experience!** 🚀
