Fix checkout-to-receipt transition crashes and lost links#77
Conversation
- Guard `new URL()` in PaymentWebview useMemo against undefined paymentURL, which threw after incrementalPatch changed the order data mid-render - Preserve existing order links (receipt, payment) when the payment response doesn't include them, preventing parseRestResponse from wiping them with empty defaults - Remove leading `/` from receipt navigation pathname so expo-router resolves it as a route name instead of an absolute URL path
📝 WalkthroughWalkthroughPayment webview component enhanced with defensive checks for missing payment URLs and logic to preserve existing payment/receipt links during payload parsing. Receipt modal navigation path adjusted to remove leading slash. Receipt component formatting adjusted with whitespace addition. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Comment |
🚀 Deployment Summary
🔗 Quick Links❌ Failed Tests (4 total)settings.spec.ts
📋 Full error details (first 5)settings.spec.ts - should change language to French and load translations from CDNProject: settings.spec.ts - should persist language after closing and reopening settingsProject: settings.spec.ts - should change language to French and load translations from CDNProject: settings.spec.ts - should persist language after closing and reopening settingsProject: 📸 Failure Screenshots🔗 Debug Links
🤖 Updated by GitHub Actions |
📊 Test Coverage Report
Coverage Legend
|






Summary
new URL()in PaymentWebviewuseMemoagainst undefinedpaymentURL— afterincrementalPatchupdates the order, the payment link can become undefined causingnew URL(undefined)to throw mid-renderparseRestResponsedefaults missing array properties to[], whichincrementalPatchthen overwrites, wiping out the receipt URL/from receipt navigation pathname so expo-router resolves it as a route name (matching the Stack.Screen) instead of an absolute URL pathTest plan
TypeError: Failed to construct 'URL'in consoleautoShowReceiptdisabled navigates back to cart🤖 Generated with Claude Code
Summary by CodeRabbit