mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 21:09:26 -06:00
This commit fixes several critical issues identified in the type-safe GoldenLayout implementation: 🔒 Version Safety: - Added CURRENT_LAYOUT_VERSION constant to eliminate hardcoded version numbers - Updated all hardcoded '4' references to use the named constant - Only use version number when creating new states or up-converting old states 🚨 Error Handling Consistency: - Fixed deserialiseState() and loadState() to throw instead of returning false - Restored consistent error handling throughout the serialization pipeline - Updated all call sites to handle thrown exceptions properly 📊 Sentry Monitoring: - Added Sentry logging for localStorage corruption in main.ts - Added Sentry logging for URL deserialization failures - Enhanced error context with relevant debugging information 🔍 Improved Validation: - Enhanced validation to provide specific, actionable error messages - Restored detailed error messages in tests instead of generic ones - Added validateItemConfig() function for granular error reporting 🧹 Code Cleanup: - Removed duplicate/unused validation functions that were causing conflicts - Fixed TypeScript compilation errors and warnings - Updated imports to remove unused dependencies All 1838 tests pass with the improved error handling and validation logic. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>