npm run typecheck
npm test
npm run build
npm auditThe test suite covers normalization and ranking primitives. UI behavior should be verified manually inside a development vault. Context-pack review helpers are covered with unit tests for default selection, selected filtering, summary values, feedback-report privacy, and fast-path regression behavior.
Optional local vault evaluation:
CONTEXT_PRISM_TEST_VAULT=/path/to/test-vault npm test -- tests/vault-evaluation.test.tsOn Windows PowerShell:
$env:CONTEXT_PRISM_TEST_VAULT="$env:USERPROFILE\path\to\test-vault"; npx -p node@22.12.0 node .\node_modules\vitest\vitest.mjs run tests\vault-evaluation.test.ts- Open a development vault with at least 20 Markdown notes.
- Enable the plugin.
- Confirm the one-time "What's new" modal appears when
lastSeenReleaseNotesVersionis unset or older than the current plugin version. - Click
Review current notein the release notes modal and confirm it opensReview AI context pack for current note. - Reopen Obsidian and confirm the release notes modal does not appear again for the same version.
- Run
Show what's new in Context Prismand confirm the release notes modal can be opened manually. - Run
Rebuild link index. - Open a note with known missing related notes.
- Run
Review link suggestions for current note. - Accept one suggestion.
- Confirm the link is inserted under the configured footer heading.
- Confirm existing links are not suggested again.
- Run
Copy AI context pack for current note. - Confirm the copied pack includes paths, snippets, reasons, and token estimates.
- Run
Review AI context pack for current note. - Confirm the modal shows the active note path, ranked candidates, snippets, ranking reasons, full-note token estimates, and context-pack block estimates.
- Confirm candidates included by the fast copy command start selected.
- Toggle individual candidates and confirm the footer updates selected count, selected pack tokens, estimated avoided context, and removed default-pack tokens where applicable.
- Use
Clear alland confirmCopy selected context packis disabled. - Use
Select alland confirm candidates remain in original rank order. - Copy a selected context pack and confirm only selected candidates are included.
- Copy a feedback report with the path opt-in disabled and confirm it does not include snippets, note bodies, or full paths.
- Enable the feedback path opt-in and confirm paths are included but snippets and note bodies are still omitted.
- Confirm Escape closes the modal and checkbox/button keyboard navigation works.
- Resize to a narrow/mobile-sized window and confirm text wraps without overlap.
- Check the modal in light and dark themes.
- Test English, Spanish, Italian, and mixed-language notes.
- Open a note with no candidates and confirm the modal shows an empty state.
- If reproducible, delete or rename a candidate while the modal is open and confirm the snapshot can still be dismissed without errors.
- If reproducible, deny clipboard access and confirm the plugin shows a copy failure notice.
- Set
Index languagestoen, esand rebuild the index. - Confirm English and Spanish notes can appear together when they share useful vocabulary or metadata.