v2.0.1 β Code quality pass
π οΈ Code quality pass: critical fixes & stability hardening
This release focuses on stability and robustness β no new user-facing features, but the app is now significantly more reliable.
π΄ Critical fixes
- Debate engine completely rewritten as a stateful class
- Eliminates Swift 6
Sendablewarnings (capturedvarin concurrent closures) - Validates each cat still exists before its turn β survives mid-debate cat removal
- Generation counter invalidates stale callbacks if the debate is stopped
DispatchQueue.main.asyncAfterinstead ofTimer.scheduledTimerfrom URLSession queue (was undefined behavior)- Public
stop()called fromremoveCatandapplicationWillTerminate
- Eliminates Swift 6
- Debate button now appears reliably β a
didSetobserver ondebateEnabledrebuilds the bubble - OllamaChat session race fixed β delegate no longer nullifies a newer in-flight session
fatalErrorat startup βNSAlertwith a clear message + terminate (assets missing / no screen)
π Memory & performance
tintCachebounded withNSCache(600 items) β was a dictionary growing unboundedgetPreviewtinted images now cached- Orphan
mem_<UUID>entries in UserDefaults purged at startup URLSessionproperlyfinishTasksAndInvalidate()d (delegate was leaking)frontmostWindowFramecached 200 ms β reducesCGWindowListCopyWindowInfocalls
π‘ Polish
addCatcaptures the new instance directly and rolls back the config on failure (no morelast!)appendResponseno longer steals focus to the input field if the user wasn't focused thereBehaviorTuningenum centralizes all AI tuning magic numbersDictionary.localized()helper dedupes the[lang] ?? ["fr"] ?? ""pattern
Build
- Zero warnings, zero errors
Install
unzip CATAI.zip
xattr -cr CATAI.app # remove macOS quarantine (app is unsigned)
open CATAI.appFull changelog: v2.0...v2.0.1