left4me/l4d2web/scripts/editor-src
mwiegand 19bc0afaa9
test(editor-v2): Playwright e2e + Tab→acceptCompletion fix
Two e2e tests:
- test_blueprint_autocomplete_accept_writes_into_hidden_textarea:
  loads /blueprints/1, types 'sv_che', asserts the cm6 autocomplete
  popup shows 'sv_cheats', presses Tab to accept, fires a synthetic
  submit on the form, and reads the hidden textarea value back.
  Exercises both the autocomplete extension and the submit-time copy
  bridge in editor.js end-to-end.
- test_copy_preserves_newlines_across_lines: regression gate for
  bug class 1 from v1 (Prism+contenteditable collapsed multi-line
  selections). cm6 preserves linebreaks in its doc by construction;
  we verify via the per-textarea controller's getValue().

editor-entry.js: discovered during the e2e debug that cm6's default
completionKeymap does NOT bind Tab. Added an explicit
`{ key: "Tab", run: acceptCompletion }` ahead of the rest of the
keymap stack so Tab accepts when the popup is open and falls through
to indentWithTab otherwise. Bundle rebuilt + SHA refreshed.

Tests also surfaced a 200ms popup-settle timing race: the popup is
*visible* on the same tick acceptCompletion runs against null
selectedCompletion. A page.wait_for_timeout(200) before pressing
the accept key bridges the gap reliably in CI.

Chromium runs fine in Claude Code's default sandbox — the stale note
in the handoff doc about Mach-port IPC sandbox-blocking is no longer
accurate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 02:15:51 +02:00
..
.gitignore scaffold(editor-v2): pin cm6 deps + editor-src skeleton 2026-05-17 01:54:06 +02:00
autocomplete.js feat(editor-v2): autocomplete completion source 2026-05-17 01:56:45 +02:00
editor-entry.js test(editor-v2): Playwright e2e + Tab→acceptCompletion fix 2026-05-17 02:15:51 +02:00
package-lock.json scaffold(editor-v2): pin cm6 deps + editor-src skeleton 2026-05-17 01:54:06 +02:00
package.json scaffold(editor-v2): pin cm6 deps + editor-src skeleton 2026-05-17 01:54:06 +02:00
srccfg-mode.js feat(editor-v2): srccfg StreamLanguage mode 2026-05-17 01:55:59 +02:00
themes.js feat(editor-v2): light + dark themes + syntax highlight style 2026-05-17 01:56:26 +02:00