Skip to content

Use underscore-separated Pulse AppStorage keys - #4

Merged
NachoSoto merged 2 commits into
NachoSoto:swift-6-not-compatiblefrom
tjni:agent/pulse-appstorage-underscore-keys
Jul 17, 2026
Merged

Use underscore-separated Pulse AppStorage keys#4
NachoSoto merged 2 commits into
NachoSoto:swift-6-not-compatiblefrom
tjni:agent/pulse-appstorage-underscore-keys

Conversation

@tjni

@tjni tjni commented Jul 17, 2026

Copy link
Copy Markdown

What changed

Replace six dotted Pulse UI @AppStorage keys with underscore-separated keys. Add a regression test for the captured hang and a reminder to keep future keys dot-free.

Why

I captured a deadlock: while SwiftUI rendered, an unrelated background UserDefaults write notified Pulse's console-mode @AppStorage observer.

Research showed that dotted keys can make @AppStorage observe the entire defaults store. Dot-free keys let SwiftUI observe each setting separately and avoid the deadlock.

Existing Pulse UI preferences will reset once after this change. I left out migration for the moment pending feedback.

Upstream PR: kean#376

@tjni
tjni marked this pull request as ready for review July 17, 2026 07:00
@tjni
tjni force-pushed the agent/pulse-appstorage-underscore-keys branch from 9a0d13b to bb1cddc Compare July 17, 2026 07:03
@NachoSoto
NachoSoto merged commit f9afb79 into NachoSoto:swift-6-not-compatible Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants