fix: query invalidation for daily progress#831
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves data freshness issues within the application, particularly affecting daily progress views. The solution involves a comprehensive refactoring of query keys to eliminate overlaps and enhance precision. Additionally, the approach to data invalidation has been revised to use a broader, more reliable strategy, moving away from date-specific invalidations that were prone to errors due to varying date formats. This ensures that user interfaces consistently display up-to-date information after data modifications. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses issues with query invalidation by refactoring query keys and broadening invalidation scopes. The changes are logical and aim to improve data consistency. I've identified a potential bug where a query key is missing a dependency, which could lead to stale data, and also a minor code duplication in one of the hooks. Overall, a good set of changes to improve the robustness of data fetching.
Description
There were some problems of data not refreshing after update. I found some issues with overlapping query keys and fixed all that I could find. Some keys and methods were not needed anymore and could be removed. I removed the invalidation based on the date since date formats are not equal in the whole app and instead invalidated all.
Related Issue
PR type [ ] Issue [ ] New Feature [ ] Documentation
Linked Issue: #
Checklist
Please check all that apply:
pnpm run validate(especially for Frontend).en) translation file (if applicable).rls_policies.sqlfor any new user-specific tables.