-
Notifications
You must be signed in to change notification settings - Fork 3
feat: v0.3.0 — agent integration foundation (schema + exports) #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jnahian
wants to merge
35
commits into
main
Choose a base branch
from
feat/v0.3-agent-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
732a3c7
📝 docs: add CLAUDE.md for web subproject
jnahian b3eebb9
📝 docs: add agent integration design spec
jnahian e35e4a7
📝 docs: add v0.3 implementation plan (schema + exports)
jnahian 1e259ed
✨ feat: add structured schema types to Note interface
jnahian f47f5ac
✨ feat: add applyDefaults helper for legacy notes
jnahian 07fa795
✨ feat(storage): parse structured fields from note markdown
jnahian d04622f
✨ feat(storage): emit structured fields in note markdown
jnahian 589ee3c
✨ feat(noteManager): apply schema defaults on read
jnahian 70ddda7
✨ feat: add INDEX.json and AGENTS.md generators
jnahian 049a125
✨ feat: add debounced atomic ExportWriter
jnahian 7fc6aa4
✨ feat: regenerate exports on note changes
jnahian 5945d23
✨ feat: add manual Regenerate Exports command
jnahian ac0068d
✨ feat: add codeContextNotes.exports.* settings
jnahian e84cbac
📝 docs: document INDEX.json / AGENTS.md exports in README
jnahian c225e46
💄 feat(sidebar): show note type in tree item description
jnahian b87884a
✨ feat(sidebar): add type filter and expired-notes toggle
jnahian e9edc10
✨ feat: add command to set note type/priority/tags/expiry
jnahian 20dd813
📝 docs: merge v0.3.0 changelog (agent integration + search)
jnahian 4832d26
📝 docs(web): add v0.3.0 to changelog timeline
jnahian 7f81a64
🔖 chore: bump version to 0.3.0
jnahian 63437e0
fix: address CodeRabbit and Copilot review findings on PR #39
claude 4d1f6dc
🐛 fix(noteManager): harden updateNoteMetadata and cache boundary
jnahian 13ebd54
🐛 fix(sidebar): apply filters to file groups and root count
jnahian 08d92f6
🐛 fix(exports): wiring, self-trigger loop, atomic-write race, honest …
jnahian fdf3885
🐛 fix(storage): validate structured field values on parse
jnahian c0d3ca2
📝 docs: defer search to a follow-up release + review nits
jnahian d282c9a
Merge remote review fixes into local review fixes
jnahian 32d047b
🐛 fix(build): clean out/ before test compiles
jnahian 5e9e637
🐛 fix(noteManager): keep soft-deleted notes visible to internal lookups
jnahian 3f4a28b
🐛 fix(comments): editing-comment lookup and created/updated label
jnahian 324a59a
🐛 fix(ui): note preview formatting and sidebar ordering
jnahian fabc5eb
✅ test: fix flaky infra and align assertions with async API
jnahian 965a968
Merge pull request #56 from jnahian/fix/integration-test-failures
jnahian a5d3c7d
Merge branch 'main' into feat/v0.3-agent-integration
jnahian 07b25c0
Merge branch 'main' into feat/v0.3-agent-integration
jnahian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,147 +1,51 @@ | ||
| # Changelog - Version 0.3.0 | ||
|
|
||
| ## [0.3.0] - TBD | ||
| ## [0.3.0] - 2026-05-16 | ||
|
|
||
| ### Added | ||
| - **Search and Filter Notes** (GitHub Issue #10) | ||
| - Full-text search across all note content | ||
| - Filter by author (single or multiple authors) | ||
| - Filter by date range (created or modified) | ||
| - Filter by file path (glob pattern support) | ||
| - Combine multiple filters (AND logic) | ||
| - Search input with live results update (debounced 200ms) | ||
| - Keyboard shortcut for quick search (`Ctrl+Shift+F` / `Cmd+Shift+F` in notes context) | ||
| - Search icon integrated into sidebar toolbar | ||
| - Search results show file, line number, preview, and author | ||
| - Click any result to navigate directly to note location | ||
| - Clear filters button | ||
| - Search result count indicator | ||
| - Keyboard navigation in results (↑↓ arrows, Enter to open) | ||
| - Regex pattern matching support for advanced searches | ||
| - Case-sensitive search option | ||
| - Search history persistence (last 20 searches) | ||
| - "Recent Searches" quick access | ||
| - Background indexing for instant search results | ||
| - Progress indicator for large searches | ||
| - **Structured Note Schema for Agent Integration** | ||
| - Optional `type` (7 categories: `context` default, `instruction`, `warning`, `decision`, `todo`, `handoff`, `rationale`), `priority` (`low`/`normal`/`high`/`critical`), `scope` (`line`/`function`/`class`/`file`/`directory`), `tags`, `authorType` (`human`/`agent`), `expiresAt` (ISO 8601), and `references` (PR/issue/commit/test/url) fields on every note | ||
| - All fields optional — legacy v0.2.x notes load with sensible defaults (no migration required) | ||
| - New command **`Code Notes: Set Note Type / Tags / Priority…`** — Quick-Pick driven metadata editor for any note | ||
| - **Auto-Generated Workspace Exports for Coding Agents** | ||
| - **`.code-notes/INDEX.json`** — machine-readable index with `byFile`/`byType`/`byTag` lookups and deterministic output. Designed for MCP server consumption (v0.4+). | ||
| - **`.code-notes/AGENTS.md`** — human-readable digest hoisting critical instructions/warnings, open handoffs, and decisions. Useful as workspace context for coding agents (Claude Code, Cursor, etc.). | ||
| - Debounced (200ms) atomic writes on every note change; new `Code Notes: Regenerate Exports` command for manual recovery. | ||
| - **Sidebar Enhancements** | ||
| - Note type appears as `· {type}` description suffix; high/critical priority shown as a tooltip badge | ||
| - New title-bar actions: **Filter Notes by Type…** (multi-select Quick Pick) and **Toggle Expired Notes** | ||
|
|
||
| ### Fixed | ||
| - CodeLens previews of multiline notes showed all lines merged together; now only the first line, and stray heading markers (`##`) are stripped | ||
| - Sidebar notes could render out of line-number order; note previews now strip image markdown cleanly (`` no longer leaves a stray `!`) | ||
| - Comment labels always claimed "Last updated" — fresh notes now correctly show "Created" | ||
| - Edit-mode lookups (`getCurrentlyEditingComment`) used the wrong map key and never found the editing comment | ||
| - Soft-deleted notes disappeared from the note cache entirely, breaking "already deleted" detection and metadata guards; they are also no longer retrievable via by-id lookup | ||
| - Stale compiled test artifacts in `out/` ran phantom test suites; the test pipeline now cleans `out/` before compiling | ||
|
|
||
| ### Changed | ||
| - Search UI uses VSCode's native QuickPick for familiar experience | ||
| - Sidebar toolbar now includes search icon (🔍) for quick access | ||
| - Search results can be displayed in sidebar view or QuickPick | ||
| - Search index automatically updates when notes are created/edited/deleted | ||
| - Sidebar toolbar gains filter/expired toggles | ||
|
|
||
| ### Testing | ||
| - **64 comprehensive unit tests** for search components | ||
| - **SearchManager tests** (20+ tests): | ||
| - Full-text search with various queries | ||
| - Regex pattern matching | ||
| - Author filtering with edge cases | ||
| - Date range filtering | ||
| - Filter combinations (AND logic) | ||
| - Search index updates | ||
| - Performance benchmarks | ||
| - **SearchUI tests** (10+ tests): | ||
| - QuickPick integration | ||
| - Keyboard navigation | ||
| - Filter UI components | ||
| - Result display and formatting | ||
| - **Integration tests** (10+ tests): | ||
| - Search with sidebar integration | ||
| - Real-time index updates | ||
| - Multi-note search scenarios | ||
| - **Performance testing**: | ||
| - ✅ Search with 100 notes: < 500ms | ||
| - ✅ Search with 500 notes: < 1 second | ||
| - ✅ Search with 1000 notes: < 2 seconds | ||
| - ✅ Index updates: < 100ms | ||
| - All tests compile successfully with TypeScript | ||
| - Existing unit tests continue to pass | ||
| - **Manual testing completed successfully**: | ||
| - ✅ Full-text search across workspace | ||
| - ✅ Filter by author, date, file path | ||
| - ✅ Filter combinations | ||
| - ✅ Keyboard shortcuts and navigation | ||
| - ✅ Search history and recent searches | ||
| - ✅ Performance with large note collections | ||
|
|
||
| ### Technical | ||
| - Created `SearchManager` class for search indexing and queries | ||
| - Created `SearchUI` class for VSCode QuickPick integration | ||
| - Implemented inverted index for fast full-text search | ||
| - Added search metadata indexing (author, dates, file paths) | ||
| - Implemented search result ranking algorithm | ||
| - Added in-memory caching for search results | ||
| - **New commands**: | ||
| - `searchNotes` - Open search panel with QuickPick | ||
| - `clearSearchFilters` - Clear all active filters | ||
| - `showSearchHistory` - Show recent searches | ||
| - `rebuildSearchIndex` - Manually rebuild search index | ||
| - Added `search` contribution to package.json | ||
| - Integrated search with existing sidebar view | ||
| - Background indexing on workspace open | ||
| - Debounced search (200ms delay) to prevent excessive queries | ||
| - Search index automatically updates on note CRUD operations | ||
| - **Configuration options**: | ||
| - `search.fuzzyMatching` - Enable fuzzy search (default: false) | ||
| - `search.caseSensitive` - Case-sensitive search (default: false) | ||
| - `search.maxResults` - Maximum results to display (default: 100) | ||
| - `search.debounceDelay` - Search delay in ms (default: 200) | ||
| - `search.saveHistory` - Save search history (default: true) | ||
| - `search.historySize` - Number of searches to keep (default: 20) | ||
|
|
||
| --- | ||
|
|
||
| ## Benefits | ||
|
|
||
| **For Users:** | ||
| - Find any note instantly without browsing files | ||
| - Quickly locate notes by specific authors | ||
| - Filter notes by time period (e.g., "last week's notes") | ||
| - Discover related notes across the codebase | ||
| - Fast keyboard-driven workflow | ||
| - Search history prevents re-typing common queries | ||
|
|
||
| **For Teams:** | ||
| - Find all notes from specific team members during code reviews | ||
| - Locate all notes related to a feature or bug | ||
| - Review notes created during a sprint or time period | ||
| - Discover documentation and decisions across the project | ||
| - Better knowledge sharing and discovery | ||
|
|
||
| --- | ||
| ### Settings | ||
| - `codeContextNotes.exports.enabled` (default `true`), `.indexJson` (default `true`), `.agentsMarkdown` (default `true`) — control auto-export generation | ||
|
|
||
| ## Migration Notes | ||
| ### Compatibility | ||
| - Fully backwards-compatible with v0.2.x. Legacy notes load with `type=context`, `scope=line`, `priority=normal`, `tags=[]`, `authorType=human` applied in memory; on-disk file unchanged until next edit. | ||
| - Storage format extended with optional bold-label fields (`**Type:**`, `**Tags:**`, etc.). Fields equal to default are omitted, so untouched legacy notes remain byte-identical on disk. | ||
|
|
||
| - No breaking changes - purely additive feature | ||
| - No data migration required | ||
| - Works with existing note storage format | ||
| - Backward compatible with all existing notes | ||
| - Search can be disabled via keyboard shortcut preferences if not needed | ||
| - Search index built automatically on first use | ||
|
|
||
| --- | ||
|
|
||
| ## Known Limitations | ||
|
|
||
| - Search index stored in memory (not persisted) - rebuilds on workspace reload | ||
| - Maximum 100 results by default (configurable) | ||
| - Regex patterns limited by JavaScript RegExp capabilities | ||
| - No natural language search in initial release | ||
| - No "Replace in Notes" (bulk editing) - planned for future version | ||
|
|
||
| --- | ||
| ### Testing | ||
| - **58+ unit tests** covering schema defaults, storage round-trip (read + write), export generators (buildIndex/buildDigest determinism + section hoisting), debounced atomic writer (debounce coalescing + onError fail-safe), and lazy-migration integration test on NoteManager boundary | ||
|
|
||
| ## Performance Notes | ||
| ### Technical | ||
| - New modules: `src/noteDefaults.ts` (defaults + expiry helper), `src/exportGenerator.ts` (pure index/digest builders), `src/exportWriter.ts` (debounced atomic writer with injectable config getter) | ||
| - `NoteManager` wraps all storage reads with `applyDefaults` — single boundary for lazy migration | ||
| - Storage parser/writer in `src/storageManager.ts` extends the existing bold-label markdown format; unknown fields ignored gracefully | ||
| - New commands: `regenerateExports`, `setNoteMetadata`, `filterByType`, `toggleExpired` | ||
|
|
||
| - Search index uses < 10MB memory for 1000 notes | ||
| - Inverted index enables sub-second search | ||
| - Background indexing prevents UI blocking | ||
| - Lazy loading for large result sets | ||
| - Debouncing prevents excessive search operations | ||
| - Index updates incrementally on note changes | ||
| ### Coming Next | ||
| - Search and Filter UI (GitHub Issue #10) ships in a follow-up release | ||
| - v0.4 ships a standalone MCP server backed by `INDEX.json` for direct agent integration (Cursor, Claude Code, etc.) | ||
|
|
||
| --- | ||
|
|
||
| ## Links | ||
|
|
||
| [0.3.0]: https://github.com/jnahian/code-context-notes/releases/tag/v0.3.0 |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.