Repository navigation
build(deps): update the app's npm packages; remake the @codemirror/view patch for 6.43.15 - #139
Merged
Merged
Conversation
…ew patch for 6.43.15 @codemirror/view 6.43.15 still walks the whole height map on every measure, so the patch of ADR-0025 is remade for it, unchanged but for its offsets. Dependabot could not move the package: pnpm stops with ERR_PNPM_UNUSED_PATCH while patchedDependencies names 6.43.13. A new test, src/editor/heightmap-patch.test.ts, fails when the installed package lacks the patch. The other 23 updates are Dependabot's app-npm group (#135), deduplicated so @lezer/common has 1 version; 2 copies of it failed the typecheck. @types/node stays on 24 (24.19.2), the Node major the app runs on, and Dependabot now skips its majors. happy-dom 21 fires selectionchange at once, inside the call that moves the selection, and again for a new range at the same points. Fired at once it reaches CodeMirror inside an update, which CodeMirror refuses (5 editor tests failed). The test setup queues the event, as a browser does, and fires it only when the selection moved. Biome 2.6 removes 2 unused imports and asks for an optional chain. packaging/flatpak/node-sources.json is regenerated (make flatpak-sources).
…s guard happy-dom's dispatch calls dispatchEvent again on each target of the event's path. The guard in src/testing/setup.ts wrapped document.dispatchEvent, so that second call queued the event again and no listener ever got a selectionchange: the editor tests passed without the editor reading a single selection change. The event being delivered now passes straight through. src/testing/setup.test.ts checks the guard: the event comes after the call that moved the selection, not inside it; once for a new range at the same points; for a move, a reversed selection and a cleared one; and other events are dispatched at once.
Contributor
Author
|
Cross-review: Ready after 1 re-review, blocking: none.
|
bketelsen
approved these changes
Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dependabot's npm update fails on
mainwithERR_PNPM_UNUSED_PATCH: it moves@codemirror/viewto 6.43.15, andapp/pnpm-workspace.yamlstill names the patch for 6.43.13. This PR moves the package itself, with the patch remade, and takes the rest of Dependabot's app-npm group (#135, which it replaces).@codemirror/view6.43.15 (the latest) still walks every node of the height map on every measure (HeightMapBranch.updateHeight), the cost ADR-0025 patches.app/patches/@[email protected]is the same change as the 6.43.13 patch: a branch visits a child that is not measured only when it is forced or outdated. Only the line offsets differ.app/src/editor/heightmap-patch.test.tsreads the installeddist/index.jsanddist/index.cjsand fails when either lacks the patch. Before, nothing but pnpm's own check held it, and that check passes when the patch is dropped.@lezer/common1.5.3 and 1.5.5 side by side, and the typecheck failed on the 2 types.@types/nodestays on Node 24 (24.19.2, not 26): the app and CI run Node 24 (NODE_VERSIONinci.yml)..github/dependabot.ymlnow ignores its majors.selectionchangeat once, inside the call that moves the selection, and again for a new range at the same points. Fired at once, it reaches CodeMirror inside an update, which CodeMirror refuses ("Calls to EditorView.update are not allowed while an update is in progress"); 5 editor tests inMainWindow.test.tsxandediting.test.tsxfailed.app/src/testing/setup.tsqueues the event, as a browser does (Selection API), and fires it only when the selection moved. Queuing alone loops: the editor sets the same selection again, and happy-dom fires again. happy-dom's dispatch callsdispatchEventagain on each target of the event's path, so the event being delivered passes straight through.app/src/testing/setup.test.tstests the guard: the event comes after the call, not inside it; once for a new range at the same points; for a move, a reversed selection and a cleared one; other events at once.app/src/spike/drive.tsx).packaging/flatpak/node-sources.jsonis regenerated.Replaces #135.
Risk tier
Risk tier: 2 — a runtime dependency update of the app (React, CodeMirror, KaTeX, DOMPurify, Tauri's API) and a test-setup change. No path in
.github/risk-paths.jsonchanges.Verification
make verifygreen (host)make ui-checkgreen (nsl): 104 files, 846 testsmake app-build,make app-test(40 tests) andmake web-buildgreen (nsl)make flatpak-sourcesrun: onlynode-sources.jsonchangesd3b62dc, with the patch file and itspatchedDependenciesentry removed,corepack pnpm install --no-frozen-lockfile && corepack pnpm exec vitest run src/editor/heightmap-patch.test.tsfails both cases (is applied to dist/index.js,is applied to dist/index.cjs) onexpect(source).toContain("else if (force || left.outdated)").app/src/testing/setup.tsas onmain,vitest runfails 5 tests (saves what is typed in a note's editor,runs Obsidian's keys on the editor,follows with Alt+Enter…,completes a link to a note and its heading,completes a block ID and a tag) with the CodeMirror error above; andvitest run src/testing/setup.test.tsfails 2 tests (fires after the call that moved the selection, not inside it: 1 event inside the call;fires once for a new range at the same points: 2 events). With the guard ofd3b62dc, which swallowed every event, 3 of its tests fail (0 events)..memory/corrections.jsonl: 1 line for the swallowed events (found by the cross-review ofd3b62dc).