Skip to content

refactor(frontend): add explicit facet types for search result signal#389

Open
SaitejaKommi wants to merge 1 commit intoopenfoodfacts:mainfrom
SaitejaKommi:refactor/typed-facets-signal
Open

refactor(frontend): add explicit facet types for search result signal#389
SaitejaKommi wants to merge 1 commit intoopenfoodfacts:mainfrom
SaitejaKommi:refactor/typed-facets-signal

Conversation

@SaitejaKommi
Copy link
Copy Markdown

Summary

This PR introduces shared explicit interfaces for search result facets and charts, replacing weak Object typing in SearchResultDetail.

It aligns facet-related types across shared signal state and facet component implementations, improving maintainability and type safety without changing runtime behavior.


Related Issue

Fixes #388


What Changed

  • Added explicit shared interfaces for search result facets
  • Added shared interfaces for chart-related facet data
  • Replaced weak Object typing in SearchResultDetail
  • Unified facet-related typing across signal state and components
  • Improved static type safety and developer ergonomics

Affected Files

  • signals.ts
  • search-facets.ts
  • search-result-interfaces.ts

Testing

Full local gate executed successfully:

  • Backend unit tests ✅
  • Backend integration tests ✅
  • Frontend build and tests (dev) ✅
  • Frontend build and tests (prod) ✅

Notes

This is a frontend refactor focused on stronger typing and maintainability with no functional behavior changes.

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

Labels

None yet

Projects

Status: Backlog (ready for dev)

Development

Successfully merging this pull request may close these issues.

Replace weak Object typing for search result facets with explicit interfaces

1 participant