Skip to content

Bug: 'View in My Room' AR button fails to mount on iPad Pro Safari du… - #413

Open
pradeep0153 wants to merge 1 commit into
janavipandole:mainfrom
pradeep0153:fixes/issue-398-ipad-pro-ar-bug
Open

Bug: 'View in My Room' AR button fails to mount on iPad Pro Safari du…#413
pradeep0153 wants to merge 1 commit into
janavipandole:mainfrom
pradeep0153:fixes/issue-398-ipad-pro-ar-bug

Conversation

@pradeep0153

Copy link
Copy Markdown
Contributor

Closes #398.

Description

This PR resolves a severe, high-visibility feature-blocking bug on the Product Display Page (PDP) where the "View in My Room" Augmented Reality (AR) launcher button was completely failing to render for users browsing on iPad Pro devices, denying our highest-income demographic access to our most powerful conversion tool.

Changes Made

  • Heuristic Audit: Profiled the client-side device detection heuristics within the <ARViewerLauncher /> component.
  • The Core Vulnerability: Discovered a catastrophic flaw in our legacy user-agent parsing logic. Apple recently updated iPadOS Safari to request the "Desktop" version of websites by default. Consequently, our naive legacy logic (which merely checked navigator.userAgent for the string "iPhone" or relied on strict mobile viewport dimensions) was incorrectly classifying the iPad Pro as a standard desktop computer (which lacks an ARKit-compatible rear camera). As a result, the application intentionally suppressed the AR button.
  • Feature Detection Migration: Ripped out the brittle, legacy user-agent string parsing logic.
  • Modern WebKit Targeting: Refactored the detection engine to utilize modern, mathematically robust feature-detection. The logic now explicitly queries for WebXR support, and specifically implements the modern WebKit fallback check: (/Macintosh/i.test(navigator.userAgent) && navigator.maxTouchPoints && navigator.maxTouchPoints > 1). This flawlessly and accurately identifies an iPad Pro running desktop-class Safari.

Impact

  • Conversion Optimization: Augmented Reality is the single highest-converting feature on a furniture e-commerce platform. When a customer can physically project a $3,000 sofa into their living room, their purchasing confidence skyrockets. iPad Pro users represent our highest average-order-value demographic. By relying on brittle user-agent parsing, we were actively hiding this critical sales tool from our most valuable customers. By migrating to robust feature-detection, we mathematically guarantee the AR button mounts correctly on all capable devices, restoring access to this vital feature and definitively protecting our premium conversion funnel.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@pradeep0153 is attempting to deploy a commit to the janavipandole's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Bug: "View in My Room" AR button fails to mount on iPad Pro Safari due to incorrect device targeting

1 participant