1## Summary
2Changing category on page 5 leaves the product list empty.
3Matching products exist, but the current page stays at 5.
4
5## Reported behavior
6The reporter browsed several pages before choosing Books.
7The list switched to the empty state after the filter changed.
8Refreshing the page did not make the expected products appear.
9Choosing page 1 manually restored the matching results.
10
11## Reproduction
121. Open the product list with no category selected.
132. Navigate to page 5.
143. Change the category to Books.
154. Observe the empty list.
165. Return to page 1 without changing the category.
176. Observe that matching books are present.
18
19## Expected behavior
20Changing the category resets pagination to page 1.
21The next request includes the new category and page 1.
22The list shows the matching products returned by that request.
23
24## Current request sequence
25GET /products?page=5
26User selects category=books
27GET /products?category=books&page=5
28Response contains no items for that page.
29The interface displays the empty-results message.
30
31## Request sequence after the fix
32GET /products?page=5
33User selects category=books
34Pagination changes to page=1.
35GET /products?category=books&page=1
36Matching products appear in the list.
37
38## Notes from triage
39The category filter itself is being applied.
40This report concerns the retained pagination value.
41Returning to page 1 is enough to recover the results.
42Do not change the empty-state copy to hide the problem.
43The issue is about what happens when the filter changes.
44
45## Reproduction matrix
46Books: change category while on page 2.
47Expected: reset to page 1 and show matching results.
48Check the request parameters and the selected page.
49Books: change category while on page 3.
50Expected: reset to page 1 and show matching results.
51Check the request parameters and the selected page.
52Books: change category while on page 5.
53Expected: reset to page 1 and show matching results.
54Check the request parameters and the selected page.
55Books: change category while on page 8.
56Expected: reset to page 1 and show matching results.
57Check the request parameters and the selected page.
58Clothing: change category while on page 2.
59Expected: reset to page 1 and show matching results.
60Check the request parameters and the selected page.
61Clothing: change category while on page 3.
62Expected: reset to page 1 and show matching results.
63Check the request parameters and the selected page.
64Clothing: change category while on page 5.
65Expected: reset to page 1 and show matching results.
66Check the request parameters and the selected page.
67Clothing: change category while on page 8.
68Expected: reset to page 1 and show matching results.
69Check the request parameters and the selected page.
70Home: change category while on page 2.
71Expected: reset to page 1 and show matching results.
72Check the request parameters and the selected page.
73Home: change category while on page 3.
74Expected: reset to page 1 and show matching results.
75Check the request parameters and the selected page.
76Home: change category while on page 5.
77Expected: reset to page 1 and show matching results.
78Check the request parameters and the selected page.
79Home: change category while on page 8.
80Expected: reset to page 1 and show matching results.
81Check the request parameters and the selected page.
82Electronics: change category while on page 2.
83Expected: reset to page 1 and show matching results.
84Check the request parameters and the selected page.
85Electronics: change category while on page 3.
86Expected: reset to page 1 and show matching results.
87Check the request parameters and the selected page.
88Electronics: change category while on page 5.
89Expected: reset to page 1 and show matching results.
90Check the request parameters and the selected page.
91Electronics: change category while on page 8.
92Expected: reset to page 1 and show matching results.
93Check the request parameters and the selected page.
94
95## Acceptance checks
96[ ] Changing a category resets the selected page to 1.
97[ ] The product request uses the newly selected category.
98[ ] The product request uses page=1.
99[ ] Matching products appear when the response contains items.
100[ ] An empty response still uses the existing empty state.
101[ ] Moving between pages without changing category still works.
102[ ] Clearing the category filter also returns to page 1.
103
104## Review questions
105Where are category and page state updated today?
106Can the two values be updated before the next request?
107Which existing pagination tests should cover this regression?
108
109## The change in one sentence
110When the category changes, reset to page 1 and show the results.