Review nits: name pulse-settle constant, fix stale comments

Non-blocking cleanups from the clean review pass:
- EngineConfigView.startEngine: collapse the redundant early-return in the
  sample-rate-mismatch branch into the shared tail.
- InputMuteButton: hoist the 0.2s settle duration to a named pulseSettleDuration.
- InputMuteTests: correct a stale "input defaults muted" comment (library default
  is audible; the test mutes explicitly).
- Plan doc: setInputMuted(true) runs before engine.start(), not after; note the
  addBoard priming.

464 tests pass; macOS app builds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 21:41:57 -07:00
parent e36074e9d3
commit e207728a12
4 changed files with 11 additions and 9 deletions
@@ -213,9 +213,6 @@ public struct EngineConfigView: View {
abs(hardware - shoeGaze.engine.sampleRate) > EngineConfigView.rateEpsilon {
shoeGaze.engine.stop()
presentMismatch(requested: shoeGaze.engine.sampleRate, hardware: hardware)
transportTick.toggle()
onConfigApplied()
return
}
transportTick.toggle()
onConfigApplied()
@@ -1232,6 +1232,7 @@ public struct ShoeGazeBuilderView: View {
private static let glowOpacityLow: Double = 0.35
private static let glowOpacityHigh: Double = 0.95
private static let pulseDuration: Double = 0.85
private static let pulseSettleDuration: Double = 0.2
var body: some View {
let muted: Bool = shoeGaze.inputMuted
@@ -1271,7 +1272,7 @@ public struct ShoeGazeBuilderView: View {
pulse = true
}
} else {
withAnimation(.easeOut(duration: 0.2)) { pulse = false }
withAnimation(.easeOut(duration: InputMuteButton.pulseSettleDuration)) { pulse = false }
}
}
}