- Add conditional check for isDirty before adding event listeners
- Ensure cleanup always runs to prevent memory leaks
- Address greptile-apps[bot] feedback about breaking intended behavior
- Maintain original logic where listeners are only active when there are unsaved changes
Co-Authored-By: nate@buster.so <nate@buster.so>
- Fix PreventNavigation event listener accumulation by changing useEffect dependency from [isDirty] to [handleClick, handlePopState, handleBeforeUnload]
- Improve RoutePrefetcher cleanup by adding proper load event listener cleanup
- Simplify Chart tooltip cleanup to use direct DOM removal instead of complex cloning
- Enhance canvas cleanup in getTextWidth with try/finally pattern
- Add canvas cleanup in DotPattern useEffect return function
These fixes prevent memory leaks during page navigation loops by ensuring proper cleanup of event listeners, timers, observers, and DOM elements.
Co-Authored-By: nate@buster.so <nate@buster.so>
- Introduced a section on tool calling rules to ensure proper usage of available tools.
- Added clarifications to the TODO list items regarding user requests, emphasizing the need to determine if the user is asking for a single metric, a report, or a dashboard.
These updates improve the clarity and functionality of the analyst agent's prompt, ensuring more accurate task breakdowns.
- Removed unused import for `createMetricsRawLlmMessageEntry` in visualization tools.
- Introduced Zod schemas for `Dashboard` and `DashboardConfig` to enhance type validation and structure.
- Cleaned up the interface definitions for better clarity and maintainability.
These changes improve the robustness of the dashboard configuration and streamline the codebase.