Fix 8 audit items: remove force-unwraps, improve accessibility and concurrency

- Replace force-unwrap HK types with modern HKQuantityType(_:) initializer
- Replace Calendar.date force-unwraps with guard/let in HealthService, HeaderPercView, MoodStreakActivity, DayViewViewModel, MonthTotalTemplate
- Extract DayViewViewModel.countEntries into testable static method with safe flatMap
- Replace DispatchQueue.main.asyncAfter with Task.sleep in CelebrationAnimations
- Add .minimumScaleFactor(0.5) to SmallRollUpHeaderView for Dynamic Type
- Add VoiceOver accessibility labels to HeaderPercView mood percentages
- Fix @testable import iFeel → Feels in Tests_iOS.swift
- Add 4 unit tests for countEntries (TDD)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-17 11:42:16 -06:00
parent 277e277750
commit 7f27446b94
11 changed files with 168 additions and 76 deletions

View File

@@ -952,6 +952,9 @@
}
}
}
},
"%lld day streak" : {
},
"%lld days" : {
"comment" : "A secondary label below the year, showing the total number of days in that year. The argument is the total number of days in the year.",
@@ -2198,6 +2201,18 @@
}
}
},
"AI insights in light & dark mode" : {
"comment" : "A description of the feature that allows users to export insights from the app.",
"isCommentAutoGenerated" : true
},
"All sizes & theme variations" : {
"comment" : "A description of what the \"Export Voting Layouts\" button does.",
"isCommentAutoGenerated" : true
},
"All styles & complications" : {
"comment" : "A description of the feature that allows users to export all watch view screenshots.",
"isCommentAutoGenerated" : true
},
"All Time Moods" : {
},
@@ -2328,7 +2343,6 @@
}
},
"Animation Lab" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -2704,6 +2718,10 @@
}
}
},
"Bypass Subscription" : {
"comment" : "A label displayed next to a toggle switch in the \"Debug\" section.",
"isCommentAutoGenerated" : true
},
"Cancel" : {
"comment" : "The text for a button that dismisses the current view.",
"isCommentAutoGenerated" : true,
@@ -3168,7 +3186,6 @@
},
"Clear All Data" : {
"comment" : "A button label that clears all user data.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -4312,7 +4329,6 @@
},
"Current Parameters" : {
"comment" : "A section header that lists various current parameters related to the app.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -4355,7 +4371,6 @@
},
"Current Streak" : {
"comment" : "A label describing the user's current streak of using the app.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -4892,7 +4907,6 @@
},
"Days Using App" : {
"comment" : "A label describing the number of days the app has been used.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -4935,7 +4949,6 @@
},
"Debug" : {
"comment" : "A section header in the settings view, hidden in release builds.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -5579,7 +5592,6 @@
},
"Delete all mood entries" : {
"comment" : "A description of what happens when the \"Clear All Data\" button is tapped.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -5664,7 +5676,6 @@
},
"Delete HealthKit Data" : {
"comment" : "A button label that deletes all State of Mind records from HealthKit.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -6172,7 +6183,6 @@
}
},
"Elevate Your\nEmotional Life" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -6552,7 +6562,6 @@
}
},
"Experiment with vote celebrations" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -6806,6 +6815,10 @@
}
}
},
"Export Insights Screenshots" : {
"comment" : "A button label that allows users to export insights screenshots.",
"isCommentAutoGenerated" : true
},
"Export Preview" : {
"comment" : "A title for the preview section of the export view.",
"isCommentAutoGenerated" : true,
@@ -6848,9 +6861,16 @@
}
}
},
"Export Voting Layouts" : {
"comment" : "A button label that allows users to export all of their voting layout configurations.",
"isCommentAutoGenerated" : true
},
"Export Watch Screenshots" : {
"comment" : "A button label that allows users to export watch view screenshots.",
"isCommentAutoGenerated" : true
},
"Export Widget Screenshots" : {
"comment" : "A button label that prompts the user to download their light and dark mode widget screenshots.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -7064,7 +7084,6 @@
}
},
"Feel With\nAll Your Heart" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -7272,6 +7291,10 @@
}
}
},
"Fill 2 years data + export PNGs" : {
"comment" : "A description of the feature that generates and exports sharing screenshots.",
"isCommentAutoGenerated" : true
},
"Find Your\nInner Calm" : {
"comment" : "A title describing the main benefit of the premium subscription.",
"isCommentAutoGenerated" : true,
@@ -7315,7 +7338,6 @@
}
},
"Find Your\nInner Peace" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -7479,6 +7501,10 @@
}
}
},
"Generate & Export Sharing" : {
"comment" : "A button label that allows users to generate and export all sharing screenshots.",
"isCommentAutoGenerated" : true
},
"Get Mood Streak" : {
"comment" : "Title of an intent that checks the user's current mood logging streak.",
"isCommentAutoGenerated" : true,
@@ -7691,7 +7717,6 @@
},
"Green dot = eligible to show. Tips only show once per session when eligible." : {
"comment" : "A footer label explaining that tips are only shown once per session and that the green dot indicates whether a tip is currently eligible to be shown.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -7734,7 +7759,6 @@
},
"Has Seen Settings" : {
"comment" : "A label for whether the user has seen the settings section in the app.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -7779,8 +7803,11 @@
"comment" : "A description of the analytics toggle.",
"isCommentAutoGenerated" : true
},
"Hide trial banner & grant full access" : {
"comment" : "A description of the feature that allows users to bypass the trial period and access all features without ads.",
"isCommentAutoGenerated" : true
},
"How are you feeling?" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -7819,6 +7846,9 @@
}
}
}
},
"How do you feel?" : {
},
"How to add widgets" : {
"localizations" : {
@@ -8421,7 +8451,6 @@
},
"Light & dark mode PNGs" : {
"comment" : "A description of what the \"Export Widget Screenshots\" button does.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -8507,6 +8536,12 @@
"Live Activity Preview" : {
"comment" : "The title of the view.",
"isCommentAutoGenerated" : true
},
"Log" : {
},
"Log mood" : {
},
"Log Mood" : {
"comment" : "A button that opens Feels to log a mood.",
@@ -8671,6 +8706,9 @@
}
}
}
},
"Log your mood" : {
},
"Logged!" : {
"comment" : "A message displayed when a mood is successfully logged.",
@@ -8721,7 +8759,6 @@
},
"Make Tracking\nFun Again!" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -9015,7 +9052,6 @@
},
"Mood Log Count" : {
"comment" : "The title of a label displaying the count of mood logs.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -10988,7 +11024,6 @@
"isCommentAutoGenerated" : true
},
"Paywall Styles" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -11029,7 +11064,6 @@
}
},
"Paywall Theme Lab" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -11572,7 +11606,6 @@
}
},
"Preview" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -11613,7 +11646,6 @@
}
},
"Preview and test different subscription paywall designs" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -11655,7 +11687,6 @@
},
"Preview subscription themes" : {
"comment" : "A description of what the paywall preview button does.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -12508,7 +12539,6 @@
},
"Remove all State of Mind records" : {
"comment" : "A description of what happens when the \"Delete HealthKit Data\" button is pressed.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -12681,7 +12711,6 @@
},
"Reset All Tips" : {
"comment" : "A button that resets all tips to their default state.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -13323,9 +13352,24 @@
}
}
},
"Saved to Documents/InsightsExports" : {
"comment" : "A description of where the insights export file will be saved.",
"isCommentAutoGenerated" : true
},
"Saved to Documents/SharingExports" : {
"comment" : "A description of where the generated sharing screenshots are saved on a user's device.",
"isCommentAutoGenerated" : true
},
"Saved to Documents/VotingLayoutExports" : {
"comment" : "A description of where the voting layouts are saved when exported.",
"isCommentAutoGenerated" : true
},
"Saved to Documents/WatchExports" : {
"comment" : "A description of where the exported watch views are saved.",
"isCommentAutoGenerated" : true
},
"Saved to Documents/WidgetExports" : {
"comment" : "A description of where the exported widget screenshots are saved.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -13491,7 +13535,6 @@
}
},
"Select Style" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -13617,7 +13660,6 @@
},
"Send 5 personality pack notifications" : {
"comment" : "A description of the action that can be performed when tapping the \"Test All Notifications\" button in the Settings app.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -14354,7 +14396,6 @@
},
"Shown This Session" : {
"comment" : "A label displaying whether they have seen a tip during the current session.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -15168,6 +15209,9 @@
}
}
}
},
"Tap to log mood" : {
},
"Tap to log mood for this day" : {
"comment" : "A hint that appears when a user taps on a day with no mood logged, instructing them to log a mood.",
@@ -15297,7 +15341,6 @@
},
"Tap to preview" : {
"comment" : "A text label displayed above a list of tips, instructing the user to tap on an item to view more details.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -15465,7 +15508,6 @@
}
},
"Tap to vote" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -15507,7 +15549,6 @@
},
"Test All Notifications" : {
"comment" : "A button label that tests sending notifications.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -15550,7 +15591,6 @@
},
"Test builds only" : {
"comment" : "A section header that indicates that the settings view contains only test data.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -15634,7 +15674,6 @@
}
},
"THE ART\nOF FEELING" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -15842,7 +15881,6 @@
},
"Tips Enabled" : {
"comment" : "A toggle that enables or disables tips in the app.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -15885,7 +15923,6 @@
},
"Tips Preview" : {
"comment" : "A label for a view that previews all tip modals.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -16852,7 +16889,6 @@
},
"View all tip modals" : {
"comment" : "A description of what the \"Tips Preview\" button does.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"de" : {
@@ -16894,7 +16930,6 @@
}
},
"View Full Paywall" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {
@@ -17486,7 +17521,6 @@
}
},
"Write Your\nEmotional Story" : {
"extractionState" : "stale",
"localizations" : {
"de" : {
"stringUnit" : {