Summary
Ensure filter analytics sends a name for every selected device and SoC ID when selections are restored from the URL.
Rationale
handleDeviceChange and handleSocChange in src/app/listings/components/ListingsFiltersSidebar.tsx currently derive analytics names from selectedOptions. While getByIds is still loading, selectedOptions can omit IDs restored from the URL. This produces a names array that does not correspond to all entries in values.
Affected area
src/app/listings/components/ListingsFiltersSidebar.tsx
- Device and SoC filter analytics
Required changes
Use an analytics-name source that covers each selected ID, including selections that have not loaded in the current async options page. If a complete name cannot be resolved, define and apply explicit behavior for that ID.
Acceptance criteria
- Device analytics does not silently omit names for URL-restored device IDs while option data is loading.
- SoC analytics does not silently omit names for URL-restored SoC IDs while option data is loading.
- The relationship between selected IDs and analytics names is documented in code or enforced by the implementation.
- Existing analytics behavior remains correct for normally loaded selections.
Backlinks
Summary
Ensure filter analytics sends a name for every selected device and SoC ID when selections are restored from the URL.
Rationale
handleDeviceChangeandhandleSocChangeinsrc/app/listings/components/ListingsFiltersSidebar.tsxcurrently derive analytics names fromselectedOptions. WhilegetByIdsis still loading,selectedOptionscan omit IDs restored from the URL. This produces anamesarray that does not correspond to all entries invalues.Affected area
src/app/listings/components/ListingsFiltersSidebar.tsxRequired changes
Use an analytics-name source that covers each selected ID, including selections that have not loaded in the current async options page. If a complete name cannot be resolved, define and apply explicit behavior for that ID.
Acceptance criteria
Backlinks