Files
compiler-explorer/static
Matt GodboltandClaude 2e4f04a389 Address critical version safety and error handling issues
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>
2025-06-19 16:17:29 -05:00
..
2025-06-18 09:04:23 -05:00
2025-06-18 09:04:23 -05:00
2025-06-19 08:46:57 -05:00
2025-06-18 09:04:23 -05:00
2024-10-25 12:19:04 +03:00
2025-04-24 12:10:37 -05:00
2025-04-24 12:10:37 -05:00