Files
olivv-cs-ComfyUI-FunPack/movie_editor/frontend/package.json
T
digital-garbageandClaude Opus 4.8 4efe3ba851 test: JS test harness for scene→root matching (regression guard)
Extracts the pure global-prompt scene-matching kernel into scene_align.js
(dual browser/CommonJS export) and adds a node test suite so the "stale
scene anchor after reorder/insert/delete" class can't silently regress
again (it has recurred twice).

- scene_align.js: matchParsedToRoots(parsedTexts, rootTexts) — the two-pass
  content-first matcher (exact text + nearest-position tiebreak, then
  leftover roots in order), index-based and dependency-free. Exposed as
  window.SceneAlign in the browser (same pattern as window.PipelineCaps)
  and module.exports under node.
- store.js _alignScenesFromParsed now delegates the matching to the kernel
  and maps indices back to roots — single source of truth, no duplicated
  logic. Behaviour is identical to the previous inline two passes.
- index.html loads scene_align.js before store.js.
- scene_align.test.js: 11 cases via node's built-in runner — reorder,
  edit-in-place, insert-at-front, delete-middle, reorder+edit-one,
  edit+insert+keep, irreducible, duplicate-text tiebreak, empty-text,
  no-roots, used-once. Run with `npm test` (node --test) in this dir.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 20:14:44 +03:00

9 lines
323 B
JSON

{
"name": "funpack-movie-editor-frontend",
"private": true,
"description": "Movie Editor browser frontend. Plain <script>-tag modules (no bundler). Node is used only to unit-test pure logic extracted into *.js with dual browser/CommonJS exports (e.g. scene_align.js).",
"scripts": {
"test": "node --test"
}
}