Implement overlay update notice in terminal

Unlisted
Augment the @macos/Sources/Features/Update system to also support an overlay approach in @macos/Sources/Features/Terminal/TerminalView.swift The update notice should appear at the bottom of the window. It should go over the text (so it doesn't resize the terminal view). All clicking behaviors should otherwise be the same as the accessory view.

Perfect! I've successfully augmented the update system to support an overlay approach. Here's what I implemented:

Summary

  1. Created UpdateOverlay.swift - A new component that displays the update notice at the bottom of the window as an overlay

  2. Updated TerminalView.swift to:

    • Accept optional updateModel and updateActions parameters
    • Render the UpdateOverlay in the ZStack, appearing at the bottom over the terminal text
  3. Modified TerminalController.swift to pass the update model and actions from the AppDelegate

  4. Exposed a public method in [TerminalWindow.swift](file:///Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/Window Styles/TerminalWindow.swift) to create update actions

Key Features

  • Overlay positioning: Appears at bottom-right with padding
  • Non-intrusive: Doesn't resize the terminal view (uses ZStack overlay)
  • Same behavior: All clicking behaviors preserved from UpdatePill (shows same popover with all actions)
  • Consistent styling: Uses same UpdateBadge, UpdatePopoverView, and styling as the titlebar accessory
  • Shadow effect: Added subtle shadow to make overlay stand out over terminal text

The build completed successfully!

Move the update actions to the AppDelegate as well since they're also global. Make the terminalview params non-optional and just use the APp delegate

Perfect! I've successfully refactored the update system. Here's what changed:

Summary of Changes

  1. AppDelegate.swift:

    • Added updateActions as a lazy global property
    • Moved createUpdateActions() implementation to AppDelegate (centralized)
  2. TerminalView.swift:

    • Removed optional updateModel and updateActions parameters
    • Now directly accesses AppDelegate via NSApp.delegate to get global update state
  3. TerminalController.swift:

    • Removed parameter passing since TerminalView gets values directly from AppDelegate
  4. [TerminalWindow.swift](file:///Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/Window Styles/TerminalWindow.swift):

    • Removed all createUpdateActions() methods
    • Now uses appDelegate.updateActions directly

Benefits

  • Single source of truth: Update actions are defined once in AppDelegate
  • Simpler: No need to pass parameters through multiple layers
  • Global access: Both titlebar accessory and overlay access the same global state
  • Cleaner: Removed 100+ lines of duplicate code from TerminalWindow

Build completed successfully!