ref(conversations): Simplify useConversation to single query#116277
Closed
obostjancic wants to merge 1 commit into
Closed
ref(conversations): Simplify useConversation to single query#116277obostjancic wants to merge 1 commit into
obostjancic wants to merge 1 commit into
Conversation
Contributor
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.58% |
Replace useInfiniteQuery with useQuery now that the backend returns
all spans in a single {data: [...]} response without pagination.
- Remove page accumulation, fetchNextPage, MAX_PAGES logic
- Remove useEffect for auto-fetching next pages
- Read spans from data.data instead of pages.flatMap
- Update mock responses in tests to match new envelope format
Co-Authored-By: Claude Sonnet 4 <noreply@example.com>
82d2303 to
3626e45
Compare
Member
Author
|
No longer needed — keeping pagination since conversations can exceed 1000 spans. The backend PR (#116087) now uses a probe-first approach to cleanly separate widening from pagination. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace
useInfiniteQuerywithuseQuerynow that the backend returns all spans in a single{"data": [...]}response without pagination.Removes page accumulation,
fetchNextPage,MAX_PAGES, and theuseEffectthat auto-fetched subsequent pages. The hook now reads spans fromdata.datainstead of flattening across pages.Depends on #116087 (backend lands first).
Refs TET-2388