Skip to content

Conversation

@tomerqodo
Copy link

@tomerqodo tomerqodo commented Jan 21, 2026

Benchmark PR from qodo-benchmark#218


Note

Swift 6 migration and concurrency safety

  • Sets SWIFT_VERSION = 6.0 across project and test targets
  • Adds @MainActor/@Sendable to numerous callbacks and delegate completion handlers (OnboardingFlowViewModel, OnboardingService, web view delegates, context menu actions, tab provider, autofill accessory, download toast)
  • Wraps onboarding handleAction in a Task in LaunchCoordinator to align with actor isolation

Minor UI/behavior adjustments

  • Hardcodes close button size in DownloadToast (removes local UX constant)
  • Aligns closure types in BrowserWebController helpers and WebContextMenuActionsProvider for thread-safe tab operations

Written by Cursor Bugbot for commit 5371116. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

runJavaScriptAlertPanelWithMessage message: String,
initiatedByFrame frame: WKFrameInfo,
completionHandler: @escaping @MainActor @Sendable () -> Void
completionHandler: @escaping @MainActor () -> Void
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent @Sendable removal from completion handler

Low Severity

The @Sendable annotation was removed from the completionHandler parameter in runJavaScriptAlertPanelWithMessage, but was kept on the similar runJavaScriptConfirmPanelWithMessage and runJavaScriptTextInputPanelWithPrompt methods in the same file (lines 56 and 71). This creates an inconsistency within the file and mismatches the corresponding implementation in BrowserViewController+WebViewDelegates.swift where all three methods have @Sendable on their completion handlers.

Fix in Cursor Fix in Web

ViewModel.OnboardingActionType,
String,
@escaping (Result<TabAction, Error>) -> Void
@MainActor @escaping (Result<TabAction, Error>) -> Void
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing @Sendable on completion handler type creates mismatch

Medium Severity

The onActionTap closure's completion handler type in OnboardingFlowViewModel was updated to @MainActor @escaping (Result<TabAction, Error>) -> Void but is missing @Sendable. However, OnboardingService.handleAction expects @Sendable @escaping @MainActor (...) on its completion parameter. When completion is passed from the onActionTap closure in LaunchCoordinator to handleAction, there's a type mismatch since the closure typed without @Sendable is being passed where @Sendable is required.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants