By: Michael Lynch <git@mtlynch.io>
Fix remembered section autofill for typed grocery names Ensure the autocomplete component exposes the JSON shape and event timing that the grocery form expects. The main page e2e test was failing for two independent reasons: - Playwright's placeholder locator matched both the custom element host and the inner input because both carried the same placeholder text. - The item autocomplete endpoint encoded ItemSection as Name/Section, while the frontend normalization code expected name/section. This prevented the exact-name lookup from finding the remembered section. Update the custom element to remove the host placeholder after copying it to its inner input, emit a load-complete event, and re-run input handling when items arrive. Update the grocery form to retry exact-name autofill after the name autocomplete finishes loading. Add JSON tags for ItemSection and extend handler coverage to assert the lowercase API contract. Testing: - ./dev-scripts/run-go-tests - nix build .#e2e-tests - nix flake check - ./dev-scripts/git-hooks/pre-commit