Commit Graph

5 Commits

Author SHA1 Message Date
b31a4abc59 refactor: simplify settings UI, remove CORS toggles, show encryption status
- Remove authentication toggle (auth now always enabled)
- Add description explaining mandatory authentication
- Show encryption status indicator (available/unavailable)
- Always display API key section (no conditional)
- Always include Authorization header in MCP client config
- Add import for isEncryptionAvailable
- Fix variable name collision (apiKeyButtonContainer)
- Add manual testing checklist documentation

Implements Task 5, Steps 2-7 from docs/plans/2025-10-25-simplify-cors-mandatory-auth.md
2025-10-25 22:14:29 -04:00
e3ab2f18f5 docs: add implementation plans for coverage work 2025-10-25 22:14:29 -04:00
3360790149 refactor: update VaultTools to pass adapters to utils
Updated VaultTools to use adapters for all utility method calls:
- SearchUtils.searchWaypoints() now receives vault adapter
- WaypointUtils.isFolderNote() now receives vault adapter
- LinkUtils.validateWikilinks() now receives vault and metadata adapters
- LinkUtils.resolveLink() now receives vault and metadata adapters
- LinkUtils.getBacklinks() now receives vault and metadata adapters

Removed App dependency from VaultTools constructor - now only requires
vault and metadata adapters. Updated factory and all test files accordingly.

All tests passing (336/336).
2025-10-25 22:14:29 -04:00
886730bf95 refactor: migrate VaultTools link methods to use adapters
Update validateWikilinks, resolveWikilink, and getBacklinks methods
to use IVaultAdapter and IMetadataCacheAdapter instead of direct App access.

- Implemented inline link suggestion finding using vault adapter
- Implemented backlinks retrieval using metadata cache adapter
- Added helper methods: findLinkSuggestions, extractSnippet, escapeRegex
- App parameter still required for waypoint methods (not in scope for this task)
2025-10-19 23:45:13 -04:00
b89d0912c2 docs: design document for 100% test coverage via dependency injection
Add comprehensive design for achieving 100% test coverage through
dependency injection refactoring. The design introduces adapter
interfaces to decouple tool classes from Obsidian API dependencies,
enabling cleaner, more maintainable tests.

Key elements:
- IVaultAdapter, IMetadataCacheAdapter, IFileManagerAdapter interfaces
- Factory pattern for production usage
- Phased implementation approach (adapters → VaultTools → NoteTools → integration)
- Mock adapter pattern for simplified test setup
- Coverage strategy organized by feature areas

Goal: Codebase confidence for future refactoring and feature work.
2025-10-19 22:54:08 -04:00