React · Easy · Ui Filtering
You maintain the Projects page of an internal team workspace. Teammates use its search field to find an active project before opening it; archived projects must not appear among the choices. The supplied page already displays the projects, but entering a different letter case hides valid matches and archived projects are still listed. All project data is already in memory: this change is about the search interaction, not an API or a new page layout.
Task
Repair the Projects search so typing " API " shows Alpha API but not archived Old API, clearing the field restores every active project in ID order, and a search with no matches displays No projects.
Contract
- Starting data:
initialRowsis the supplied project list. Do not mutate it.ididentifies a project;titleis its visible name;archivedhides it from the active list.seatsis the available seat count;versionidentifies the last server version of that project. - User action: The user types into the existing Search projects control. Use the supplied initial list; this task does not require an API request.
Acceptance criteria
- Show non-archived projects whose title contains the trimmed search text, ignoring letter case.
- An empty or whitespace-only query shows every active project.
- Order the visible projects by ASCII ID.
- Show
No projectswhen nothing matches. - Editing the query updates the list without replacing the whole screen or losing the input state.
- Keep the existing control labels and stable row identity.
Constraints
- At most 200 rows; IDs are unique ASCII strings and seats are non-negative integers. Input props must not be mutated.
- Keep the Search projects label, data-id row identity and accessible status messages.
- Filter the supplied initialRows; no API integration is required for this task.
- No outbound network, paid API or browser permission is needed. New files are not submitted by the embedded widget.
Editable files
src/ProjectApp.jsx— Repair the component state, lifecycle and API coordination.src/ProjectRows.jsx— Provided row rendering; preserve identity, accessibility and button semantics.src/helpers.js— Optional pure helpers; not a replacement for framework lifecycle handling.tests/candidate.test.js— Add DOM-level regression tests using fixture(t), deferred() and assert.