fix: accept hardware input on numeric keypads - #1040
Conversation
|
Warning Review limit reached
Next review available in: 8 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesThe PR adds Hardware numeric keyboard
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This localized input-handling change has no actionable merge-blocking risk remaining; the only follow-up concerns an uncommon locale separator case. Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant User
participant HardwareNumericKeyboardResponder
participant HardwareNumericKeyboardView
participant NumericKeyboardView
participant AmountScreen
User->>HardwareNumericKeyboardResponder: enter numeric key
HardwareNumericKeyboardResponder->>HardwareNumericKeyboardView: dispatch recognized command
HardwareNumericKeyboardView->>HardwareNumericKeyboardView: update bound amount
HardwareNumericKeyboardView->>NumericKeyboardView: preserve keypad configuration
HardwareNumericKeyboardView->>AmountScreen: publish updated amount
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Replace the UIKeyCommand-based responder with a hidden UITextField that overrides insertText/deleteBackward and suppresses the software keyboard via an empty inputView, matching the existing DWPinField and TwoFactorAuthViewController pattern instead of introducing a fourth keyboard mechanism. This also makes hardware Return trigger the action button (gated the same way as the visible button, including the non-empty-value check), reclaims first responder after a sheet or alert with a text field steals it, and gains native key auto-repeat and paste handling. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Issue being fixed or feature implemented
DashUIKit's integrated numeric keypad is rendered as buttons and does not install a text responder. As a result, digits and decimal separators typed with a connected physical keyboard—or the Mac keyboard attached to Simulator—are discarded on amount and numeric-authentication screens.
What was done?
How Has This Been Tested?
dashpayscheme for the arm64 iOS Simulator:xcodebuild -quiet -workspace DashWallet.xcworkspace -scheme dashpay -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' ARCHS=arm64 build0.01through Simulator hardware-key events and verified the displayed amount and enabled Continue state updated immediately.2key afterward and verified the amount became0.012, confirming the on-screen keypad remains functional.CLAUDE.md; the new unit cases are compile-ready.Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only
This pull request was created by Codex.
Summary by CodeRabbit
New Features
Tests