[Fix]DemoApp deeplinks join cycle#1133
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 58 minutes and 41 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: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughRemoved URL-handling methods from 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
DemoApp/Sources/Views/CallView/CallingView/DemoCallingViewModifier.swift (1)
104-117: LGTM — helper centralizes the join-cycle fix cleanly.Clearing
appState.deeplinkInfoon line 115 re-triggers theonReceive($deeplinkInfo)subscription on line 41, but the!deeplinkInfo.callId.isEmptyguard on line 105 short-circuits the second pass, so no recursion/cycle. CapturingdeeplinkInfoas a parameter (rather than readingappState.deeplinkInfoafter the reset) also avoids a TOCTOU-style bug — good.Minor note: with
autoJoinIfNeedednow owning the deeplink reset, theappState.deeplinkInfo = .emptyon line 47 (insideonChange(of: viewModel.callingState)) is largely redundant for the deeplink-driven path, though it still serves the non-deeplinkinCalltransition. Worth keeping as defensive, but you could drop it if you want a single source of truth.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@DemoApp/Sources/Views/CallView/CallingView/DemoCallingViewModifier.swift` around lines 104 - 117, Redundant deeplink reset: appState.deeplinkInfo is cleared twice — once inside autoJoinIfNeeded(deeplinkInfo:) and again in the onChange(of: viewModel.callingState) handler. Remove the duplicate appState.deeplinkInfo = .empty from the onChange(of: viewModel.callingState) block (or guard it so it only clears for non-deeplink transitions) so that autoJoinIfNeeded owns the deeplink reset; keep autoJoinIfNeeded(from:) as-is to avoid TOCTOU issues.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@DemoApp/Sources/Views/CallView/CallingView/DemoCallingViewModifier.swift`:
- Around line 104-117: Redundant deeplink reset: appState.deeplinkInfo is
cleared twice — once inside autoJoinIfNeeded(deeplinkInfo:) and again in the
onChange(of: viewModel.callingState) handler. Remove the duplicate
appState.deeplinkInfo = .empty from the onChange(of: viewModel.callingState)
block (or guard it so it only clears for non-deeplink transitions) so that
autoJoinIfNeeded owns the deeplink reset; keep autoJoinIfNeeded(from:) as-is to
avoid TOCTOU issues.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: de569a58-1d94-48f0-8554-a98a47052f30
📒 Files selected for processing (2)
DemoApp/Sources/AppDelegate.swiftDemoApp/Sources/Views/CallView/CallingView/DemoCallingViewModifier.swift
💤 Files with no reviewable changes (1)
- DemoApp/Sources/AppDelegate.swift
… the currently active call
a38aa47 to
fde43e5
Compare
☑️ Contributor Checklist
Summary by CodeRabbit