1
0
Fork 0
polaris-task-force/tests/e2e
Z8MB1E 5e1f200261 feat(wiki): replace textarea overlay with a CodeMirror markdown editor
The body editor painted highlighted markdown in a div behind a transparent-text
textarea, so the painted text and the caret were two different layout engines.
Any wrap-point difference (borders, scrollbar gutters, engine rounding, trailing
newlines) shifted the overlay by whole lines once content soft-wrapped, making
clicks land on the wrong glyph and the document end feel unreachable. The CSS
patch that preceded this reduced the drift but could not remove the class of bug.

CodeMirror 6 owns text and caret together, so the failure mode is gone by
construction rather than by maintenance. The body remains a markdown string, so
prepareMarkdown, ::: directives, wikilinks, templates, revisions and the preview
pipeline are untouched, with no data migration.

- WikiMarkdownEditor: EditorView lifecycle, theme and markdown HighlightStyle
  bound to the app's CSS tokens, history, line wrapping, IME-safe keymap.
- markdownCommands: one pure command table shared by toolbar buttons and keys.
- editorChange: toolbar updates dispatch only the differing span, keeping undo
  granular and selections outside the edit intact.
- Removes WikiEditorHighlightLayer, editorMetrics, lib/wiki/editorHighlight,
  useEditorHistory and the now-dead textarea selection reader.
- Adds e2e proof: glyph-precise clicks across wrapped paragraphs, list items,
  image markdown and scrolled documents land at the exact clicked offset.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-11-18 15:12:22 -05:00
..
analytics.e2e.spec.ts test(analytics): add collector, rollup, retention integration suite and e2e smoke 2026-10-14 12:13:01 -04:00
banner_check.spec.mjs test(e2e): seed e2e user, serialize workers, and deflake specs 2026-09-30 18:43:29 -04:00
bomperator-mobile.e2e.spec.ts feat(minigames): touch controls and responsive board for Bomperator 2026-10-19 10:11:30 -04:00
frontend-tech-tree.e2e.spec.ts feat(tech): member-facing tech research system and tech tree 2026-10-19 17:28:26 -04:00
frontend.e2e.spec.ts test(e2e): seed e2e user, serialize workers, and deflake specs 2026-09-30 18:43:29 -04:00
garage.e2e.spec.ts test(garage): cover placement validation, access gating, and bridge sync 2026-10-13 16:02:58 -04:00
global-setup.ts test(test-db): template database + schema-hash cache + clone primitives 2026-10-21 10:03:33 -04:00
interior.e2e.spec.ts test(interior): harden cleanup afterAll, raise decay timeouts, and fix seed typing 2026-10-20 19:50:19 -04:00
map-objectives.e2e.spec.ts fix(map-objectives): read Playwright request failure via errorText 2026-10-27 02:13:44 -04:00
minigame-dev-console.e2e.spec.ts feat(minigames): superuser developer console dock across all ten games 2026-10-20 12:48:27 -04:00
minigame-leaderboards.e2e.spec.ts feat(minigames): make period standings the primary board on game pages 2026-10-19 12:14:57 -04:00
minigame-upcoming.e2e.spec.ts feat(minigames): show upcoming games as disabled with a release countdown 2026-10-11 18:47:43 -04:00
mission-planning-map.e2e.spec.ts feat(missions): add a per-mission planning map with Arma markers 2026-10-04 02:53:21 -04:00
operations-reservations.e2e.spec.ts test(e2e): seed e2e user, serialize workers, and deflake specs 2026-09-30 18:43:29 -04:00
operations.e2e.spec.ts test(e2e): seed e2e user, serialize workers, and deflake specs 2026-09-30 18:43:29 -04:00
opord-recall.e2e.spec.ts test(e2e): seed e2e user, serialize workers, and deflake specs 2026-09-30 18:43:29 -04:00
supply-boxes.e2e.spec.ts test(e2e): seed e2e user, serialize workers, and deflake specs 2026-09-30 18:43:29 -04:00
tech-tree.e2e.spec.ts feat(tech-tree): optimistic concurrency for the tree editor 2026-10-15 11:48:30 -04:00
tours.e2e.spec.ts feat(tours): add permission-aware guided tours with replay and device opt-out 2026-09-30 18:43:21 -04:00
wiki-editor.e2e.spec.ts feat(wiki): replace textarea overlay with a CodeMirror markdown editor 2026-11-18 15:12:22 -05:00