diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 2a00c7e8..15702199 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -59,21 +59,10 @@ jobs: CODE_SIGNING_ALLOWED=NO \ CODE_SIGNING_REQUIRED=NO - release-smoke: - name: Quality / Release smoke - runs-on: macos-26 - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - - name: Verify release bundle - env: - DERIVED_DATA: ${{ runner.temp }}/DerivedData-verify - run: ./script/verify - quality: name: Quality if: always() - needs: [check, macos-build, release-smoke] + needs: [check, macos-build] runs-on: ubuntu-24.04 timeout-minutes: 5 steps: @@ -81,8 +70,6 @@ jobs: env: CHECK_RESULT: ${{ needs.check.result }} BUILD_RESULT: ${{ needs.macos-build.result }} - SMOKE_RESULT: ${{ needs.release-smoke.result }} run: | [[ "$CHECK_RESULT" == success ]] [[ "$BUILD_RESULT" == success ]] - [[ "$SMOKE_RESULT" == success ]] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a733a528..6e41df1d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -165,7 +165,6 @@ jobs: "$GITHUB_WORKSPACE/Resources/PhiBrowser-OpenSource.entitlements" codesign -dv --verbose=4 "$app" 2>&1 | grep -E 'Identifier=|Authority=|TeamIdentifier=|Runtime Version' - - name: Notarize and package id: package env: diff --git a/Phi.xcodeproj/project.pbxproj b/Phi.xcodeproj/project.pbxproj index 7c92240a..f073712a 100644 --- a/Phi.xcodeproj/project.pbxproj +++ b/Phi.xcodeproj/project.pbxproj @@ -2844,7 +2844,7 @@ GENERATE_INFOPLIST_FILE = YES; GPD_COMMON = "NIGHTLY_BUILD=$(NIGHTLY_BUILD)"; INFOPLIST_FILE = "PhiBrowser-Info.plist"; - INFOPLIST_KEY_CFBundleDisplayName = Phi; + INFOPLIST_KEY_CFBundleDisplayName = Lua; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INFOPLIST_KEY_NSMainNibFile = ""; @@ -2988,7 +2988,7 @@ GENERATE_INFOPLIST_FILE = YES; GPD_COMMON = "NIGHTLY_BUILD=$(NIGHTLY_BUILD)"; INFOPLIST_FILE = "PhiBrowser-Info.plist"; - INFOPLIST_KEY_CFBundleDisplayName = Phi; + INFOPLIST_KEY_CFBundleDisplayName = Lua; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INFOPLIST_KEY_NSMainNibFile = ""; @@ -3198,7 +3198,7 @@ GENERATE_INFOPLIST_FILE = YES; GPD_COMMON = "NIGHTLY_BUILD=$(NIGHTLY_BUILD)"; INFOPLIST_FILE = "PhiBrowser-Info.plist"; - INFOPLIST_KEY_CFBundleDisplayName = Phi; + INFOPLIST_KEY_CFBundleDisplayName = Lua; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INFOPLIST_KEY_NSMainNibFile = ""; @@ -3247,7 +3247,7 @@ GENERATE_INFOPLIST_FILE = YES; GPD_COMMON = "NIGHTLY_BUILD=$(NIGHTLY_BUILD)"; INFOPLIST_FILE = "PhiBrowser-Info.plist"; - INFOPLIST_KEY_CFBundleDisplayName = Phi; + INFOPLIST_KEY_CFBundleDisplayName = Lua; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INFOPLIST_KEY_NSMainNibFile = ""; @@ -3439,7 +3439,7 @@ GENERATE_INFOPLIST_FILE = YES; GPD_COMMON = "NIGHTLY_BUILD=$(NIGHTLY_BUILD)"; INFOPLIST_FILE = "PhiBrowser-Info.plist"; - INFOPLIST_KEY_CFBundleDisplayName = Phi; + INFOPLIST_KEY_CFBundleDisplayName = Lua; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INFOPLIST_KEY_NSMainNibFile = ""; @@ -3581,7 +3581,7 @@ GENERATE_INFOPLIST_FILE = YES; GPD_COMMON = "NIGHTLY_BUILD=$(NIGHTLY_BUILD)"; INFOPLIST_FILE = "PhiBrowser-Info.plist"; - INFOPLIST_KEY_CFBundleDisplayName = "Phi Performance"; + INFOPLIST_KEY_CFBundleDisplayName = Lua; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INFOPLIST_KEY_NSMainNibFile = ""; diff --git a/Sources/UserInterface/MainBrowserWindow/MainSplitViewController.swift b/Sources/UserInterface/MainBrowserWindow/MainSplitViewController.swift index fb9e186d..690ad622 100644 --- a/Sources/UserInterface/MainBrowserWindow/MainSplitViewController.swift +++ b/Sources/UserInterface/MainBrowserWindow/MainSplitViewController.swift @@ -255,8 +255,6 @@ class MainSplitViewController: NSViewController { } private func updateShellPreferences() { - PhiPreferences.GeneralSettings.saveLayoutMode() - let position = PhiPreferences.GeneralSettings.loadSidebarPosition() guard position != lastSidebarPosition else { return } diff --git a/Sources/UserInterface/Preferences/PhiPreferences.swift b/Sources/UserInterface/Preferences/PhiPreferences.swift index 70943082..3bf0e493 100644 --- a/Sources/UserInterface/Preferences/PhiPreferences.swift +++ b/Sources/UserInterface/Preferences/PhiPreferences.swift @@ -122,6 +122,9 @@ extension PhiPreferences { static func saveLayoutMode(_: LayoutMode = .performance) { let defaults = UserDefaults.standard + guard defaults.string(forKey: Self.layoutModeKey) != LayoutMode.performance.rawValue else { + return + } defaults.set(LayoutMode.performance.rawValue, forKey: Self.layoutModeKey) } diff --git a/Tests/PhiBrowserTests/PhiBrowserTests.swift b/Tests/PhiBrowserTests/PhiBrowserTests.swift index 1ceb03f9..72897d2e 100644 --- a/Tests/PhiBrowserTests/PhiBrowserTests.swift +++ b/Tests/PhiBrowserTests/PhiBrowserTests.swift @@ -27,6 +27,27 @@ final class PhiBrowserTests: XCTestCase { XCTAssertEqual(LayoutMode.allCases, [.performance]) } + func testSavingPerformanceLayoutDoesNotRepostAnUnchangedDefault() { + let defaults = UserDefaults.standard + let key = PhiPreferences.GeneralSettings.layoutModeKey + let original = defaults.object(forKey: key) + defer { + if let original { + defaults.set(original, forKey: key) + } else { + defaults.removeObject(forKey: key) + } + } + + defaults.set(LayoutMode.performance.rawValue, forKey: key) + let didChange = XCTNSNotificationExpectation(name: UserDefaults.didChangeNotification) + didChange.isInverted = true + + PhiPreferences.GeneralSettings.saveLayoutMode() + + wait(for: [didChange], timeout: 0.1) + } + func testSidebarPositionDefaultsLeftAndPersistsRight() { let defaults = UserDefaults.standard let key = PhiPreferences.GeneralSettings.sidebarPositionKey diff --git a/script/verify b/script/verify index f4547507..8b2b0807 100755 --- a/script/verify +++ b/script/verify @@ -27,6 +27,10 @@ info="$APP/Contents/Info.plist" echo "Unexpected CFBundleName." >&2 exit 1 } +[[ "$(plutil -extract CFBundleDisplayName raw "$info")" == "Lua" ]] || { + echo "Unexpected CFBundleDisplayName." >&2 + exit 1 +} [[ "$(plutil -extract CFBundleIdentifier raw "$info")" == "dev.jow.LuaBrowser" ]] || { echo "Unexpected CFBundleIdentifier." >&2 exit 1