You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(FR-1683): migrate URL state management from use-query-params to nuqs for better React Transition support (#4646)
Resolves#4645 ([FR-1683](https://lablup.atlassian.net/browse/FR-1683))
## Background
Currently, the React application uses `use-query-params` for URL state management. However, this library has limitations when working with React's newer concurrent features, particularly React Transitions. As a result, users may experience delayed feedback when interacting with URL-driven state changes.
## Purpose
Modernize URL state management by adopting `nuqs`, which is specifically designed to handle React Transitions effectively. This will provide:
* **Faster user feedback**: Immediate visual responses during state transitions
* **Better React Transition support**: Seamless integration with React's concurrent rendering
* **Improved user experience**: More responsive UI with optimistic updates and proper loading states
## Key Changes
* Migrated from `use-query-params` to `nuqs` across all React components
* Replaced `QueryParamProvider` with `NuqsAdapter` in providers
* Updated pagination hooks to use `nuqs` API (`useQueryStates`, `parseAsInteger`)
* Created new helper utilities for GraphQL Result type handling
* Maintained type safety with proper TypeScript types and zod schemas
* Added legacy hooks for backward compatibility during migration
## Expected Outcomes
* Users see immediate visual feedback when changing filters, tabs, or pagination
* Smoother transitions between different views and states
* URL state changes feel more responsive and aligned with modern web application standards
* Better integration with React's concurrent features for future optimizations
**Checklist:**
- [ ] Documentation
- [ ] Minimum required manager version
- [ ] Specific setting for review
- [ ] Minimum requirements to check during review
- [x] Test case(s) to demonstrate the difference of before/after
- Test URL state changes in session list page (filters, pagination, tabs)
- Verify React Transitions feel more responsive
- Check browser history navigation works correctly
[FR-1683]: https://lablup.atlassian.net/browse/FR-1683?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
0 commit comments