Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Summary

Adds auto-focus to the EntityPicker search field using SwiftUI's @FocusState. When the picker appears, the keyboard opens automatically, allowing immediate search without an extra tap.

@FocusState private var isSearchFocused: Bool

TextField(...)
    .focused($isSearchFocused)

.onAppear {
    isSearchFocused = true
}

Follows the existing pattern used in AssistView.swift.

Screenshots

N/A - keyboard behavior change only.

Link to pull request in Documentation repository

N/A - no documentation changes required.

Any other notes

None.

Original prompt

Make EntityPicker auto focus on search field when it appears


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add auto focus to search field in EntityPicker Make EntityPicker auto focus on search field when it appears Jan 30, 2026
Copilot AI requested a review from bgoncal January 30, 2026 16:03
@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@7efea47). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4294   +/-   ##
=======================================
  Coverage        ?   43.07%           
=======================================
  Files           ?      261           
  Lines           ?    15094           
  Branches        ?        0           
=======================================
  Hits            ?     6502           
  Misses          ?     8592           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bgoncal bgoncal marked this pull request as ready for review January 30, 2026 19:23
Copilot AI review requested due to automatic review settings January 30, 2026 19:23
@bgoncal bgoncal merged commit 9b887b3 into main Jan 30, 2026
19 checks passed
@bgoncal bgoncal deleted the copilot/auto-focus-search-field branch January 30, 2026 19:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the EntityPicker SwiftUI view so that its search field automatically gains focus (and shows the keyboard) when the picker appears, improving usability.

Changes:

  • Added an @FocusState-backed property (isSearchFocused) to EntityPicker.
  • Bound the search TextField to this focus state using .focused($isSearchFocused).
  • Set isSearchFocused = true in content.onAppear so the search field becomes first responder when the picker view appears (including inline and sheet modes).

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.

2 participants