console
console copied to clipboard
fix: use JSON serialization for array fields in spreadsheet editor
Summary
- Replace comma-based join/split with JSON serialization for array fields
- Prevents corruption of array items containing commas (JSON, CSV, plain text)
- Update placeholder text to reflect JSON array format
Root Cause
The spreadsheet editor used comma-based serialization (value.map(String).join(', ') and stringValue.split(',')) which corrupted any array items containing commas. Simply opening a cell for editing would corrupt in-memory data through two-way binding.
See detailed analysis in #2740.
⚠️ Warning
This is an experimental fix that changes console UX for array-based types.
Users will now need to enter array values in JSON format (e.g., ["item1", "item2"]) instead of comma-separated values. This needs careful review to ensure it doesn't negatively impact the user experience for simpler use cases.
Closes #2740
Summary by CodeRabbit
-
Improvements
- Array input fields now use JSON array format for better data handling and display
- Updated placeholder guidance for integer, double, boolean, and string array inputs with clear examples of proper JSON formatting syntax
- Enhanced user experience with clearer input format expectations for array-type fields
✏️ Tip: You can customize this high-level summary in your review settings.