Skip to content

Conversation

avi-alpert
Copy link
Contributor

@avi-alpert avi-alpert commented Jul 24, 2025

Problem

When users click @Pin Context and search for context items and click on an item that has children (like @Files), the search term remains in the input field and the search input loses focus (see recording). This creates confusion because the displayed results now show the children of the selected item, but the search input still contains the previous search term. Users expect to continue typing to search within the new context, but have to manually click back into the search field.

Solution

• Implemented clearAndFocusFirstTextInput() method to clear and refocus the search input when navigating to nested items
• Added contextSearchPlaceholder configuration option for consistent placeholder text
• Enhanced text input components with clear() and focus() methods for proper state management
• Added comprehensive test coverage for the top bar context menu, including the new search clearing behavior

The search input now maintains focus and clears when an item with children is clicked, allowing users to seamlessly navigate through nested context hierarchies and continue to search without having to manually refocus or clear previous search terms.

Screen recordings

Before fix:

Screen.Recording.2025-07-25.at.3.25.40.PM.mov

After fix:

Screen.Recording.2025-07-25.at.3.26.29.PM.mov

Tests

  • I have tested this change on VSCode
  • I have tested this change on JetBrains
  • I have added/updated the documentation (if applicable)

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@avi-alpert avi-alpert marked this pull request as ready for review July 25, 2025 19:27
@avi-alpert avi-alpert requested a review from a team as a code owner July 25, 2025 19:27
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