harbor run -t scale-ai/hil-bench-swe_63-ask_humanharbor download scale-ai/hil-bench-swe_63-ask_humanTitle: Display SmartBanner on all mobile browsers for Proton Mail and Proton Calendar
Description
The Proton Mail and Proton Calendar web clients currently do not consistently display a promotional banner ("SmartBanner") on Android and iOS mobile browsers. Today, the banner's download-link flow is still coupled to product-specific setup, and differences in that setup have led to inconsistent behavior between the two products and across mobile contexts. The goal of this task is to make the SmartBanner behave consistently for Proton Mail and Proton Calendar on supported mobile devices. The fix may require updates in both the runtime banner flow and any product-specific Mail/Calendar setup that currently participates in that flow.
Expected Behavior
SmartBanner component must accept a prop named app of type SmartBannerApp, which identifies whether the banner corresponds to Proton Mail or Proton Calendar.SmartBannerApp type must be defined as a union of APPS.PROTONCALENDAR and APPS.PROTONMAIL.SmartBanner component must be integrated into the Calendar app's main view. Specifically, it must be rendered inside the TopBanners component in CalendarContainerView. (The Mail app already renders the SmartBanner inside the TopBanners component in PrivateLayout.)app prop.useSmartBanner.ts should return either a store URL string or null. It should return a URL only when the device is on a supported mobile platform and the user has not previously used the same product's native mobile app.types.d.ts should export a SmartBannerApp type defined as APPS.PROTONCALENDAR | APPS.PROTONMAIL. This type should be used for the app prop in SmartBanner.tsx, for the argument in useSmartBanner.ts, and for the parameter in useSmartBannerTelemetry.ts.No new public interface files are introduced in this task.