Problem
Every property in SettingsState has a didSet that writes to UserDefaults and an init() that reads from it. The pattern is identical across 7 properties but cannot use @AppStorage because @Observable is incompatible with property wrappers.
Location
apps/purepoint-macos/purepoint-macos/State/SettingsState.swift
Suggested Fix
Either:
- A small helper like
func load<T>(_ key: String, default: T) -> T to reduce init boilerplate
- A
@Persisted property wrapper compatible with @ObservationIgnored if more settings are added
Low priority — the current approach works and all 7 properties are in one file.
🤖 Generated with Claude Code
Problem
Every property in
SettingsStatehas adidSetthat writes toUserDefaultsand aninit()that reads from it. The pattern is identical across 7 properties but cannot use@AppStoragebecause@Observableis incompatible with property wrappers.Location
apps/purepoint-macos/purepoint-macos/State/SettingsState.swiftSuggested Fix
Either:
func load<T>(_ key: String, default: T) -> Tto reduce init boilerplate@Persistedproperty wrapper compatible with@ObservationIgnoredif more settings are addedLow priority — the current approach works and all 7 properties are in one file.
🤖 Generated with Claude Code