Skip to content

Conversation

@lmarceau
Copy link
Contributor

@lmarceau lmarceau commented Nov 5, 2025

📜 Tickets

Jira ticket
Github issue

💡 Description

This is a big PR, but it's a fun one! It removes the legacy homepage and it's related code.

  • It removes the LegacyHomepageViewController and friends + the related homepageRebuildFeature feature flag
  • The related TelemetryWrapper events,
  • The LegacyTopSite feature flag (hntTopSitesVisualRefresh since this is released in the wild with no experiments)

Experiment to double-check

One extra thing I want to check before merging this in main:

  • There's one experiment currently running that somehow targets homepage-rebuild-feature. The theory to me is that this has no effect since homepage-rebuild-feature is set to true on both branches, and that flag is true in all channel. But I'll double check the experiment still works as expected if that flag isn't present anymore.
  • I created a copy of the experiment to run it in preview, and I'll check with a TestFlight build the experiment works as expected. If it doesn't, then I'll wait for the experiment to end before merging this PR.
Screenshot 2025-11-05 at 10 11 46 AM

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If adding telemetry, I read the data stewardship requirements and will request a data review
  • If adding or modifying strings, I read the guidelines and will request a string review from l10n
  • If needed, I updated documentation and added comments to complex code

@mobiletest-ci-bot
Copy link

mobiletest-ci-bot commented Nov 5, 2025

Warnings
⚠️ Changes detected in files: firefox-ios/Client/TabManagement/Tab.swift. Ensure that necessary updates are also ported to the WebEngine project if required (cc @lmarceau).
⚠️ Deferred class is used in file firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/BookmarksHandlerMock.swift at line 37. Please replace with completion handler instead.
⚠️ Deferred class is used in file firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/BookmarksHandlerMock.swift at line 38. Please replace with completion handler instead.
Messages
📖 Project coverage: 38.0%

💪 Quality guardian

50 tests files modified. You're a champion of test coverage! 🚀

🧟‍♂️ Monster PR

Wow, this PR is huge with 10602 lines changed!
Thanks for powering through such a big task 🙌.
Reviewers: feel free to ask for extra context, screenshots, or a breakdown to make reviewing smoother.

💬 Description craftsman

Great PR description! Reviewers salute you 🫡

🎉 BrowserViewController got smaller

Nice! BrowserViewController.swift got smaller by 39 lines.

🧑‍💻 New Task {} detected

New Task {} added in file firefox-ios/Client/Frontend/Home/Homepage/Merino/MerinoMiddleware.swift at line 46.
Please add a concurrency reviewer on your PR: @Cramsden @ih-codes @lmarceau

🧑‍💻 New Task {} detected

New Task {} added in file firefox-ios/Client/Frontend/Home/Homepage/Merino/MerinoMiddleware.swift at line 59.
Please add a concurrency reviewer on your PR: @Cramsden @ih-codes @lmarceau

🧑‍💻 New Task {} detected

New Task {} added in file firefox-ios/Client/Frontend/Home/Homepage/TopSites/TopSitesMiddleware.swift at line 53.
Please add a concurrency reviewer on your PR: @Cramsden @ih-codes @lmarceau

🧑‍💻 New Task {} detected

New Task {} added in file firefox-ios/Client/Frontend/Home/Homepage/TopSites/TopSitesMiddleware.swift at line 88.
Please add a concurrency reviewer on your PR: @Cramsden @ih-codes @lmarceau

🧑‍💻 New Task {} detected

New Task {} added in file firefox-ios/Client/Frontend/Home/Homepage/TopSites/TopSitesMiddleware.swift at line 96.
Please add a concurrency reviewer on your PR: @Cramsden @ih-codes @lmarceau

🧑‍💻 New Task {} detected

New Task {} added in file firefox-ios/Client/Frontend/Home/Homepage/Wallpapers/v1/Interface/WallpaperManager.swift at line 175.
Please add a concurrency reviewer on your PR: @Cramsden @ih-codes @lmarceau

❌ Per-file test coverage gate

The following changed file(s) are below 35.0% coverage:

File Coverage Required
firefox-ios/Client/Frontend/Home/Homepage/HomepageUX.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift 30.8% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Bookmark/BookmarksCell.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/ContextMenu/ContextMenuState.swift 30.5% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/JumpBackIn/JumpBackInCell.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/JumpBackIn/SyncedTabCell.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Layout/HomepageLayoutMeasurementCache.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Layout/HomepageSectionLayoutProvider.swift 19.7% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Layout/TopSitesSectionLayoutProvider.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Merino/MerinoStandardCell.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/MessageCard/HomepageMessageCardCell.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/SearchBar/SearchBarCell.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/TopSites/DataManagement/Contile.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/TopSites/DataManagement/ContileNetworking.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/TopSites/DataManagement/GoogleTopSiteManager.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/TopSites/DataManagement/TopSiteHistoryManager.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/TopSites/EmptyTopSiteCell.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/TopSites/TopSite.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/TopSites/TopSiteCell.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Wallpapers/v1/Interface/WallpaperManager.swift 21.1% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Wallpapers/v1/Models/WallpaperCollectionType.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Wallpapers/v1/Models/WallpaperMetadata.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Wallpapers/v1/NetworkServices/WallpaperImageLoader.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Wallpapers/v1/Protocols/WallpaperNetworking.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Wallpapers/v1/UI/LegacyWallpaperBackgroundView.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Wallpapers/v1/UI/WallpaperCellViewModel.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Wallpapers/v1/UI/WallpaperCollectionViewCell.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Wallpapers/v1/UI/WallpaperSelectorViewController.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Wallpapers/v1/Utilities/WallpaperMigrationUtility.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/Homepage/Wallpapers/v1/Utilities/WallpaperThumbnailUtility.swift 0.0% 35.0%
firefox-ios/Client/Frontend/Home/UnifiedAds/UnifiedTile.swift 0.0% 35.0%

Client.app: Coverage: 36.57

File Coverage
MerinoManager.swift 100.0%
TopSitesAction.swift 100.0%
WallpaperCollectionAvailability.swift 100.0%
BrowserViewController.swift 30.76% ⚠️
JumpBackInCell.swift 0.0% ⚠️
Wallpaper.swift 92.06%
TopSitesSectionLayoutProvider.swift 0.0% ⚠️
ContileProvider.swift 90.91%
FeatureFlagsDebugViewController.swift 0.0% ⚠️
SearchBarCell.swift 0.0% ⚠️
HeaderState.swift 76.27%
HomepageState.swift 78.07%
SectionHeaderConfiguration.swift 100.0%
MerinoState.swift 96.39%
BrowserCoordinator.swift 68.12%
HomepageTelemetry.swift 98.28%
HomePageSettingViewController.swift 6.11% ⚠️
UnifiedAdsProvider.swift 87.39%
BookmarksSectionState.swift 95.89%
WallpaperAction.swift 100.0%
WallpaperState.swift 98.0%
WallpaperURLProvider.swift 75.0%
MerinoAction.swift 100.0%
LabelButtonHeaderView.swift 66.67%
SearchBarState.swift 96.15%
TopSiteCell.swift 0.0% ⚠️
JumpBackInTabConfiguration.swift 35.29% ⚠️
WallpaperFilePathProvider.swift 81.4%
LegacyWallpaperBackgroundView.swift 0.0% ⚠️
HomepageViewController.swift 50.46%
ContileNetworking.swift 0.0% ⚠️
WallpaperMigrationUtility.swift 0.0% ⚠️
WallpaperSettingsViewModel.swift 71.92%
TopTabDisplayManager.swift 14.89% ⚠️
WallpaperImageLoader.swift 0.0% ⚠️
WallpaperSelectorViewModel.swift 80.09%
WallpaperMiddleware.swift 95.0%
GoogleTopSiteManager.swift 0.0% ⚠️
WallpaperMetadataCodableProtocol.swift 100.0%
JumpBackInSectionState.swift 94.74%
WallpaperBackgroundView.swift 94.55%
EmptyTopSiteCell.swift 0.0% ⚠️
WallpaperCollection.swift 67.39%
MerinoStoryConfiguration.swift 95.65%
WallpaperStorageUtility.swift 41.86% ⚠️
ContentContainer.swift 94.74%
HomepageLayoutMeasurementCache.swift 0.0% ⚠️
Tab.swift 58.99%
TopSiteConfiguration.swift 50.0% ⚠️
MerinoMiddleware.swift 100.0%
SyncedTabCell.swift 0.0% ⚠️
HomepageDiffableDataSource.swift 81.2%
HomepageHeroImageViewModel.swift 100.0%
MessageCardAction.swift 100.0%
MessageCardState.swift 95.92%
SponsoredTileDataUtility.swift 100.0%
WallpaperDataService.swift 62.5%
BookmarksCell.swift 0.0% ⚠️
ContextMenuState.swift 30.46% ⚠️
BookmarksMiddleware.swift 89.16%
ShortcutsLibraryViewController.swift 62.75%
TopSitesManager.swift 98.03%
ContextMenuConfiguration.swift 100.0%
WallpaperManager.swift 21.05% ⚠️
StoryCell.swift 80.79%
HomepageSectionLayoutProvider.swift 19.68% ⚠️
NimbusFlaggableFeature.swift 95.48%
WallpaperMetadataUtility.swift 75.71%
MerinoStandardCell.swift 0.0% ⚠️
HomepageMessageCardCell.swift 0.0% ⚠️
TopSitesSectionState.swift 97.48%
WallpaperSelectorViewController.swift 0.0% ⚠️
CustomizeHomepageSectionCell.swift 83.93%
WallpaperMetadataLoader.swift 100.0%
WallpaperCollectionViewCell.swift 0.0% ⚠️
ContextMenuAction.swift 100.0%
NimbusFeatureFlagLayer.swift 77.2%
TelemetryWrapper.swift 65.5%
HomepageDimensionImplementation.swift 89.69%
HomeLogoHeaderCell.swift 90.2%
UnifiedAdsCallbackTelemetry.swift 80.52%
WallpaperThumbnailUtility.swift 0.0% ⚠️
Site+createSponsoredSite.swift 100.0%
WallpaperSettingsViewController.swift 2.56% ⚠️
PrivateHomepageViewController.swift 54.63%
TopSiteHistoryManager.swift 0.0% ⚠️
BookmarksAction.swift 100.0%
TopSite.swift 0.0% ⚠️
WallpaperNetworkModule.swift 100.0%
UnifiedAdsConverter.swift 100.0%
ContextMenuCoordinator.swift 100.0%
TabCell.swift 70.11%
HomepageHeaderCell.swift 91.3%
BookmarkConfiguration.swift 75.0%
MessageCardMiddleware.swift 100.0%
JumpBackInAction.swift 100.0%
TabManagerImplementation.swift 55.6%
HomepageMiddleware.swift 46.43% ⚠️
TopSitesMiddleware.swift 86.86%
HomepageAction.swift 100.0%
StoryProvider.swift 100.0%

Generated by 🚫 Danger Swift against d90e8d1


refreshStore(shouldAnimate: true)

let notificationObject = [Tab.privateModeKey: isPrivate]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not needed anymore since the legacy homepage was the only one listening to this notification

@mergify
Copy link
Contributor

mergify bot commented Nov 5, 2025

This pull request has conflicts when rebasing. Could you fix it @lmarceau? 🙏


private let scrollView: UIScrollView = .build()

private var headerViewModel: HomepageHeaderCellViewModel {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Somehow that wasn't used anywhere, so removing it


selectTab(nextSelectedTab)

let notificationObject = [Tab.privateModeKey: nextSelectedTab?.isPrivate ?? true]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same notification as above, this was only listened to in the legacy Homepage

notification_emails:
- [email protected]
expires: "2026-01-01"
recently_saved_bookmark_view:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cyndichin I found the two following telemetry events were only used for the legacy homepage:

  • recently_saved_bookmark_view
  • firefox_homepage_origin

Just want to double-check this is expected

@lmarceau lmarceau force-pushed the lm/remove-legacy-homepage branch from 919abc3 to d866727 Compare November 5, 2025 15:26
@lmarceau lmarceau marked this pull request as ready for review November 5, 2025 15:27
@lmarceau lmarceau requested a review from a team as a code owner November 5, 2025 15:27
@lmarceau lmarceau force-pushed the lm/remove-legacy-homepage branch from d866727 to 535a6e3 Compare November 5, 2025 18:38
@mergify
Copy link
Contributor

mergify bot commented Nov 5, 2025

This pull request has conflicts when rebasing. Could you fix it @lmarceau? 🙏

@lmarceau lmarceau force-pushed the lm/remove-legacy-homepage branch from 535a6e3 to c554459 Compare November 5, 2025 21:56
@lmarceau lmarceau requested a review from a team as a code owner November 5, 2025 22:00
@lmarceau lmarceau requested a review from clarmso November 5, 2025 22:00
@lmarceau
Copy link
Contributor Author

lmarceau commented Nov 6, 2025

Build was green! ✅ But since this changes homepage files I'll get conflicts often 😆 In the meantime:

  • You can review since this is ready
  • I'll double-check the experiment setup as listed above

@lmarceau lmarceau force-pushed the lm/remove-legacy-homepage branch from 133ee33 to d90e8d1 Compare November 6, 2025 00:20
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