implementation
Implement in your agent
# Implement Listbox in your agent ## Objective Implement Listbox for this verified behavior: A composite widget of named options that supports one or multiple selections and can be standalone or used as a combobox popup. ## Prerequisites - Inspect the repository, design system, and existing tests first. - Preserve unrelated changes and keep the file scope bounded. - Confirm that Listbox matches the need before writing code. ## Required behavior - Arrow keys navigate according to the declared control model; focus and selection states are exposed consistently, including when selection follows focus. - The control exposes whether one or multiple values can be selected and updates every selected state consistently. ## States to cover - Default preset selected — Default preset selected - Last 30 days selected — Last 30 days selected ## Accessibility - The primary control or named region for Listbox has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names. - The native sized select is one tab stop. In this single-select specimen, selection follows keyboard focus, so active and selected state move together; custom listboxes must declare their own model. - In this standalone specimen, leaving with Tab preserves the selected value; when a listbox is a popup, dismissal is coordinated by its owning control. - Tab enters the composite control once - In this native single-select specimen, arrow navigation updates selection as focus moves - There is no separate commit command in this specimen - Platform-supported Home and End keys reach boundaries ## Non-goals - Screen space is scarce and a native Select is sufficient - Items are commands instead of values ## Acceptance criteria - Options belong to one named list, whether standalone or used as a popup - The relationship between focus and selection is declared, including whether selection follows focus - Arrow, Home, and End behavior is consistent - The selection mode is explicit
sha256:da68ecf5d2b3d50d4b455f959ba243def273c32d5ce3aebae47c63486e3449ad