Skip to content

fix(ios): keep split-view search in sidebar so it does not overlap Composer - #1247

Merged
kyya merged 1 commit into
mainfrom
fix/duo-search-send-overlap
Nov 28, 2026
Merged

kyya merged 1 commit into
mainfrom
fix/duo-search-send-overlap

Conversation

@kyya

@kyya kyya commented Nov 28, 2026 •

Copy link
Copy Markdown

Problem

On iPhone Duo (unfolded) and large iPhones in landscape (where horizontalSizeClass == .regular and HostListView uses NavigationSplitView), the floating circular Search button from the sidebar's bottom bar overflows into the terminal detail column and overlaps the Composer bar / Send button.

Cause

In ios/GoRex/Views/HostListView.swift:413-415, list unconditionally added DefaultToolbarItem(kind: .search, placement: .bottomBar) and .searchable(text: $query, prompt: "Search tabs") even when width == .regular.

On iPad, iPadOS automatically hoists the sidebar's search button into the sidebar's top navigation bar. On iPhone (userInterfaceIdiom == .phone) in regular-width NavigationSplitView (iPhone Duo unfolded or large iPhone landscape), iOS honors placement: .bottomBar in the split view's root bottom toolbar, so the floating magnifying-glass button spills out of the sidebar over the detail pane's ComposerBar (and its Send button).

Fix

  • Gate DefaultToolbarItem(kind: .search, placement: .bottomBar) to compact width (width != .regular), keeping ToolbarSpacer(.flexible, placement: .bottomBar) so Settings and Inbox stay left-aligned in the sidebar bottom bar.
  • Pass placement: width == .regular ? .sidebar : .automatic to .searchable(...) so search stays scoped to the sidebar in regular-width split view while keeping the compact-width bottom-bar search unchanged.

Test

  • Added SplitViewComposerUITests.testSplitViewSearchDoesNotOverlapComposer in ios/GoRexUITests/ComposerUITests.swift, which opens Demo Mode in regular-width landscape with -composerMode YES and asserts no Search button intersects composer or Send (both with the sidebar open and after hiding the sidebar).
  • Before the fix, testSplitViewSearchDoesNotOverlapComposer failed on iPhone Air (iOS 27.2 Simulator) with:
    XCTAssertFalse failed - Search button (438.0, 356.0, 36.0, 36.0) overlaps composer (398.0, 268.0, 436.0, 112.0) (sidebar open)
  • After the fix, testSplitViewSearchDoesNotOverlapComposer passes in both sidebar-open and sidebar-hidden states.
  • Also verified ios/scripts/test-notes check origin/main.
  • Note: Verified in regular-width split view on iPhone Air landscape simulator (iOS 27.2, userInterfaceIdiom == .phone, horizontalSizeClass == .regular) and iPhone Duo outer display; unfolded iPhone Duo inner display cannot be switched headlessly via simctl alone.

Screenshots

Made-up Demo Mode data only:

State Before After
Split view (sidebar open) before-split-open after-split-open
Split view (sidebar hidden) — after-split-hidden

Verified: go run ./tools/verify: ios xcodebuild NOT VERIFIED; macmini xcodebuild test SplitViewComposerUITests/testSplitViewSearchDoesNotOverlapComposer passed on iPhone Air landscape (failed before fix)

@kyya
kyya force-pushed the fix/duo-search-send-overlap branch from 4d348e5 to fc9c024 Compare November 28, 2026 02:06
@kyya
kyya merged commit 7c3273f into main Nov 28, 2026
11 checks passed
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.

1 participant