mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 08:09:24 +00:00
## Summary
- **Root cause**: `keyboard.type()` types code char-by-char into Monaco
editor. When typing `{`, Monaco auto-inserts `}`. With nested blocks (3
levels in JS row-expansion code), this creates 3 extra closing braces →
invalid JS → QuickJS compilation failure.
- **Fix**: Replace `keyboard.type()` with clipboard paste
(`navigator.clipboard.writeText` + `Ctrl+V`) in `enterFunctionCode()`.
Pasting inserts text as a single operation, bypassing Monaco's
auto-close bracket behavior.
- All 6 row-expansion tests pass locally after this fix.
## Test plan
- [x] Run `row-expansion.spec.js` locally — all 6 tests pass
- [ ] CI passes on this PR