Problem
The macOS alert stores three action handlers in separate properties and calls fatalError when a fourth action is added. Adding or changing actions requires editing multiple branches.
Scope
- Store button metadata and handlers in an ordered collection.
- Map
NSApplication.ModalResponse to the correct collection entry.
- Return a recoverable failure if an explicit action limit remains necessary.
- Preserve shortcut-key behavior.
Acceptance criteria
Tests
- Cover zero through several actions, response mapping, missing handlers, and shortcut keys on macOS.
Relevant files
Framework/Sources/Alert.swift
Problem
The macOS alert stores three action handlers in separate properties and calls
fatalErrorwhen a fourth action is added. Adding or changing actions requires editing multiple branches.Scope
NSApplication.ModalResponseto the correct collection entry.Acceptance criteria
fatalError.Tests
Relevant files
Framework/Sources/Alert.swift