fix(feedback): Update the feedback list when an item becomes read/unread#91596
Closed
ryan953 wants to merge 1 commit into
Closed
fix(feedback): Update the feedback list when an item becomes read/unread#91596ryan953 wants to merge 1 commit into
ryan953 wants to merge 1 commit into
Conversation
ryan953
commented
May 13, 2025
| markAsRead(true); | ||
| } | ||
| }, [issueResult.isFetched]); // eslint-disable-line react-hooks/exhaustive-deps | ||
| }, [issueData, issueResult.isFetched, markAsRead]); |
Member
Author
There was a problem hiding this comment.
This seemed wrong before. Because we were just looking at isFetched i think if you toggled back and forth between two unread feedbacks (so both are in cache), then we wouldn't re-run the useEffect when the visible feedback changed. We want to re-run it in case something else has flipped the hasSeen bit and we want to reset it.
Member
|
closing in favor of #91601 |
ryan953
added a commit
that referenced
this pull request
May 14, 2025
…, not create them (#91601) What was previously happening since #86421 is that we would silently change the queryKey that was passed into `useInfiniteApiQuery` to have `'infinite'` suffixed to the end. This was leaky if any code wanted to interact with the query cache it had to add the same suffix. Well, now the suffix is a prefix, and is required when you call `useInfiniteApiQuery()`. This will ensure that all queryKeys for useInfiniteApiQuery are unique (as we did before) but also will make sure that the same queryKey will work for fetching the data and interacting with the cache. Replaces #91596 Followup to #86421
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The problem seems to be that, because we're calling
useInfiniteQuerythe extra'infinite'string is added to the query key, so we need that in there when we look things up again to mutate the cache.followup to #86421