implementation
Implement in your agent
# Implement Search field in your agent ## Objective Implement Search field for this verified behavior: A text input inside a named search form that submits a query to find matching content. ## Prerequisites - Inspect the repository, design system, and existing tests first. - Preserve unrelated changes and keep the file scope bounded. - Confirm that Search field matches the need before writing code. ## Required behavior - Enter submits the current query through a named search form without changing the field pattern. - The clear control empties the query, keeps focus in the field, and updates results predictably. - A specific inline message identifies the invalid field and explains how to correct it. ## States to cover - Search idle with an empty query — Search idle with an empty query - Search query ready to submit — Search query ready to submit - Search loading — Search loading - Search results visible — Search results visible - No search results — No search results - Search error — Search error - Search result opened — Search result opened ## Accessibility - The primary control or named region for Search field has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names. - Submitting leaves focus in the search form while results update below; clearing returns focus to the query field. - Not applicable: results update inline; Clear removes the query, submitted results, opened-result status, and errors. - Tab focuses the query field - Enter submits the search - Tab reaches the explicit clear and submit controls ## Non-goals - The text is a general form property - Selectable suggestions are required but Combobox behavior is not implemented ## Acceptance criteria - The field lives in a named search form - Enter and the visible submit action run the same query - Clear keeps focus and updates results predictably - Loading, no-result, error, and empty-query states are explicit
sha256:a06fb9e7ac970cc35ebf7c73407ee6a460b1d2eec156a6bfe8da6eac868e87bd