Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pending noncustodial zap on comment prevents its display in comment thread #1695

Closed
huumn opened this issue Dec 9, 2024 · 2 comments
Closed

Comments

@huumn
Copy link
Member

huumn commented Dec 9, 2024

I've witness this a few times and is likely some weirdness with the cache.

  1. receive reply in notifications
  2. zap reply
  3. click on reply to navigate to it
  4. page scrolls to where the comment should be, but comment is not present in thread
  5. eventually the comment appears (likely when the zap succeeds)
@huumn
Copy link
Member Author

huumn commented Dec 26, 2024

A few things:

  1. This doesn't happen after a hard, cache-clearing reset. It only happens when the thread, pre-comment, is in the cache.
    • this would mean the zap is somehow preventing the SSR data from being loaded ... or it's being serialized with the zap
    • ... it looks like the active mutation is preventing writeQuery in pages/_app.js from updating the cache such that the useQuery in items/[id]/index.js is using stale data until the mutation returns.
  2. The comment appears (5) not when the zap succeeds but when the invoice for the zap is returned

@huumn
Copy link
Member Author

huumn commented Dec 26, 2024

This underlying problem appears to be the zap's optimistic mutation blocking the conflicting data we're writing in writeQuery. Ideally, the writeQuery would merge with the optimistic cache and everything would work.

confirmed - removing the optimistic response prevents the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant