Skip to content

Tech Story: UEX catalog picker + inventory add plumbing #56

@GitAddRemote

Description

@GitAddRemote

Goal: Provide reusable catalog search/select plumbing (API + UI component) backed by our synced UEX data so inventory add flows can use it without live UEX calls.

Acceptance Criteria

  • API endpoint (or confirm existing) to query synced UEX items with search, category filter, pagination; returns identifiers/names/category, and any metadata needed for inventory creation.
  • Frontend service helper for catalog search that both personal and org inventory flows can call.
  • Reusable UI selector component to search/paginate the catalog and return the chosen item (no live UEX requests).
  • Handles large result sets efficiently (pagination + debounce), with error states surfaced.
  • Includes basic tests (API/service/component) for search, pagination, and selection wiring.

Technical Elaboration

  • Backend: add or confirm GET /api/uex/items that queries synced tables with ILIKE search on name, category filter, limit/offset (cap to 100), default sort by name asc; return {items, total, limit, offset} with uexId, name, categoryId, categoryName (and any needed metadata for inventory creation). Add indexes as needed (name search, category).
  • Frontend service: add searchCatalog helper (new uex.service.ts or extend inventory service) with params {search?, categoryId?, limit?, offset?} and debounced usage.
  • UI component: build CatalogPicker (modal-friendly) that renders search box, category select, paginated results list; exposes onSelect(item); shows loading/error states; configurable page size. Backed by the service helper and debounce (300–400ms).
  • Hook: optional useCatalogSearch to encapsulate search/filters/pagination state for reuse by personal/org add modals.
  • Testing: backend unit/integration for search/filter/pagination; frontend unit for service (axios mocked) and component behavior (debounce, pagination, selection).

Notes

  • Designed to be shared by issues 54/55 add flows; no live UEX calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend services and logicinventoryInventory system featurestech-storyTechnical implementation story

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions