Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix command history pagination resets - #53

Merged
nilsavenholt merged 1 commit into
custom/v2.35.3from
fix/command-history-pagination
Sep 11, 2026
Merged

nilsavenholt merged 1 commit into
custom/v2.35.3from
fix/command-history-pagination

Conversation

@nilsavenholt

Copy link
Copy Markdown
Member

Summary

Stabilize pagination on the workspace command activity/history page.

Root cause

Changing page changes the React Query key. While the new page is loading, commandQuery.data was temporarily undefined, so the page derived totalPages = 1. The clamp effect then immediately reset any requested page > 1 back to page 1 before the fetch completed.

Fix

  • keep previous command-history data while a pagination query is loading
  • skip page clamping while React Query is serving placeholder data
  • preserve the existing clamp once a real response confirms that the current page no longer exists
  • add regression tests for placeholder-data navigation and real-page clamping

Validation

  • targeted Vitest: 8/8 passed
  • tsc --noEmit --project tsconfig.json passed
  • git diff --check passed

Closes #52

@nilsavenholt
nilsavenholt merged commit 2f04bf7 into custom/v2.35.3 Sep 11, 2026
2 checks passed
@nilsavenholt
nilsavenholt deleted the fix/command-history-pagination branch September 11, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants