Add State of Mind sync + auto-request new Health permissions - #1
Open
rannyeribatista wants to merge 2 commits into
Open
rannyeribatista wants to merge 2 commits into
rannyeribatista wants to merge 2 commits into
Conversation
One registry row + a serializer for HKStateOfMind: valence rides value under a "valence" unit; kind, valenceClassification, labels, and associations ride metadata as comma-joined names. Availability-gated to iOS 18 like breathing disturbances; wire schema documented in docs/PROTOCOL.md and pinned in the registry test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When the registry grows a type, statusForAuthorizationRequest flips to shouldRequest but the ask waited for a tap on the StatusView banner — easy to miss after an update. Ask as soon as the scene activates instead; the banner stays as the manual fallback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
HKStateOfMind. Valence ridesvalueunder avalenceunit; kind, valence classification, labels, and associations ridemetadataas comma-joined names (e.g."happy,grateful"). Unknown future enum cases degrade tolabel_<n>-style names instead of breaking. Wire schema documented indocs/PROTOCOL.md; type key pinned in the registry test.statusForAuthorizationRequestflips toshouldRequest, but the ask waited for a tap on the StatusView banner — easy to miss after an update. Now the app asks on scene activation; the banner stays as the manual fallback.Why
Mood was the missing stream — State of Mind entries never left the phone. On first run after this change, 22 months of history (190 samples) synced retroactively.
Tested
xcodebuildagainst the iOS 18 simulator SDK; registry test updated🤖 Generated with Claude Code