Files
obsidian-vault/Dev/apple-browsers/address-ios-onboarding-issues-merge-fix.md

3.1 KiB
Raw Permalink Blame History

Merge Fix: address-ios-onboarding-issues ← origin/main

Date: 2026-06-04
Branch: alex/address-ios-onboarding-issues
Commit: 4acf1c9737

Context

After merging origin/main into the feature branch, the iOS target failed to build due to a combination of upstream enum renames and code that was accidentally dropped during manual conflict resolution.


Root causes

1. Upstream enum renames

origin/main renamed two enums (removing the Experiment infix):

Old name New name
DuckAIQueryExperimentMode DuckAIQueryMode
DuckAIQueryExperimentPromptSource DuckAIQueryPromptSource

The old source file DuckAIQueryExperimentMode.swift was deleted upstream but its Xcode project reference was not removed during the merge, causing a project.pbxproj orphan.

2. Code dropped during conflict resolution in MainViewController.swift

When resolving conflicts, several blocks of code that existed only on the feature branch were incorrectly discarded in favour of the incoming main version:

  • bindAIChatChromeChipToCurrentTab() and its call site.
  • loadUrlRespectingAIBoundary call sites (URL loading that respects the AI query boundary).
  • AI chat history delegate wiring.

3. Upstream API additions without corresponding branch updates

  • TabSwitcherStaticButton gained a required showMenuOnLongPress: constructor argument.
  • Two new protocol methods were added to TabDelegate and TabSwitcherButtonDelegate.
  • OnboardingPixelReporter gained a new measureDuckAIFireDialogImpression() requirement.

4. Deleted upstream API still referenced on branch

  • DuckAIQueryExperimentCohort enum (used in UnifiedToggleInputFeature) was removed on main; the branch code was updated to remove that dependency.

Files changed

File What was fixed
OnboardingIntroViewModel.swift Renamed enum references
OnboardingView.swift Renamed enum references
OnboardingPixelReporter.swift Renamed enum refs + added measureDuckAIFireDialogImpression()
ContextualDaxDialogsFactory.swift Updated pixel-firing call to new method name
RebrandedContextualDaxDialogFactory.swift Same as above
UnifiedToggleInputFeature.swift Restored isToggleHiddenOnDuckAITab without deleted cohort enum
OnboardingPixelReporterMock.swift Enum renames + added missing mock method
MainViewController.swift Restored dropped AI-chat binding, URL boundary logic, new protocol stubs, updated constructor calls, removed deleted API calls
project.pbxproj Removed orphan reference to deleted DuckAIQueryExperimentMode.swift
Package.resolved (×3) Accepted upstream SPM dependency version bumps

Possible follow-up

The merge resolution was done by patching the already-merged working tree rather than by redoing the merge from scratch. If a cleaner history is desired, the merge commit could be reset and the merge re-done with these fixes applied interactively. The complete list of changes above serves as a reference for what conflicts to resolve in that scenario.