fancive_obsidian-parallel-r.../tests
wujunchen 68bfed7f56 perf: eliminate per-card document rescans and redundant hashing
- anchor.ts: precompute line-offset index once; O(log n) binary-search
  offsetToLine replaces two O(n) newline-count loops. findLineForAnchor
  takes an optional lineOffsets param (backward compatible).
- cards.ts / generation.ts: build the line-offset index once per document
  and thread it through all card anchor resolutions (was N cards x ~9
  full-document O(n) passes -> 1 O(n) pass + N x O(log n)).
- anchor.ts: ASCII-whitespace charCode fast path in normalizeWithMap,
  deferring to /\s/ only for non-ASCII (exact semantics preserved).
- settings.ts: memoize generationFingerprint by settings object identity
  (WeakMap) — collapses SHA-1 + stableStringify done on every file-open.
- view.ts: remove keydown listener in onClose (lifecycle leak fix).

Verified: tsc, build, biome, all 28 tests, e2e smoke, branch coverage
100% (new anchor regression tests added). Deferred (higher risk /
test-breaking): view full-render->surgical DOM, scroll rebind guard,
cache scheduleSave timing — see notes/perf-report.md.

Change-Id: I17eef347471bb8233d48164e4453d492f301eac2
2026-05-16 00:33:51 +08:00
..
anchor.test.js perf: eliminate per-card document rescans and redundant hashing 2026-05-16 00:33:51 +08:00
architecture.test.js test: split architecture guard tests 2026-04-29 13:53:19 +08:00
backend-test.test.js fix: pass --verbose with stream-json for Claude CLI 2.1.131+ (#3) 2026-05-14 10:15:50 +08:00
cache.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
cards-nav.test.js refactor: split modules.test.js into 12 per-module test files 2026-04-27 15:21:03 +08:00
catalog.json fix: harden CLI backend smoke checks 2026-05-09 11:49:23 +08:00
cli.test.js style: apply biome formatter to cli.test.js 2026-05-14 10:19:46 +08:00
coverage-sourcemap.js test: add c8 coverage harness with source-map remapping 2026-05-16 00:22:31 +08:00
direct-batch.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-cache.test.js test: cover remaining branch gaps in cache.ts and markdown.ts 2026-05-16 00:24:33 +08:00
direct-generation.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-i18n.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-markdown.test.js test: cover remaining branch gaps in cache.ts and markdown.ts 2026-05-16 00:24:33 +08:00
direct-prompt.test.js fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
direct-providers.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-settings-extra.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-settings.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-streaming.test.js fix Obsidian plugin review scan 2026-05-08 22:57:31 +08:00
direct-test-setup.js test: add c8 coverage harness with source-map remapping 2026-05-16 00:22:31 +08:00
generation-job-manager.test.js fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
i18n.test.js fix: add cancel action to batch prompt 2026-04-29 14:13:47 +08:00
markdown.test.js refactor: split modules.test.js into 12 per-module test files 2026-04-27 15:21:03 +08:00
obsidian-mock.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
plugin-batch.test.js fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
providers.test.js refactor: split main.test.js into focused test files 2026-04-27 19:59:46 +08:00
schema.test.js fix: address 13 review findings (security, UX, i18n) 2026-05-02 12:50:35 +08:00
scroll.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
settings.test.js fix: harden CLI backend smoke checks 2026-05-09 11:49:23 +08:00
streaming.test.js fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
test-exports.test.js perf: eliminate per-card document rescans and redundant hashing 2026-05-16 00:33:51 +08:00
test-setup.js test: add c8 coverage harness with source-map remapping 2026-05-16 00:22:31 +08:00
vault-batch.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
view-render.test.js feat: toggle right sidebar instead of detaching tab + component tests 2026-05-02 15:38:41 +08:00