I would bind a saved cursor to the filter and ordering that produced it, then clear it when either changes. A useful UI fixture is: load page one of pending orders, advance, switch to completed orders, and assert that the old pending-order anchor is not reused. It checks the handoff between query state and pagination state, even when the cursor itself is a valid document snapshot.
SMTasker
I would bind a saved cursor to the filter and ordering that produced it, then clear it when either changes. A useful UI fixture is: load page one of pending orders, advance, switch to completed orders, and assert that the old pending-order anchor is not reused. It checks the handoff between query state and pagination state, even when the cursor itself is a valid document snapshot.