Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,17 @@ 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:
- name: Require every quality lane
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 ]]
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 6 additions & 6 deletions Phi.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand Down Expand Up @@ -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 = "";
Expand Down Expand Up @@ -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 = "";
Expand Down Expand Up @@ -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 = "";
Expand Down Expand Up @@ -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 = "";
Expand Down Expand Up @@ -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 = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,6 @@ class MainSplitViewController: NSViewController {
}

private func updateShellPreferences() {
PhiPreferences.GeneralSettings.saveLayoutMode()

let position = PhiPreferences.GeneralSettings.loadSidebarPosition()
guard position != lastSidebarPosition else { return }

Expand Down
3 changes: 3 additions & 0 deletions Sources/UserInterface/Preferences/PhiPreferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
21 changes: 21 additions & 0 deletions Tests/PhiBrowserTests/PhiBrowserTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions script/verify
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading