Repository navigation
Refactor haptics settings - #341
Conversation
WalkthroughAdds a Haptics settings flow: Toggle UI layout adjusted, Haptics added to SettingsOptions and options list, Haptics moved from General to a new dedicated Haptics screen (with config update logic), and Notifications updated to use Toggle's new subtext prop. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying wallet-bitcoin with
|
| Latest commit: |
46cc287
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://288ff27b.wallet-bitcoin.pages.dev |
| Branch Preview URL: | https://refactor-haptics-settings.wallet-bitcoin.pages.dev |
Deploying wallet-mutinynet with
|
| Latest commit: |
46cc287
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e5907bfd.arkade-wallet.pages.dev |
| Branch Preview URL: | https://refactor-haptics-settings.arkade-wallet.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/screens/Settings/Index.tsx`:
- Line 22: Add the missing React component file src/screens/Settings/Haptics.tsx
that exports the default Haptics component used by the import in Index.tsx;
implement a functional React/React Native component named Haptics (matching the
import) that accepts the same props expected where it’s used in the switch
statement in Index.tsx (e.g., navigation or settings props) and renders the
intended UI (or a placeholder UI) so the import resolves and the build succeeds.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/components/Toggle.tsxsrc/lib/types.tssrc/providers/options.tsxsrc/screens/Settings/General.tsxsrc/screens/Settings/Index.tsxsrc/screens/Settings/Notifications.tsx
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/screens/Settings/Haptics.tsx`:
- Around line 11-15: The toggle handler handleChange currently awaits
backupConfig(newConfig) and therefore skips updateConfig(newConfig) if the
backup fails; change it so the UI update always occurs: either call
updateConfig(newConfig) before performing the backup, or start
backupConfig(newConfig) without awaiting it and catch/log errors (e.g.,
config.nostrBackup && backupConfig(newConfig).catch(...)); ensure you still only
attempt backup when config.nostrBackup is true and keep the same newConfig
calculation using config and haptics.
Summary by CodeRabbit
New Features
UI Improvements