Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.
Swift apple-silicond3dmetaldxmtdxvkfexgame-porting-toolkitgamingmac-gamingmacosmetalmoltenvksteamswiftuivkd3d-protonwhisky-alternativewindows-gameswinewine-wrapper
game page: one line when the environment's mode beats the row, the log one click away, editors say what they ignore
Gauthier Piarrette46769d6463ca
diff --git a/Sources/HighballApp/AppState.swift b/Sources/HighballApp/AppState.swiftindex 402c252..f485efb 100644--- a/Sources/HighballApp/AppState.swift+++ b/Sources/HighballApp/AppState.swift@@ -1161,11 +1161,28 @@ final class AppState {/// Opens highball-db's report form prefilled from the session. The rating is theirs to give.func reportPlay(_ record: SessionRecord) {let engine = bottles.first { $0.name == record.bottle }?.settings.engineID ?? "?"+ let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "dev"NSWorkspace.shared.open(PlayReport.url(title: record.title, appid: record.appid, renderer: record.renderer,chip: Machine.chip(), macos: Machine.macOSVersion(), engine: engine,- minutes: record.seconds / 60))+ minutes: record.seconds / 60, version: version))postPlay = nil}++ /// The newest launch log for a game, by the log's name. A Steam game runs inside the client,+ /// whose log carries its output; a program's log carries the program's name.+ func lastLaunchLog(for item: LibraryItem) -> URL? {+ guard let bottleName = item.bottleName else { return nil }+ let executable: String+ switch item.source {+ case .steam: executable = "steam.exe"+ case .pin:+ guard let pin = bottles.first(where: { $0.name == bottleName })?.settings.pins.first(where: { $0.id == item.pinID }) else { return nil }+ executable = URL(fileURLWithPath: pin.path.replacingOccurrences(of: "\\", with: "/")).lastPathComponent+ default: return nil+ }+ let names = (try? FileManager.default.contentsOfDirectory(atPath: paths.logs.path)) ?? []+ return LaunchLogs.newest(names: names, bottle: bottleName, executable: executable).map { paths.logs.appending(path: $0) }+ }private var sessionWatchers: [UUID: Task<Void, Never>] = [:]func session(forAppID appid: Int) -> GameSession? { runningSessions.first { $0.appid == appid } }diff --git a/Sources/HighballApp/BottleView.swift b/Sources/HighballApp/BottleView.swiftindex e2fc42e..5ff2f93 100644--- a/Sources/HighballApp/BottleView.swift+++ b/Sources/HighballApp/BottleView.swift@@ -388,6 +388,10 @@ struct BottleSettingsSheet: View {.font(.body.monospaced())Text(L("Extra Wine DLL overrides for this environment, semicolon separated. Mods like Cyber Engine Tweaks need version=n,b.")).font(.caption).foregroundStyle(.secondary)+ let ignoredDlls = WineRunner.dllOverridesIgnored(binding(\.dllOverrides).wrappedValue)+ if !ignoredDlls.isEmpty {+ Text(L("Ignored, not name=n,b: ") + ignoredDlls.joined(separator: ", ")).font(.caption).foregroundStyle(HB.amber)+ }EnvEditor(bottle: bottle)Text(L("Environment variables, one KEY=VALUE per line. Applied to everything launched in this environment.")).font(.caption).foregroundStyle(.secondary)@@ -591,14 +595,7 @@ struct PinSettingsSheet: View {Button(L("Cancel")) { dismiss() }Button(L("Save")) {pin.arguments = ArgumentLine.split(argsText)- var env: [String: String] = [:]- for line in envText.split(separator: "\n") {- let parts = line.split(separator: "=", maxSplits: 1).map(String.init)- if parts.count == 2, !parts[0].trimmingCharacters(in: .whitespaces).isEmpty {- env[parts[0].trimmingCharacters(in: .whitespaces)] = parts[1]- }- }- pin.environment = env+ pin.environment = EnvText.parse(envText).environmentstate.updatePin(pin, in: bottle)dismiss()}@@ -615,30 +612,31 @@ struct EnvEditor: View {@Environment(AppState.self) private var statelet bottle: Bottle@State private var text: String = ""+ @State private var ignored: [String] = []@State private var loaded = falsevar body: some View {- TextEditor(text: $text)- .font(.body.monospaced())- .frame(height: 72)- .overlay(RoundedRectangle(cornerRadius: 6).stroke(.quaternary))- .onAppear {- guard !loaded else { return }- loaded = true- let env = (state.bottles.first { $0.name == bottle.name } ?? bottle).settings.environment- text = env.sorted { $0.key < $1.key }.map { "\($0.key)=\($0.value)" }.joined(separator: "\n")- }- .onChange(of: text) { _, newValue in- var env: [String: String] = [:]- for line in newValue.split(separator: "\n") {- let parts = line.split(separator: "=", maxSplits: 1).map(String.init)- if parts.count == 2, !parts[0].trimmingCharacters(in: .whitespaces).isEmpty {- env[parts[0].trimmingCharacters(in: .whitespaces)] = parts[1]- }- }- var copy = state.bottles.first { $0.name == bottle.name } ?? bottle- copy.settings.environment = env- state.update(copy)+ VStack(alignment: .leading, spacing: 4) {+ TextEditor(text: $text)+ .font(.body.monospaced())+ .frame(height: 72)+ .overlay(RoundedRectangle(cornerRadius: 6).stroke(.quaternary))+ if !ignored.isEmpty {+ Text(L("Ignored, not KEY=VALUE: ") + ignored.joined(separator: ", ")).font(.caption).foregroundStyle(HB.amber)}+ }+ .onAppear {+ guard !loaded else { return }+ loaded = true+ text = EnvText.text(for: (state.bottles.first { $0.name == bottle.name } ?? bottle).settings.environment)+ }+ .onChange(of: text) { _, newValue in+ let parsed = EnvText.parse(newValue)+ ignored = parsed.ignored+ var copy = state.bottles.first { $0.name == bottle.name } ?? bottle+ guard copy.settings.environment != parsed.environment else { return }+ copy.settings.environment = parsed.environment+ state.update(copy)+ }}}diff --git a/Sources/HighballApp/GameDetailView.swift b/Sources/HighballApp/GameDetailView.swiftindex cd7c640..600a941 100644--- a/Sources/HighballApp/GameDetailView.swift+++ b/Sources/HighballApp/GameDetailView.swift@@ -155,6 +155,15 @@ struct GameDetailView: View {}}}+ if let held = GamePageCopy.rowRendererHeldBack(entry, bottleRenderer: bottle?.settings.renderer ?? .dxvk,+ explicit: bottle?.settings.rendererExplicit ?? false,+ gameOverride: state.rendererOverride(for: item)),+ let engine = bottle.flatMap({ state.engine(for: $0) }), held.availability(in: engine) == .available {+ Button(String(format: L("Use %@ for this game"), GamePageCopy.plainName(held))) {+ state.setRendererOverride(held, for: item.id)+ }+ .controlSize(.small).padding(.top, 2)+ }HStack(spacing: 6) {Text(entry == nil ? L("No row in the compatibility database yet.") : L("From the open compatibility database.")).font(.caption).foregroundStyle(.secondary)@@ -238,6 +247,13 @@ struct GameDetailView: View {.help(L("A small app in ~/Applications/Highball that starts this game without opening Highball first."))}}+ if let log = state.lastLaunchLog(for: item) {+ HStack(alignment: .firstTextBaseline, spacing: 12) {+ Text(L("Log")).font(.caption).foregroundStyle(.secondary).frame(width: 110, alignment: .leading)+ Button(L("Show the last launch log")) { NSWorkspace.shared.open(log) }.controlSize(.small)+ .help(log.lastPathComponent)+ }+ }if let fixRecipe, item.installed {HStack(alignment: .firstTextBaseline, spacing: 12) {Text(L("Fix")).font(.caption).foregroundStyle(.secondary).frame(width: 110, alignment: .leading)diff --git a/Sources/HighballApp/L10n.swift b/Sources/HighballApp/L10n.swiftindex 3ed23c4..36c5aa1 100644--- a/Sources/HighballApp/L10n.swift+++ b/Sources/HighballApp/L10n.swift@@ -378,6 +378,11 @@ enum L10n {"Show me": "Me montrer","Show the Windows drive": "Afficher le disque Windows","Show the activity log": "Afficher le journal d'activité",+ "Show the last background task": "Afficher la dernière tâche de fond",+ "Show the last launch log": "Afficher le journal du dernier lancement",+ "Log": "Journal",+ "Ignored, not KEY=VALUE: ": "Ignoré, pas de la forme CLÉ=VALEUR : ",+ "Ignored, not name=n,b: ": "Ignoré, pas de la forme nom=n,b : ","Show the log": "Afficher le journal","Show the logs folder": "Afficher le dossier des journaux","Some files couldn't be removed": "Certains fichiers n'ont pas pu être supprimés",diff --git a/Sources/HighballApp/SettingsView.swift b/Sources/HighballApp/SettingsView.swiftindex 9b2b102..a23bf30 100644--- a/Sources/HighballApp/SettingsView.swift+++ b/Sources/HighballApp/SettingsView.swift@@ -59,6 +59,9 @@ struct EnvironmentsPane: View {@Environment(AppState.self) private var state@State private var selectedName: String?@State private var openName: String?+ /// The environment whose settings sheet is open from here: engine, overrides, variables and+ /// dependencies were five clicks away behind the full page (2026-09-11 walkthrough).+ @State private var settingsName: String?@State private var pendingDelete: String?@State private var showCreate = false@@ -106,6 +109,7 @@ struct EnvironmentsPane: View {}if let b = selected {Button(L("Repair")) { state.repairBottle(b) }.disabled(state.busy)+ Button(L("Environment settings…")) { settingsName = b.name }Button(L("Full page…")) { openName = b.name }}Spacer()@@ -123,6 +127,11 @@ struct EnvironmentsPane: View {.frame(minWidth: 780, minHeight: 560)}}+ .sheet(isPresented: .init(get: { settingsName != nil }, set: { if !$0 { settingsName = nil } })) {+ if let bottle = state.bottles.first(where: { $0.name == settingsName }) {+ BottleSettingsSheet(bottle: bottle)+ }+ }.sheet(isPresented: $showCreate) { CreateBottleSheet() }.confirmationDialog("Delete environment \"\(pendingDelete ?? "")\"? This removes its Windows drive and everything installed in it, games included.",isPresented: .init(get: { pendingDelete != nil }, set: { if !$0 { pendingDelete = nil } }),@@ -281,7 +290,7 @@ struct TroubleshootingPane: View {await MainActor.run { NSWorkspace.shared.open(url) }}}- Button(L("Show the activity log")) { showLog = true }+ Button(L("Show the last background task")) { showLog = true }}if let b = state.defaultBottle {Divider()diff --git a/Sources/HighballKit/EnvText.swift b/Sources/HighballKit/EnvText.swiftnew file mode 100644index 0000000..09f0677--- /dev/null+++ b/Sources/HighballKit/EnvText.swift@@ -0,0 +1,52 @@+import Foundation++/// The KEY=VALUE text the environment editors take. Parsing says which lines it ignored, so an+/// editor can show them instead of dropping them without a word (2026-09-11 walkthrough: a line+/// that was not KEY=VALUE stayed on screen, was never saved, and nothing said so).+public enum EnvText {+ public struct Parsed: Equatable {+ public var environment: [String: String]+ /// Lines that are not KEY=VALUE, trimmed, blank lines left out.+ public var ignored: [String]+ }++ public static func parse(_ text: String) -> Parsed {+ var env: [String: String] = [:]+ var ignored: [String] = []+ for rawLine in text.split(separator: "\n", omittingEmptySubsequences: false) {+ let line = rawLine.trimmingCharacters(in: .whitespaces)+ if line.isEmpty { continue }+ let parts = line.split(separator: "=", maxSplits: 1, omittingEmptySubsequences: false).map(String.init)+ let key = parts.first?.trimmingCharacters(in: .whitespaces) ?? ""+ if parts.count == 2, !key.isEmpty, key.range(of: "^[A-Za-z_][A-Za-z0-9_]*$", options: .regularExpression) != nil {+ env[key] = parts[1]+ } else {+ ignored.append(line)+ }+ }+ return Parsed(environment: env, ignored: ignored)+ }++ public static func text(for environment: [String: String]) -> String {+ environment.sorted { $0.key < $1.key }.map { "\($0.key)=\($0.value)" }.joined(separator: "\n")+ }+}++/// Launch logs by name: "<stamp>-<environment>-<executable>.log", "-2.log" when two launches+/// share a second. The stamp sorts, so the newest name is the newest launch.+public enum LaunchLogs {+ public static func newest(names: [String], bottle: String, executable: String) -> String? {+ let mid = "-\(bottle)-\(executable)"+ let pattern = "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{6}Z" + NSRegularExpression.escapedPattern(for: mid) + "(-[0-9]+)?\\.log$"+ // "-2.log" follows ".log" inside one second, which plain string order gets backwards.+ func key(_ name: String) -> (String, Int) {+ let stem = String(name.dropLast(4))+ if let dash = stem.lastIndex(of: "-"), let n = Int(stem[stem.index(after: dash)...]), stem[..<dash].hasSuffix(mid) {+ return (String(stem[..<dash]), n)+ }+ return (stem, 1)+ }+ return names.filter { $0.range(of: pattern, options: .regularExpression) != nil }+ .max { a, b in let ka = key(a), kb = key(b); return ka.0 == kb.0 ? ka.1 < kb.1 : ka.0 < kb.0 }+ }+}diff --git a/Sources/HighballKit/GamePageCopy.swift b/Sources/HighballKit/GamePageCopy.swiftindex 75912df..e20a4bc 100644--- a/Sources/HighballKit/GamePageCopy.swift+++ b/Sources/HighballKit/GamePageCopy.swift@@ -26,8 +26,8 @@ public enum GamePageCopy {var head = chip.map { "Verified on an \($0)." } ?? "Verified on this project's own Mac."if chip == mine { head = "Verified on an \(mine), the same chip as yours." }var parts: [String] = []- if let fps = entry.verified?.fps {- parts.append(fps.hasSuffix("fps") ? fps : "\(fps) frames per second")+ if let fps = entry.verified?.fps, let phrase = fpsPhrase(fps) {+ parts.append(phrase)}if let os = entry.verified?.macos { parts.append("on macOS \(os)") }var detail = parts.isEmpty ? "" : sentenceCase(parts.joined(separator: " "))@@ -64,7 +64,11 @@ public enum GamePageCopy {} else if let gameOverride {items.append(WillDo(text: "Use \(plainName(gameOverride)) for this game (set by you); the environment stays on \(plainName(bottleRenderer))"))} else if explicit {- items.append(WillDo(text: "Use \(plainName(bottleRenderer)), the environment's setting (set by you)"))+ if let wanted = entry?.effectiveRenderer(osMajor: osMajor), wanted != bottleRenderer {+ items.append(WillDo(text: "Use \(plainName(bottleRenderer)), your environment's setting. The database asks for \(plainName(wanted)), and an environment's own setting wins"))+ } else {+ items.append(WillDo(text: "Use \(plainName(bottleRenderer)), the environment's setting (set by you)"))+ }} else if let wanted = entry?.effectiveRenderer(osMajor: osMajor) {items.append(WillDo(text: wanted == bottleRenderer? "Use \(plainName(wanted)), the way it was verified"@@ -84,6 +88,33 @@ public enum GamePageCopy {return items}+ /// The row's renderer when only the environment's explicit setting keeps it from applying and+ /// no per-game choice exists yet. The game page offers it for this game alone, so the reader+ /// is never left with a plan that names two graphics modes (2026-09-11 walkthrough).+ public static func rowRendererHeldBack(_ entry: GameDBEntry?, bottleRenderer: Renderer, explicit: Bool, gameOverride: Renderer?,+ osMajor: Int = ProcessInfo.processInfo.operatingSystemVersion.majorVersion) -> Renderer? {+ guard explicit, gameOverride == nil, entry?.nativeVulkan != true,+ let wanted = entry?.effectiveRenderer(osMajor: osMajor), wanted != bottleRenderer else { return nil }+ return wanted+ }++ /// The row's fps field is a figure followed by where it was read: "about 34 in the prologue+ /// ride at 1280x720". The sentence keeps both, puts "frames per second" after the figure, and+ /// stops at the first full stop so the verdict stays one sentence. A field that starts with+ /// no figure ("menu renders, DXVK") is used as it is; a paragraph stitched in by mistake is+ /// cut the same way (2026-09-11, Assetto Corsa).+ public static func fpsPhrase(_ fps: String) -> String? {+ var t = fps.trimmingCharacters(in: .whitespacesAndNewlines)+ if let stop = t.range(of: ". ") { t = String(t[..<stop.lowerBound]) }+ if t.hasSuffix(".") { t.removeLast() }+ guard !t.isEmpty else { return nil }+ let figure = "^(?i:about )?[0-9]+(?:\\.[0-9]+)?(?:\\s*(?:-|–|to)\\s*[0-9]+(?:\\.[0-9]+)?)?"+ guard let r = t.range(of: figure, options: .regularExpression) else { return t }+ let rest = String(t[r.upperBound...])+ if rest.lowercased().hasPrefix(" fps") { return t }+ return String(t[r]) + " frames per second" + rest+ }+// MARK: helperspublic static func plainName(_ r: Renderer) -> String {diff --git a/Sources/HighballKit/PlayReport.swift b/Sources/HighballKit/PlayReport.swiftindex c70224f..81f63eb 100644--- a/Sources/HighballKit/PlayReport.swift+++ b/Sources/HighballKit/PlayReport.swift@@ -21,12 +21,13 @@ public enum PlayReport {/// The issue URL for highball-db's report form, its fields prefilled by id. Query items use/// the form's field ids, which GitHub reads into the matching inputs.public static func url(title: String, appid: Int?, renderer: String?, chip: String, macos: String,- engine: String, minutes: Int) -> URL {+ engine: String, minutes: Int, version: String? = nil) -> URL {var comps = URLComponents(string: "https://github.com/gauthierpiarrette/highball-db/issues/new")!var items = [URLQueryItem(name: "template", value: template),URLQueryItem(name: "title", value: title)]if let appid { items.append(URLQueryItem(name: "steam_appid", value: String(appid))) }if let renderer { items.append(URLQueryItem(name: "renderer", value: renderer)) }+ if let version { items.append(URLQueryItem(name: "version", value: version)) }items += [URLQueryItem(name: "chip", value: chip),URLQueryItem(name: "macos", value: macos),URLQueryItem(name: "engine", value: engine),diff --git a/Sources/HighballKit/WineRunner.swift b/Sources/HighballKit/WineRunner.swiftindex f900626..288c200 100644--- a/Sources/HighballKit/WineRunner.swift+++ b/Sources/HighballKit/WineRunner.swift@@ -433,6 +433,13 @@ public struct WineRunner: Sendable {return entries}+ /// The entries of a DLL-overrides field that `parseDllOverrides` would drop, so the settings+ /// sheet can say so instead of losing them silently (2026-09-11 walkthrough).+ public static func dllOverridesIgnored(_ overrides: String) -> [String] {+ overrides.split(separator: ";").map { $0.trimmingCharacters(in: .whitespaces) }+ .filter { !$0.isEmpty && parseDllOverrides($0).isEmpty }+ }+static let dllOverridesKey = #"HKCU\Software\Wine\DllOverrides"#/// Mirrors the bottle's DLL-overrides field into the prefix registry. The env var reaches onlydiff --git a/Tests/HighballKitTests/EnvTextTests.swift b/Tests/HighballKitTests/EnvTextTests.swiftnew file mode 100644index 0000000..74484e8--- /dev/null+++ b/Tests/HighballKitTests/EnvTextTests.swift@@ -0,0 +1,37 @@+import XCTest+@testable import HighballKit++final class EnvTextTests: XCTestCase {+ func testValidLinesAreKeptAndTheRestNamed() {+ let p = EnvText.parse("MVK_SHADOW_IMPORT=1\nFOO=bar baz\nnot a pair\n\n=novalue\n SPACED = x ")+ XCTAssertEqual(p.environment, ["MVK_SHADOW_IMPORT": "1", "FOO": "bar baz", "SPACED": " x"])+ XCTAssertEqual(p.ignored, ["not a pair", "=novalue"])+ }++ func testEmptyValueIsAllowed() {+ // An empty value is a way to blank a variable the engine sets.+ XCTAssertEqual(EnvText.parse("DXMT_METAL_HUD=").environment, ["DXMT_METAL_HUD": ""])+ }++ func testRoundTrip() {+ let env = ["B": "2", "A": "1"]+ XCTAssertEqual(EnvText.text(for: env), "A=1\nB=2")+ XCTAssertEqual(EnvText.parse(EnvText.text(for: env)).environment, env)+ }++ func testDllOverridesIgnoredNamesTheBadEntries() {+ XCTAssertEqual(WineRunner.dllOverridesIgnored("d3d9=n,b;version;winmm=x; ;dxgi=b"), ["version", "winmm=x"])+ XCTAssertEqual(WineRunner.dllOverridesIgnored(""), [])+ }++ func testNewestLaunchLogByName() {+ let names = ["2026-09-11T154113Z-Gaming-steam.exe.log", "2026-09-11T153459Z-Gaming-steam.exe.log",+ "2026-09-11T154110Z-Gaming-reg.exe.log", "2026-09-11T160000Z-cx-steam-steam.exe.log",+ "2026-09-11T145016Z-rsmoke-Heaven.exe.log", "2026-09-11T145016Z-rsmoke-Heaven.exe-2.log", "sessions.jsonl"]+ XCTAssertEqual(LaunchLogs.newest(names: names, bottle: "Gaming", executable: "steam.exe"), "2026-09-11T154113Z-Gaming-steam.exe.log")+ XCTAssertEqual(LaunchLogs.newest(names: names, bottle: "cx-steam", executable: "steam.exe"), "2026-09-11T160000Z-cx-steam-steam.exe.log")+ XCTAssertEqual(LaunchLogs.newest(names: names, bottle: "rsmoke", executable: "Heaven.exe"), "2026-09-11T145016Z-rsmoke-Heaven.exe-2.log")+ XCTAssertNil(LaunchLogs.newest(names: names, bottle: "Gaming", executable: "acs.exe"))+ XCTAssertNil(LaunchLogs.newest(names: names, bottle: "steam", executable: "steam.exe"), "an environment name that is a suffix of another must not match")+ }+}diff --git a/Tests/HighballKitTests/GamePageCopyTests.swift b/Tests/HighballKitTests/GamePageCopyTests.swiftindex f77c8a1..1393fd9 100644--- a/Tests/HighballKitTests/GamePageCopyTests.swift+++ b/Tests/HighballKitTests/GamePageCopyTests.swift@@ -69,7 +69,29 @@ extension GamePageCopyTests {XCTAssertTrue(GamePageCopy.d3dMetalAsk(title: "X", entry: alt).contains("but slower"))XCTAssertEqual(GamePageCopy.otherWorkingRenderer(alt), .dxvk)let e = try entry(#"{"id":"x","title":"X","steam_appid":1,"status":"verified-local","renderer":"dxmt"}"#)+ // The row asks for one mode and the environment's explicit setting wins: the plan says so+ // in one line, and names the mode held back so the page can offer it for this game.XCTAssertEqual(GamePageCopy.willDo(e, recipe: nil, applied: false, bottleRenderer: .dxvk, explicit: true, osMajor: 26).first?.text,- "Use DXVK (Vulkan on Metal), the environment's setting (set by you)")+ "Use DXVK (Vulkan on Metal), your environment's setting. The database asks for DXMT (DirectX 11 on Metal), and an environment's own setting wins")+ XCTAssertEqual(GamePageCopy.rowRendererHeldBack(e, bottleRenderer: .dxvk, explicit: true, gameOverride: nil, osMajor: 26), .dxmt)+ XCTAssertNil(GamePageCopy.rowRendererHeldBack(e, bottleRenderer: .dxvk, explicit: false, gameOverride: nil, osMajor: 26), "not explicit: the row applies on its own")+ XCTAssertNil(GamePageCopy.rowRendererHeldBack(e, bottleRenderer: .dxvk, explicit: true, gameOverride: .dxmt, osMajor: 26), "a per-game choice already exists")+ XCTAssertEqual(GamePageCopy.willDo(e, recipe: nil, applied: false, bottleRenderer: .dxmt, explicit: true, osMajor: 26).first?.text,+ "Use DXMT (DirectX 11 on Metal), the environment's setting (set by you)", "same mode: nothing is held back")+ XCTAssertNil(GamePageCopy.rowRendererHeldBack(e, bottleRenderer: .dxmt, explicit: true, gameOverride: nil, osMajor: 26))+ }++ func testFpsPhraseKeepsTheFigureAndWhereItWasRead() {+ XCTAssertEqual(GamePageCopy.fpsPhrase("60 to 82"), "60 to 82 frames per second")+ XCTAssertEqual(GamePageCopy.fpsPhrase("111.8 fps"), "111.8 fps")+ XCTAssertEqual(GamePageCopy.fpsPhrase("About 70"), "About 70 frames per second")+ XCTAssertEqual(GamePageCopy.fpsPhrase("about 34 in the prologue blizzard ride at 1280x720 windowed (GPU 18-21 ms), 55-60 in the menus"),+ "about 34 frames per second in the prologue blizzard ride at 1280x720 windowed (GPU 18-21 ms), 55-60 in the menus")+ XCTAssertEqual(GamePageCopy.fpsPhrase("60-120 in the prologue mission at 1280x800. An earlier reading of 48 was at 800x600."),+ "60-120 frames per second in the prologue mission at 1280x800", "one sentence: the verdict stops at the first full stop")+ XCTAssertEqual(GamePageCopy.fpsPhrase("menu renders, DXVK, HDR-off recipe"), "menu renders, DXVK, HDR-off recipe", "no figure: used as it is")+ XCTAssertEqual(GamePageCopy.fpsPhrase("111.8 driving at Laguna Seca, GPU-bound. Measured 2026-09-10 on a fresh install."),+ "111.8 frames per second driving at Laguna Seca, GPU-bound")+ XCTAssertNil(GamePageCopy.fpsPhrase(" "))}}diff --git a/Tests/HighballKitTests/PlayReportTests.swift b/Tests/HighballKitTests/PlayReportTests.swiftindex 3f05776..432c5ea 100644--- a/Tests/HighballKitTests/PlayReportTests.swift+++ b/Tests/HighballKitTests/PlayReportTests.swift@@ -4,7 +4,7 @@ import XCTestfinal class PlayReportTests: XCTestCase {func testFormFieldsArePrefilledById() throws {let url = PlayReport.url(title: "Counter-Strike 2", appid: 730, renderer: "dxmt", chip: "Apple M1 Pro",- macos: "26.6.2", engine: "x64-sikarugir10.0_6-r1", minutes: 23)+ macos: "26.6.2", engine: "x64-sikarugir10.0_6-r1", minutes: 23, version: "0.9.6")let comps = try XCTUnwrap(URLComponents(url: url, resolvingAgainstBaseURL: false))XCTAssertEqual(comps.host, "github.com")XCTAssertEqual(comps.path, "/gauthierpiarrette/highball-db/issues/new")@@ -17,6 +17,7 @@ final class PlayReportTests: XCTestCase {XCTAssertEqual(q["macos"], "26.6.2")XCTAssertEqual(q["engine"], "x64-sikarugir10.0_6-r1")XCTAssertEqual(q["notes"], "Played for 23 min through Highball.")+ XCTAssertEqual(q["version"], "0.9.6")XCTAssertNil(q["rating"], "the rating is the player's to give")}