From e68ece2005786b7534884dd1c31de86668ed9804 Mon Sep 17 00:00:00 2001 From: Jacob Fu <141651335+FuJacob@users.noreply.github.com> Date: Fri, 10 Jul 2026 17:34:42 -0700 Subject: [PATCH] Default suggestion fade to fastest speed --- Cotabby/Support/SuggestionSettingsStore.swift | 6 +++--- CotabbyTests/SuggestionSettingsStoreTests.swift | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cotabby/Support/SuggestionSettingsStore.swift b/Cotabby/Support/SuggestionSettingsStore.swift index 715ed7a0..045e0e48 100644 --- a/Cotabby/Support/SuggestionSettingsStore.swift +++ b/Cotabby/Support/SuggestionSettingsStore.swift @@ -54,11 +54,11 @@ struct SuggestionSettingsStore { /// Duration in seconds of the suggestion fade-in ramp, surfaced as a Slow-to-Fast speed slider. /// The band is narrow on purpose: below the floor the ramp is imperceptible (reads as an instant /// snap), and above the ceiling the ghost text feels like it lags the caret rather than settling - /// in at it. 0.10s maps to the second-fastest slider tick: quick enough to feel responsive while - /// leaving one faster step for users who want a nearly instant appearance. Lower is a faster fade. + /// in at it. 0.05s is the fastest slider tick, so new installs get the most responsive fade + /// while users can still choose a slower transition. Lower is a faster fade. static let minimumFadeInDuration: Double = 0.05 static let maximumFadeInDuration: Double = 0.30 - static let defaultFadeInDuration: Double = 0.10 + static let defaultFadeInDuration: Double = 0.05 static let fadeInDurationStep: Double = 0.05 /// Hard upper bound on the persisted Extended Context blob, in characters. Sized to match what the diff --git a/CotabbyTests/SuggestionSettingsStoreTests.swift b/CotabbyTests/SuggestionSettingsStoreTests.swift index c7f7c03e..adbf20f9 100644 --- a/CotabbyTests/SuggestionSettingsStoreTests.swift +++ b/CotabbyTests/SuggestionSettingsStoreTests.swift @@ -213,19 +213,19 @@ final class SuggestionSettingsStoreTests: XCTestCase { XCTAssertTrue(data.fadeInSuggestions) } - func test_load_fadeInDurationDefaultsToSecondFastestTick() async { + func test_load_fadeInDurationDefaultsToFastestTick() async { let defaults = makeIsolatedDefaults() let data = SuggestionSettingsStore(userDefaults: defaults).load(configuration: .standard) - // The UI reflects duration across the slider range, so 0.10s maps to speed-axis 0.25: - // the second-fastest tick in the 0.05...0.30 band shown in Appearance settings. - XCTAssertEqual(SuggestionSettingsStore.defaultFadeInDuration, 0.10, accuracy: 0.0001) + // The UI reflects duration across the slider range, so the shortest 0.05s duration maps + // to speed-axis 0.30: the rightmost, fastest tick in Appearance settings. + XCTAssertEqual(SuggestionSettingsStore.defaultFadeInDuration, 0.05, accuracy: 0.0001) XCTAssertEqual( SuggestionSettingsStore.minimumFadeInDuration + SuggestionSettingsStore.maximumFadeInDuration - SuggestionSettingsStore.defaultFadeInDuration, - 0.25, + 0.30, accuracy: 0.0001 ) XCTAssertEqual(