Skip to content

fix(#335): show search field on foldable inner screen - #336

Merged
cassio-rossi merged 2 commits into
release/v5from
fix/335-search-inner-screen-duo
Nov 11, 2026
Merged

cassio-rossi merged 2 commits into
release/v5from
fix/335-search-inner-screen-duo

Conversation

@cassio-rossi

Copy link
Copy Markdown
Collaborator

Fixes #335

Problem

On the iPhone Duo, Search doesn't open the text field when the device is unfolded (inner screen). It works on the outer screen.

Cause

SearchView inferred "iPad" from size classes (regular × regular) and skipped .searchable. The unfolded Duo reports regular/regular but has a phone idiom, so MainView still uses the tab bar layout (shouldUseSidebar requires the iPad idiom). Result: no search field in either layout.

Fix

SearchView now uses @Environment(\.shouldUseSidebar), the same condition MainView uses to pick the sidebar layout, and the unused isIPad helper and size-class environment values are removed. iPad behavior is unchanged.

Verification

  • swiftlint --strict on the file: 0 violations
  • Project builds in Xcode
  • Not tested on a Duo device/simulator; unit tests not run (view-layout change)

🤖 Generated with Claude Code

SearchView inferred iPad from size classes, so the unfolded iPhone Duo
(regular/regular, phone idiom) skipped .searchable while MainView still
used the tab bar layout. Use shouldUseSidebar to match the layout choice.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cassio-rossi
cassio-rossi merged commit 582d065 into release/v5 Nov 11, 2026
2 checks passed
@cassio-rossi
cassio-rossi deleted the fix/335-search-inner-screen-duo branch November 11, 2026 19:08
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.

Campo de busca não aparece com o iPhone Duo aberto

1 participant