# URGENT FIXES - v1.5.1

## Changes to Implement:

### AppDelegate.swift - Menu Structure

Replace the entire updateMenu() method with this cleaner version:

```swift
private func updateMenu() {
    menu.removeAllItems()
    
    // Enable/Disable toggle
    let toggleTitle = settings.isEnabled ? "✓ Enabled" : "Enable"
    let toggleItem = NSMenuItem(title: toggleTitle, action: #selector(toggleEnabled), keyEquivalent: "")
    toggleItem.target = self
    menu.addItem(toggleItem)
    
    menu.addItem(NSMenuItem.separator())
    
    // === STATISTICS (Inline) ===
    // Header + Period Switcher
    let periodLine = buildPeriodSwitcherLine()
    menu.addItem(periodLine)
    
    // Stats for current period
    let stats = settings.statistics.stats(for: settings.statisticsPeriod)
    
    addStatLine("\(stats.totalConversions) conversions")
    addStatLine("\(stats.totalCharacters) characters")
    
    // Language breakdowns
    if stats.totalConversions > 0 {
        let directions = Set(stats.fromCounts.keys).union(Set(stats.toCounts.keys))
        for lang in directions.sorted() {
            let count = stats.toCounts[lang] ?? 0
            if count > 0 {
                addStatLine("→ \(lang): \(count)")
            }
        }
    }
    
    menu.addItem(NSMenuItem.separator())
    
    // Current keyboard pair
    let keyboardPairItem = NSMenuItem(title: getCurrentKeyboardPair(), action: nil, keyEquivalent: "")
    keyboardPairItem.isEnabled = false
    menu.addItem(keyboardPairItem)
    
    menu.addItem(NSMenuItem.separator())
    
    // Preferences
    let preferencesItem = NSMenuItem(title: "Preferences…", action: #selector(showPreferences), keyEquivalent: ",")
    preferencesItem.target = self
    menu.addItem(preferencesItem)
    
    menu.addItem(NSMenuItem.separator())
    
    // Feedback
    let feedbackItem = NSMenuItem(title: "Feedback…", action: #selector(showFeedback), keyEquivalent: "")
    feedbackItem.target = self
    menu.addItem(feedbackItem)
    
    // About
    let aboutItem = NSMenuItem(title: "About…", action: #selector(showAbout), keyEquivalent: "")
    aboutItem.target = self
    menu.addItem(aboutItem)
    
    menu.addItem(NSMenuItem.separator())
    
    // Quit
    let quitItem = NSMenuItem(title: "Quit", action: #selector(quit), keyEquivalent: "q")
    quitItem.target = self
    menu.addItem(quitItem)
}

private func buildPeriodSwitcherLine() -> NSMenuItem {
    let title = "\(settings.statisticsPeriod.rawValue) ▼"
    let item = NSMenuItem(title: title, action: nil, keyEquivalent: "")
    
    let submenu = NSMenu()
    for period in StatisticsPeriod.allCases {
        let check = period == settings.statisticsPeriod ? "✓ " : "  "
        let periodItem = NSMenuItem(title: "\(check)\(period.rawValue)", action: #selector(selectStatsPeriod(_:)), keyEquivalent: "")
        periodItem.target = self
        periodItem.representedObject = period
        submenu.addItem(periodItem)
    }
    item.submenu = submenu
    return item
}

private func addStatLine(_ text: String) {
    let item = NSMenuItem(title: "  \(text)", action: nil, keyEquivalent: "")
    item.isEnabled = false
    menu.addItem(item)
}
```

### PreferencesView.swift - Simplify

Change "Add Current App" button to show actual app name:

```swift
// In addCurrentApp button:
Button(action: addCurrentApp) {
    if let appName = getCurrentAppName() {
        Label("Blacklist \(appName)", systemImage: "plus.circle")
    } else {
        Label("Blacklist Current App", systemImage: "plus.circle")
    }
}

// Add helper:
private func getCurrentAppName() -> String? {
    guard let frontApp = NSWorkspace.shared.frontmostApplication else { return nil }
    return frontApp.localizedName
}
```

### About Window - Remove "What's New" from menu, keep in About tabs

Already done - just remove showWhatsNew menu item.

---

This requires editing multiple large sections. Would you like me to proceed with all changes, or address them one file at a time?
