-
Notifications
You must be signed in to change notification settings - Fork 147
fix(inspector): prevent error flickering #3978
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
Conversation
|
🚅 Deployed to the rivet-pr-3978 environment in rivet-frontend
|
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. |
More templates
@rivetkit/cloudflare-workers
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/virtual-websocket
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
PR Review: fix(inspector): prevent error flickeringSummaryThis PR addresses error flickering in the inspector by improving query caching, enhancing error handling with better TypeScript types, and refining the UI layout for the sidebar. The changes focus on preventing redundant query invalidations and providing more robust error pattern matching. Code Quality & Best Practices✅ Strengths
Critical Issues1. Query Cache Memory Leak (global.ts:14-52) The implementation of Recommended Fix: 2. Unclear Intent & Documentation The query caching logic lacks documentation explaining what "error flickering" means specifically and why this approach was chosen. Adding comments would help future maintainers understand the intent. Minor Issues3. Type Definition Could Be Stricter (actor-status-label.tsx:162-168) 4. Pattern Matching Complexity (actor-status-label.tsx:99-106) 5. Icon Spacing (layout.tsx:283-288) Performance ConsiderationsEvery successful status check invalidates ALL queries with errors. In a large app with many failed queries, this could cause performance issues. Consider limiting invalidation to related queries or adding throttling. Test CoverageRecommendationsBefore Merge:
ConclusionThe PR addresses a real UX issue and makes meaningful improvements to error handling and UI layout. However, the query caching implementation has a critical memory leak that must be fixed before merge. Overall Assessment: Review generated by Claude Code |
Graphite Automations"Test" took an action on this PR • (01/19/26)1 assignee was added to this PR based on Kacper Wojciechowski's automation. |
e01279b to
c997179
Compare
Merge activity
|
Closes FRONT-915 ### TL;DR Improved UI components and error handling for the Rivet application, with focus on sidebar layout, actor error handling, and query caching. ### What changed? - **Sidebar Layout**: Restructured the sidebar navigation with proper sizing and layout for buttons, wrapped links in a flex container, and added proper icon placement - **Actor Error Handling**: Enhanced error handling in `ActorStatusLabel` and `RunnerPoolError` components with better type definitions and pattern matching - **Create Actor Dialog**: Fixed datacenter parameter to use `undefined` instead of empty string for inspector app type - **Query Caching**: Implemented a `previousQueryCache` to prevent redundant query invalidation and improve performance - **Loading Component**: Replaced `PendingRouteLayout` with `FullscreenLoading` for namespace routes ### How to test? 1. Verify the sidebar layout and buttons display correctly with proper sizing 2. Test actor error handling by triggering various error conditions 3. Create an actor in inspector mode and verify datacenter parameter is handled correctly 4. Navigate between pages to ensure query caching works properly without redundant invalidations 5. Check that namespace routes show the correct loading component ### Why make this change? These changes improve the user experience by: - Creating a more consistent and visually appealing sidebar layout - Providing better error handling and more descriptive error messages for actor operations - Optimizing query performance by preventing unnecessary invalidations - Using appropriate loading components for a smoother user experience during navigation The code structure is now more maintainable with better type definitions and pattern matching for error handling.

Closes FRONT-915
TL;DR
Improved UI components and error handling for the Rivet application, with focus on sidebar layout, actor error handling, and query caching.
What changed?
ActorStatusLabelandRunnerPoolErrorcomponents with better type definitions and pattern matchingundefinedinstead of empty string for inspector app typepreviousQueryCacheto prevent redundant query invalidation and improve performancePendingRouteLayoutwithFullscreenLoadingfor namespace routesHow to test?
Why make this change?
These changes improve the user experience by:
The code structure is now more maintainable with better type definitions and pattern matching for error handling.