-
Notifications
You must be signed in to change notification settings - Fork 148
feat(dashboard): improve data providers stability #4041
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
base: main
Are you sure you want to change the base?
Conversation
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Pull Request ReviewThis PR implements a context caching system to maintain stable references across navigation in the frontend. Code Quality - Strengths
Issues & Recommendations1. Debug Console.log (CRITICAL) 2. Cache Key Generation Issue 3. Cache Invalidation Missing 4. Potential Stale Data 5. Redirect Loop Risk PerformancePositive: Prevents context recreation, reduces API calls SecurityTokens stored in caches with no cleanup. Clear caches on logout to prevent token leakage. Test CoverageMissing tests for cache behavior, key generation, inheritance, invalidation, and redirect loops. Action ItemsMust Fix:
Should Fix:
Nice to Have:
Overall AssessmentSolid performance improvement with clean TypeScript implementation. Address critical and important issues before merging. |
Graphite Automations"Test" took an action on this PR • (01/26/26)1 assignee was added to this PR based on Kacper Wojciechowski's automation. |

TL;DR
Implemented a context caching system to maintain stable references across navigation in the frontend.
What changed?
cache.tsfile with factory functions to create and cache data provider contextsCancelledErrorfrom react-queryHow to test?
Why make this change?
This change improves application performance and user experience by preventing unnecessary recreation of data provider contexts during navigation. By maintaining stable references to these contexts, we avoid redundant API calls and state resets when users navigate between routes. The caching system also ensures proper inheritance of context properties, making the code more maintainable and reducing potential bugs related to missing context data.