Improve haptic feedback coverage and event mapping - #95
Conversation
same-tick haptic events previously collapsed to whichever fired last; they now collapse to the highest-ranking one. adds distinct feedback for card placement, drag-over targets, banked runs, golf endgame moments, and destructive stat resets, and hides the haptics toggle on ipad.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ccad52a4c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What Changed
HapticManager: multiple events fired in one runloop tick previously collapsed to whichever fired last; they now collapse to the highest-ranking event (outcomes > errors/warnings > impacts > selection ticks). A Spider stock deal that completes a run now feels like the run's success instead of losing it.SensoryFeedbackmapping: card pickups are soft impacts, stock draws light, waste recycles medium, and undo/hint/settings interactions are selection ticks instead of six events sharing one generic.impact.hintFound,gameSwitched, andrunCompleted(banked Spider/Scorpion runs now play.success)..warning) and match completion (.success), and confirming a destructive statistics reset (.warning).SolitaireViewModel.undo()so every undo entry point fires it, including Golf's dead-hole overlay.CHHapticEngine.capabilitiesForHardware().Why
Haptics previously covered card pickups and a few outcomes but skipped the most frequent interaction in the game (a card landing), and the coalescing bug silently dropped events. Distinct feedback per interaction class follows the platform convention of reserving
.success/.error/.warningfor real outcomes and light impacts for physical card motion.Validation
xcodebuild -destination 'generic/platform=macOS' build)xcodebuild -destination 'platform=macOS' test)UI Changes
On iPad, the Settings sheet no longer shows the "Haptic feedback" toggle and its section header reads "Sound" instead of "Sound & Haptics". No other visual changes.
Related: #94