Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
Name only the first apps in the alerts about a removal of many
Țugui Dragoș98a0a27ba88f
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 2a47a501..55a4d25a 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -139,6 +139,9 @@ its changes the way [Keep a Changelog](https://keepachangelog.com/) suggests.#### Applications+- When many apps stay after a removal, as without App Management, the alert names the first few and counts the others,+ so its Open System Settings button stays on the screen; Copy Details still gives every app. Several apps' question+ names the first few apps that go and that stay the same way.- iPhone and iPad apps installed on the Mac from the App Store are checked for updates against their own listing, in thestore they came from, and Mac apps sold together with their iPhone version against their Mac listing; both read "Can'tcheck for updates" while the App Store listed their updates.diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstringsindex 8c255f97..aba30284 100644--- a/Localization/Peel/Localizable.xcstrings+++ b/Localization/Peel/Localizable.xcstrings@@ -14540,6 +14540,346 @@}}},+ "And ^[%lld more app](inflect: true)." : {+ "localizations" : {+ "cs" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "A ještě %lld další aplikace."+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "A ještě %lld další aplikace."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "A ještě %lld další aplikace."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "A ještě %lld dalších aplikací."+ }+ }+ }+ }+ },+ "de" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Und %lld weitere App."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Und %lld weitere Apps."+ }+ }+ }+ }+ },+ "es" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Y %lld de apps más."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Y %lld app más."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Y %lld apps más."+ }+ }+ }+ }+ },+ "fr" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Et %lld d’autres apps."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Et %lld autre app."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Et %lld autres apps."+ }+ }+ }+ }+ },+ "it" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "E altre %lld di app."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "E un’altra app."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "E altre %lld app."+ }+ }+ }+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ほかに%lld個のアプリがあります。"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "그 외 앱 %lld개가 더 있습니다."+ }+ },+ "nl" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "En nog %lld app."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "En nog %lld apps."+ }+ }+ }+ }+ },+ "pl" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "I jeszcze %lld aplikacje."+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "I jeszcze %lld aplikacji."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "I jeszcze %lld aplikacja."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "I jeszcze %lld aplikacji."+ }+ }+ }+ }+ },+ "pt" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "E mais %lld de apps."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "E mais %lld app."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "E mais %lld apps."+ }+ }+ }+ }+ },+ "ro" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Și încă %lld aplicații."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Și încă %lld aplicație."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Și încă %lld de aplicații."+ }+ }+ }+ }+ },+ "ru" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "И еще %lld приложения."+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "И еще %lld приложений."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "И еще %lld приложение."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "И еще %lld приложения."+ }+ }+ }+ }+ },+ "sv" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Och %lld app till."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Och %lld appar till."+ }+ }+ }+ }+ },+ "tr" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ve %lld uygulama daha."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ve %lld uygulama daha."+ }+ }+ }+ }+ },+ "uk" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "І ще %lld програми."+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "І ще %lld програм."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "І ще %lld програма."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "І ще %lld програми."+ }+ }+ }+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "另外还有%lld个App。"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "還有%lld個App。"+ }+ }+ }+ },"And ^[%lld more file](inflect: true). Package Receipts lists them all." : {"localizations" : {"cs" : {@@ -200378,6 +200718,346 @@}}},+ "^[%lld more app](inflect: true)" : {+ "localizations" : {+ "cs" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld další aplikace"+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld další aplikace"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld další aplikace"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld dalších aplikací"+ }+ }+ }+ }+ },+ "de" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "noch %lld App"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "noch %lld Apps"+ }+ }+ }+ }+ },+ "es" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld de apps más"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld app más"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld apps más"+ }+ }+ }+ }+ },+ "fr" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld d’autres apps"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld autre app"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld autres apps"+ }+ }+ }+ }+ },+ "it" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "altre %lld di app"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "un’altra app"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "altre %lld app"+ }+ }+ }+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "その他%lld個のアプリ"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "그 외 앱 %lld개"+ }+ },+ "nl" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld andere app"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld andere apps"+ }+ }+ }+ }+ },+ "pl" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "jeszcze %lld aplikacje"+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "jeszcze %lld aplikacji"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "jeszcze %lld aplikacja"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "jeszcze %lld aplikacji"+ }+ }+ }+ }+ },+ "pt" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "mais %lld de apps"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "mais %lld app"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "mais %lld apps"+ }+ }+ }+ }+ },+ "ro" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "încă %lld aplicații"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "încă %lld aplicație"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "încă %lld de aplicații"+ }+ }+ }+ }+ },+ "ru" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "еще %lld приложения"+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "еще %lld приложений"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "еще %lld приложение"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "еще %lld приложения"+ }+ }+ }+ }+ },+ "sv" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld app till"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld appar till"+ }+ }+ }+ }+ },+ "tr" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld uygulama daha"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld uygulama daha"+ }+ }+ }+ }+ },+ "uk" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ще %lld програми"+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ще %lld програм"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ще %lld програма"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ще %lld програми"+ }+ }+ }+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "其他%lld个App"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "其他%lld個App"+ }+ }+ }+ },"^[%lld package](inflect: true)." : {"localizations" : {"cs" : {diff --git a/Peel/Views/MultipleAppsView.swift b/Peel/Views/MultipleAppsView.swiftindex 9cadf037..60134ed6 100644--- a/Peel/Views/MultipleAppsView.swift+++ b/Peel/Views/MultipleAppsView.swift@@ -311,11 +311,12 @@ struct MultipleAppsView: View {return lines.dropFirst().reduce(lines.first ?? Text(verbatim: "")) { Text("\($0)\n\n\($1)") }}- /// These chosen apps as a list: each by its name, or by where it is when another chosen app has the same name.+ /// These chosen apps as a list, the first ones only, as an alert lists them: each by its name, or by where it is+ /// when another chosen app has the same name.private func list(_ apps: [InstalledApp]) -> String {- apps.map { app in+ RemovalFailureAlert.listed(apps.map { app inplan.apps.contains { $0.name == app.name && $0.url != app.url } ? app.url.abbreviatedPath : app.name- }.formatted(.list(type: .and))+ })}/// The apps whose privacy permissions a removal of `urls` resets.diff --git a/Peel/Views/RemovalFailureAlert.swift b/Peel/Views/RemovalFailureAlert.swiftindex db0b984d..643289a6 100644--- a/Peel/Views/RemovalFailureAlert.swift+++ b/Peel/Views/RemovalFailureAlert.swift@@ -11,16 +11,29 @@ struct RemovalFailureAlert: ViewModifier {/// How many items the alert lists by path. The rest are only counted, to keep the alert short.static let mostListed = 4+ /// The first lines of a list of apps, as many as an alert lists, and then how many apps the others are.+ static func shortened(_ lines: [String]) -> [String] {+ guard lines.count > mostListed else { return lines }+ return lines.prefix(mostListed) + [String(inflecting: "And ^[\(lines.count - mostListed) more app](inflect: true).")]+ }++ /// Apps named in one sentence: the first ones, as many as an alert lists, and then how many the others are.+ static func listed(_ names: [String]) -> String {+ guard names.count > mostListed else { return names.formatted(.list(type: .and)) }+ let others = String(inflecting: "^[\(names.count - mostListed) more app](inflect: true)")+ return (names.prefix(mostListed) + [others]).formatted(.list(type: .and))+ }+@Environment(RemovalOutcome.self) private var outcome@Environment(OrphanLibrary.self) private var orphans@Environment(\.openSettings) private var openSettingsfunc body(content: Content) -> some View {content.alert(title, isPresented: isPresented) {- if needsAppManagement {+ if Self.needsAppManagement(outcome) {Button("Open System Settings") { NSWorkspace.shared.open(AppManagement.settingsURL) }}- if needsHelper {+ if Self.needsHelper(outcome) {Button("Open Peel Settings") { SettingsPane.helper.open(with: openSettings) }}if #available(macOS 27, *), !outcome.appsStartingFromTheTrash.isEmpty {@@ -33,14 +46,14 @@ struct RemovalFailureAlert: ViewModifier {}}if !outcome.failures.isEmpty {- Button("Copy Details") { copyDetails() }+ Button("Copy Details") { Self.copyDetails(of: outcome) }}// The alert reports, so Return closes it. Otherwise the first other button would be the default, and Return// would copy the details or open Settings.Button("OK", role: .cancel) {}.keyboardShortcut(.defaultAction)} message: {- Text(verbatim: message)+ Text(verbatim: Self.message(for: outcome))}}@@ -76,21 +89,22 @@ struct RemovalFailureAlert: ViewModifier {return outcome.movedCount == 0 ? Text("Nothing was moved to the Trash.") : Text("Some items couldn’t be moved to the Trash.")}- private var message: String {- let listed = outcome.failures.prefix(Self.mostListed)- var lines = quitLines + listed.map { "\($0.url.abbreviatedPath)\n\($0.reason.explanation)" }+ static func message(for outcome: RemovalOutcome) -> String {+ let listed = outcome.failures.prefix(mostListed)+ var lines = quitLines(outcome) + listed.map { "\($0.url.abbreviatedPath)\n\($0.reason.explanation)" }let rest = outcome.failures.count - listed.countif rest > 0 {lines.append(String(inflecting: "And ^[\(rest) more item](inflect: true)."))}- lines += keptLines + driverLines + administratorLines + shellLines + extraLines+ lines += shortened(keptLines(outcome)) + driverLines(outcome) + administratorLines(outcome)+ + shellLines(outcome) + appManagementLines(outcome) + shortened(privacyLines(outcome))if #available(macOS 27, *) {- lines += trashLines+ lines += trashLines(outcome, naming: Self.listed)}return lines.joined(separator: "\n\n")}- private var administratorLines: [String] {+ private static func administratorLines(_ outcome: RemovalOutcome) -> [String] {let count = outcome.leftForAnAdministratorguard count > 0 else { return [] }return count == 1@@ -99,14 +113,14 @@ struct RemovalFailureAlert: ViewModifier {}/// One line for the shell startup files that still name what moved: the person edits them, Peel never does.- private var shellLines: [String] {+ private static func shellLines(_ outcome: RemovalOutcome) -> [String] {let references = outcome.shellReferencesguard !references.isEmpty else { return [] }let places = references.map { String(localized: "\($0.file.abbreviatedPath), line \($0.line)") }return [String(localized: "Your shell startup files still name what moved, at \(places.formatted(.list(type: .and))). Peel reads these files and never changes them.")]}- private var driverLines: [String] {+ private static func driverLines(_ outcome: RemovalOutcome) -> [String] {let drivers = outcome.driversAwaitingARestartguard !drivers.isEmpty else { return [] }let names = drivers.formatted(.list(type: .and))@@ -116,47 +130,48 @@ struct RemovalFailureAlert: ViewModifier {}/// One line for the apps whose background items macOS still starts from the Trash at each login.- private var trashLines: [String] {+ private static func trashLines(_ outcome: RemovalOutcome, naming: ([String]) -> String) -> [String] {let apps = outcome.appsStartingFromTheTrashguard !apps.isEmpty else { return [] }- let names = apps.formatted(.list(type: .and))+ let names = naming(apps)return [String(localized: "macOS still starts the background items of \(names) from the Trash each time you log in, until you empty the Trash.")]}/// A line for each app that stayed, since its files, which wait for it, stayed too and are not listed.- private var keptLines: [String] {+ private static func keptLines(_ outcome: RemovalOutcome) -> [String] {outcome.keptTheirFiles.map { String(localized: "\($0) stayed, and so did its files.") }}- private var extraLines: [String] {- var lines: [String] = []- if needsAppManagement {- lines.append(String(localized: "If Peel isn’t allowed under App Management, macOS won’t let it move another developer’s app to the Trash."))- }- lines += privacyLines- return lines+ private static func appManagementLines(_ outcome: RemovalOutcome) -> [String] {+ guard needsAppManagement(outcome) else { return [] }+ return [String(localized: "If Peel isn’t allowed under App Management, macOS won’t let it move another developer’s app to the Trash.")]}/// Copies every item with its full path, since the alert lists only the first few and its text can't be/// selected.- private func copyDetails() {- var lines = quitLines + outcome.failures.map { "\($0.url.path(percentEncoded: false))\n\($0.reason.explanation)" }- + keptLines + driverLines + administratorLines + extraLines+ private static func copyDetails(of outcome: RemovalOutcome) {+ NSPasteboard.general.clearContents()+ NSPasteboard.general.setString(details(for: outcome), forType: .string)+ }++ static func details(for outcome: RemovalOutcome) -> String {+ var lines = quitLines(outcome) + outcome.failures.map { "\($0.url.path(percentEncoded: false))\n\($0.reason.explanation)" }+ + keptLines(outcome) + driverLines(outcome) + administratorLines(outcome) + appManagementLines(outcome)+ + privacyLines(outcome)if #available(macOS 27, *) {- lines += trashLines+ lines += trashLines(outcome) { $0.formatted(.list(type: .and)) }}- NSPasteboard.general.clearContents()- NSPasteboard.general.setString(lines.joined(separator: "\n\n"), forType: .string)+ return lines.joined(separator: "\n\n")}/// A line for each app whose tool kept what was selected for it, since the app was open.- private var quitLines: [String] {+ private static func quitLines(_ outcome: RemovalOutcome) -> [String] {outcome.appsToQuit.map { String(localized: "Quit \($0) before removing its files.") }}/// One line per privacy reset. When a single failed reset is all there is to report, the title already/// says so, and the line gives only the reason.- private var privacyLines: [String] {+ private static func privacyLines(_ outcome: RemovalOutcome) -> [String] {outcome.privacy.map { privacy inguard let problem = privacy.result.explanation else {return String(localized: "\(privacy.app)’s privacy permissions were reset before the move.")@@ -169,14 +184,14 @@ struct RemovalFailureAlert: ViewModifier {/// True when macOS refused to move an app although the user can write to its folder and nothing locks it./// That refusal comes from App Management, which the user can allow in System Settings.- private var needsAppManagement: Bool {+ private static func needsAppManagement(_ outcome: RemovalOutcome) -> Bool {outcome.failures.contains { failure infailure.reason == .notPermitted && failure.url.pathExtension.lowercased() == "app"&& AppManagement.isRefusedForWantOfPermission(failure.url)}}- private var needsHelper: Bool {+ private static func needsHelper(_ outcome: RemovalOutcome) -> Bool {outcome.failures.contains { $0.reason == .needsHelper }}}diff --git a/PeelTests/RemovalFailureAlertTests.swift b/PeelTests/RemovalFailureAlertTests.swiftnew file mode 100644index 00000000..3c5b3d46--- /dev/null+++ b/PeelTests/RemovalFailureAlertTests.swift@@ -0,0 +1,28 @@+import Foundation+@testable import Peel+import PeelCore+import Testing++@MainActor+struct RemovalFailureAlertTests {+ @Test func listsTheFirstAppsThatStayedAndCountsTheOthers() {+ let apps = (1...30).map { index in+ InstalledApp(+ url: URL(filePath: "/Applications/Example \(index).app"),+ bundleIdentifier: "org.example.app\(index)", name: "Example \(index)"+ )+ }+ let outcome = RemovalOutcome()+ outcome.report(+ TrashResult(failures: apps.map { TrashFailure(url: $0.url, reason: .locked) }),+ privacy: apps.map { ($0, .reset) },+ keptTheirFiles: apps.map(\.name)+ )+ let most = RemovalFailureAlert.mostListed+ let paragraphs = RemovalFailureAlert.message(for: outcome).components(separatedBy: "\n\n")+ #expect(paragraphs.count == 3 * (most + 1), "\(paragraphs.count)")+ #expect(paragraphs.filter { $0.contains("Example 30") }.isEmpty)+ let details = RemovalFailureAlert.details(for: outcome).components(separatedBy: "\n\n")+ #expect(details.filter { $0.contains("Example 30") }.count == 3)+ }+}