Summary
Two issues with the device list's "Recently Added" section that landed together:
- Section disappeared on every app restart. AppStore persists
deviceFirstSeen to UserDefaults precisely so the 30-minute window survives restarts, but AppStore.reset() was clearing both the in-memory map and the UserDefaults entry. ConnectionSessionController.connect() calls reset() on every connection attempt — including the auto-reconnect on app launch — so the persisted state was wiped before any UI saw it.
- Window length wasn't user-configurable. 30 minutes was hard-coded in
AppConfig.UX.recentDeviceWindow. Users with high pairing volumes wanted longer; users who rarely pair wanted shorter.
Fix (commit on dev)
AppStore.reset() no longer touches deviceFirstSeen or its UserDefaults entry. The 30-minute (or user-chosen) window in DeviceListViewModel already self-prunes the visible list.
Settings → General → Devices → Recently Added Window picker: 5 min / 15 min / 30 min (default) / 1 hour / 2 hours / 4 hours / 1 day. Stored under DeviceList.recentWindowMinutes. DeviceListViewModel.recentWindow reads the value on each render so changes apply immediately.
- The picker only governs window length. Visibility stays a separate concern handled by the existing "Show Recents" toggle in the device list's Sort menu — single source of truth.
Acceptance criteria
Summary
Two issues with the device list's "Recently Added" section that landed together:
deviceFirstSeento UserDefaults precisely so the 30-minute window survives restarts, butAppStore.reset()was clearing both the in-memory map and the UserDefaults entry.ConnectionSessionController.connect()callsreset()on every connection attempt — including the auto-reconnect on app launch — so the persisted state was wiped before any UI saw it.AppConfig.UX.recentDeviceWindow. Users with high pairing volumes wanted longer; users who rarely pair wanted shorter.Fix (commit on
dev)AppStore.reset()no longer touchesdeviceFirstSeenor its UserDefaults entry. The 30-minute (or user-chosen) window inDeviceListViewModelalready self-prunes the visible list.Settings → General → Devices → Recently Added Windowpicker: 5 min / 15 min / 30 min (default) / 1 hour / 2 hours / 4 hours / 1 day. Stored underDeviceList.recentWindowMinutes.DeviceListViewModel.recentWindowreads the value on each render so changes apply immediately.Acceptance criteria