Skip to content

Conversation

@tomerqodo
Copy link

@tomerqodo tomerqodo commented Jan 22, 2026

Benchmark PR from qodo-benchmark#206

Summary by CodeRabbit

  • Chores

    • Updated app version to 147.2
    • Removed QR code scanner functionality and related features throughout the application
  • Tests

    • Removed QR code-related test cases and mock implementations

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

Walkthrough

This pull request comprehensively removes QR code scanning functionality from Firefox iOS across routing, UI, telemetry, and test layers. The version is bumped from 147.1 to 147.2. QR code enum cases, handlers, delegates, and metrics are deleted throughout the codebase.

Changes

Cohort / File(s) Change Summary
Routing & Navigation
firefox-ios/Client/Application/QuickActions.swift, firefox-ios/Client/Coordinators/Router/DeeplinkInput.swift, firefox-ios/Client/Coordinators/Router/Route.swift, firefox-ios/Client/Coordinators/Router/RouteBuilder.swift, firefox-ios/Client/Coordinators/Browser/BrowserCoordinator.swift
Removed qrCode shortcut case, showQRCode app action case, and associated route builder logic and coordinator handler method handleQRCode().
Browser UI & State Management
firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift, firefox-ios/Client/Frontend/Browser/BrowserViewController/State/BrowserViewControllerState.swift, firefox-ios/Client/Frontend/Browser/BrowserViewController/Actions/GeneralBrowserAction.swift
Removed QRCodeViewControllerDelegate conformance, showQRcodeReader action case, qrCodeReader display type, QR code handler methods (handleQRCode(), didScanQRCodeWithURL(), didScanQRCodeWithTextContent(), handleShowQRcodeReaderAction()), and scanning permission property.
Toolbar & Actions
firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarActionConfiguration.swift, firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarMiddleware.swift, firefox-ios/Client/Frontend/Browser/Toolbars/ToolbarTelemetry.swift
Removed qrCode action type case, QR code button tap handling in middleware, and qrCodeButtonTapped() telemetry method. Modified URL determination logic in edit mode cancellation and reader mode telemetry inference.
Telemetry & Metrics
firefox-ios/Client/Glean/probes/metrics.yaml, firefox-ios/Client/Glean/probes/toolbar.yaml, firefox-ios/Client/Telemetry/TelemetryWrapper.swift
Removed qr_code metric group from private_browsing, qr_scan_button_tapped event from toolbar metrics, and qrCodeText and qrCodeURL event object enum cases.
Tests
firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/BrowserCoordinatorTests.swift, firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/ShortcutRouteTests.swift, firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockBrowserViewController.swift, firefox-ios/firefox-ios-tests/Tests/ClientTests/Toolbar/ToolbarMiddlewareTests.swift
Removed test cases for QR code handling, shortcut routing, and button taps. Deleted QR code count tracking from mock browser view controller.
Version Configuration
firefox-ios/Client/Configuration/version.xcconfig
Updated app version from 147.1 to 147.2.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 A hop, skip, and scan away,
Our QR codes had their day,
Now removed with careful care,
Routes and metrics stripped bare,
The code hops lighter, I do declare! 📱✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing QR code-related code from BVC (BrowserViewController) across the codebase.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b68360 and 75b1c94.

📒 Files selected for processing (19)
  • firefox-ios/Client/Application/QuickActions.swift
  • firefox-ios/Client/Configuration/version.xcconfig
  • firefox-ios/Client/Coordinators/Browser/BrowserCoordinator.swift
  • firefox-ios/Client/Coordinators/Router/DeeplinkInput.swift
  • firefox-ios/Client/Coordinators/Router/Route.swift
  • firefox-ios/Client/Coordinators/Router/RouteBuilder.swift
  • firefox-ios/Client/Frontend/Browser/BrowserViewController/Actions/GeneralBrowserAction.swift
  • firefox-ios/Client/Frontend/Browser/BrowserViewController/State/BrowserViewControllerState.swift
  • firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift
  • firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarActionConfiguration.swift
  • firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarMiddleware.swift
  • firefox-ios/Client/Frontend/Browser/Toolbars/ToolbarTelemetry.swift
  • firefox-ios/Client/Glean/probes/metrics.yaml
  • firefox-ios/Client/Glean/probes/toolbar.yaml
  • firefox-ios/Client/Telemetry/TelemetryWrapper.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/BrowserCoordinatorTests.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/ShortcutRouteTests.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockBrowserViewController.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Toolbar/ToolbarMiddlewareTests.swift
💤 Files with no reviewable changes (15)
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/ShortcutRouteTests.swift
  • firefox-ios/Client/Coordinators/Router/DeeplinkInput.swift
  • firefox-ios/Client/Coordinators/Router/Route.swift
  • firefox-ios/Client/Frontend/Browser/BrowserViewController/Actions/GeneralBrowserAction.swift
  • firefox-ios/Client/Coordinators/Router/RouteBuilder.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/BrowserCoordinatorTests.swift
  • firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift
  • firefox-ios/Client/Telemetry/TelemetryWrapper.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Toolbar/ToolbarMiddlewareTests.swift
  • firefox-ios/Client/Glean/probes/toolbar.yaml
  • firefox-ios/Client/Application/QuickActions.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockBrowserViewController.swift
  • firefox-ios/Client/Glean/probes/metrics.yaml
  • firefox-ios/Client/Coordinators/Browser/BrowserCoordinator.swift
  • firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarActionConfiguration.swift
🧰 Additional context used
🧬 Code graph analysis (1)
firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarMiddleware.swift (2)
firefox-ios/Client/TabManagement/Tab.swift (1)
  • currentURL (1022-1024)
BrowserKit/Sources/Common/Extensions/URLExtension.swift (1)
  • isWebPage (297-300)
🔇 Additional comments (3)
firefox-ios/Client/Configuration/version.xcconfig (1)

1-1: APP_VERSION bump looks good.

No concerns with the configuration update.

firefox-ios/Client/Frontend/Browser/Toolbars/ToolbarTelemetry.swift (1)

8-12: Telemetry wrapper exposure is fine.

This looks like a reasonable change for injection/testing.

firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarMiddleware.swift (1)

482-486: Reader mode URL retention on cancel-edit looks good.

Keeping Reader Mode URLs prevents dropping the visible content when dismissing edit mode.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
firefox-ios/Client/Frontend/Browser/BrowserViewController/State/BrowserViewControllerState.swift (1)

559-567: Reader mode tap now routes to the long‑press sheet.

Line 566 sets displayView to .readerModeLongPressAction, which seems intended for long‑press actions, not the tap flow. This will likely show the wrong UI when tapping Reader Mode.

🔧 Proposed fix
-            displayView: .readerModeLongPressAction,
+            displayView: .readerMode,
firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarMiddleware.swift (1)

520-528: Fix telemetry mapping for reader-mode states.

The current switch expression maps .unavailable to true (via default case), which will report reader mode as enabled when it's actually unavailable. Explicit case handling is required:

Fix
-        let isReaderModeEnabled = switch toolbarState.addressToolbar.readerModeState {
-        case .available: false // will be enabled after action gets executed
-        default: true
-        }
+        let isReaderModeEnabled = switch toolbarState.addressToolbar.readerModeState {
+        case .available:
+            false // will be enabled after action gets executed
+        case .active:
+            true
+        case .unavailable:
+            false
+        }
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b68360 and 75b1c94.

📒 Files selected for processing (19)
  • firefox-ios/Client/Application/QuickActions.swift
  • firefox-ios/Client/Configuration/version.xcconfig
  • firefox-ios/Client/Coordinators/Browser/BrowserCoordinator.swift
  • firefox-ios/Client/Coordinators/Router/DeeplinkInput.swift
  • firefox-ios/Client/Coordinators/Router/Route.swift
  • firefox-ios/Client/Coordinators/Router/RouteBuilder.swift
  • firefox-ios/Client/Frontend/Browser/BrowserViewController/Actions/GeneralBrowserAction.swift
  • firefox-ios/Client/Frontend/Browser/BrowserViewController/State/BrowserViewControllerState.swift
  • firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift
  • firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarActionConfiguration.swift
  • firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarMiddleware.swift
  • firefox-ios/Client/Frontend/Browser/Toolbars/ToolbarTelemetry.swift
  • firefox-ios/Client/Glean/probes/metrics.yaml
  • firefox-ios/Client/Glean/probes/toolbar.yaml
  • firefox-ios/Client/Telemetry/TelemetryWrapper.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/BrowserCoordinatorTests.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/ShortcutRouteTests.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockBrowserViewController.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Toolbar/ToolbarMiddlewareTests.swift
💤 Files with no reviewable changes (15)
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/ShortcutRouteTests.swift
  • firefox-ios/Client/Coordinators/Router/DeeplinkInput.swift
  • firefox-ios/Client/Coordinators/Router/Route.swift
  • firefox-ios/Client/Frontend/Browser/BrowserViewController/Actions/GeneralBrowserAction.swift
  • firefox-ios/Client/Coordinators/Router/RouteBuilder.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/BrowserCoordinatorTests.swift
  • firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift
  • firefox-ios/Client/Telemetry/TelemetryWrapper.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Toolbar/ToolbarMiddlewareTests.swift
  • firefox-ios/Client/Glean/probes/toolbar.yaml
  • firefox-ios/Client/Application/QuickActions.swift
  • firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockBrowserViewController.swift
  • firefox-ios/Client/Glean/probes/metrics.yaml
  • firefox-ios/Client/Coordinators/Browser/BrowserCoordinator.swift
  • firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarActionConfiguration.swift
🧰 Additional context used
🧬 Code graph analysis (1)
firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarMiddleware.swift (2)
firefox-ios/Client/TabManagement/Tab.swift (1)
  • currentURL (1022-1024)
BrowserKit/Sources/Common/Extensions/URLExtension.swift (1)
  • isWebPage (297-300)
🔇 Additional comments (3)
firefox-ios/Client/Configuration/version.xcconfig (1)

1-1: APP_VERSION bump looks good.

No concerns with the configuration update.

firefox-ios/Client/Frontend/Browser/Toolbars/ToolbarTelemetry.swift (1)

8-12: Telemetry wrapper exposure is fine.

This looks like a reasonable change for injection/testing.

firefox-ios/Client/Frontend/Browser/Toolbars/Redux/ToolbarMiddleware.swift (1)

482-486: Reader mode URL retention on cancel-edit looks good.

Keeping Reader Mode URLs prevents dropping the visible content when dismissing edit mode.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

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