Frontend Filter and Request Audit¶
This document captures the baseline matrix used for the fullstack filter rollout.
Coverage Matrix¶
| Page | UI filters/state | API params sent | Gaps/risk |
|---|---|---|---|
frontend/src/pages/Products.jsx |
search, category, sortBy, sortOrder, priceMin, priceMax, minParts |
search, status, page, category, order_by |
priceMin/priceMax/minParts and parts_count sorting were client-only and broke global pagination semantics |
frontend/src/pages/Orders.jsx |
none | none | missing status/payment/date/search filters |
frontend/src/pages/SellerOrders.jsx |
none | none | missing status/payment/date/search filters |
frontend/src/pages/MyProducts.jsx |
only page |
page |
missing search/status/category/parts filters |
frontend/src/pages/SellerReviews.jsx |
product_id, rating, date_from, date_to, search |
all fields, including empty strings | empty filters were not sanitized before request |
frontend/src/pages/AdminOrders.jsx |
statusFilter, paymentStatusFilter |
status, payment_status |
did not read query string (/admin/orders?status= deep-link broken) |
frontend/src/pages/AdminNotifications.jsx |
all-notifications tab: typeFilter, isReadFilter; seller-requests tab: none |
type, is_read; seller requests hardcoded status=pending |
no way to view approved/rejected seller requests |
frontend/src/pages/AdminChat.jsx |
none | none for conversation list, conversation for messages |
missing list filter controls for user lookup, active/unread segmentation |
Backend Filter Capability Baseline¶
| Service | Endpoint | Existing filters | Gaps before rollout |
|---|---|---|---|
product_service |
/api/models/ |
status, category, seller, search, order_by (name, price, views_count, created_at) |
no server-side range filters for price/parts/time/date; no true server-side sort by parts count |
product_service |
/api/models/my_models/ |
none | no server-side filtering for seller inventory management |
admin_service |
/api/admin/products/ |
status, seller, search |
no category/range/date/sorting filters |
order_service |
/api/orders/, /api/orders/seller_orders/ |
none | no filtering by status/payment/date/text for buyer/seller order views |
admin_service |
/api/admin/orders/ |
status, payment_status, user |
no text/date/sorting support for richer admin filtering |
admin_service |
/api/admin/chat/conversations/ |
user, is_active |
no search/unread filter support for admin chat queue |
Contract Fixes Required¶
- Move advanced catalog filters from client-side post-processing to API query params.
- Ensure pages with list filters reset pagination to page 1 on filter changes.
- Align deep-links and route query params with filter state (
AdminAnalytics->AdminOrders). - Sanitize request params by dropping empty fields before hitting APIs.