Skip to content

Preserve device and SoC filter analytics names during async option loading #470

Description

@coderabbitai

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions