let users download their TAPSIGNER backup when setup fails partway#648
let users download their TAPSIGNER backup when setup fails partway#648guptapratykshh wants to merge 1 commit into
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 21 minutes and 44 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe change modifies Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
Greptile SummaryThis PR addresses issue #308 by introducing an intermediate screen in Confidence Score: 5/5Safe to merge — the core logic is correct, all remaining findings are P2 style suggestions. The No files require special attention beyond the two P2 style suggestions in TapSignerSetupRetryView.swift. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[TapSignerSetupRetry] --> B{availableBackup?}
B -- "nil\n(continueFromInit or complete)" --> C[errorBody]
B -- "Data\n(continueFromBackup or continueFromDerive)" --> D[intermediateBody]
C --> E[Retry button]
E --> F[runContinueSetup]
D --> G[saveTapSignerBackup\non keychain\nonAppear]
D --> H[ShareLink\nDownload Backup]
D --> I[Continue button]
I --> F
F --> J{nfc.continueSetup}
J -- ".success(.complete)" --> K[resetRoute to setupSuccess]
J -- ".success(incomplete)" --> L[Close sheet\nShow error alert]
J -- ".failure(error)" --> L
Reviews (1): Last reviewed commit: "Let users download their TAPSIGNER backu..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ios/Cove/Flows/TapSignerFlow/TapSignerSetupRetryView.swift`:
- Around line 70-73: Add an "in-flight" guard and bind UI disabled state so
repeated taps can't call runContinueSetup() concurrently: introduce a Bool state
(e.g., isRunningSetup) that runContinueSetup() checks/sets at start and clears
on completion/failure, early-returning if already true; update both Button
actions (the Retry button and the other action buttons referenced around
runContinueSetup() calls) to be disabled when isRunningSetup is true and to
reflect the disabled state in their styling so taps are ignored while an NFC
call is in progress.
- Line 205: Update the user-facing failure string in the TapSignerSetupRetryView
case .tapSignerSetupFailed to use the verb form "set up" and consistent product
casing—replace "Failed to setup TapSigner" with "Failed to set up TapSigner" in
the .tapSignerSetupFailed(message: ...) call.
- Around line 145-147: Replace the .onAppear usage that calls
app.saveTapSignerBackup(tapSigner, backup) in TapSignerSetupRetryView with a
.task(id: backup) so the save only runs when the backup value changes; locate
the block where .onAppear { let _ = app.saveTapSignerBackup(tapSigner, backup) }
is used and change it to a .task(id: backup) that invokes saveTapSignerBackup
(awaiting it if it’s async) to prevent duplicate saves when the view reappears.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 6767c71d-9f25-4524-8a63-03a4cab448a2
📒 Files selected for processing (1)
ios/Cove/Flows/TapSignerFlow/TapSignerSetupRetryView.swift
3f87e93 to
1588866
Compare
praveenperera
left a comment
There was a problem hiding this comment.
can we bring this change over to android too?
1588866 to
47d556a
Compare
When the backup step succeeds but a later step (derive or change pin) fails, surface the backup with a download button and a continue action instead of a generic error. Otherwise the user loses the only copy of the backup the card just created. Closes bitcoinppl#308.
47d556a to
9714744
Compare
Fixes #308.
When TAPSIGNER setup fails after the backup step has succeeded, show an intermediate screen with a download backup button instead of a generic error so users do not lose the backup the card already created.
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes