Releases: jnahian/code-context-notes
Releases · jnahian/code-context-notes
v0.2.1
[0.2.1] - 2025-11-12
Added
- Editor Context Menu Integration - "Add Note" option now available in editor right-click context menu for quick note creation without keyboard shortcuts
Changed
- Selection-based CodeLens disabled - The "Add Note" CodeLens that appeared when selecting text has been temporarily disabled to reduce visual clutter. The context menu option provides a more intuitive alternative. This may be re-enabled with configuration control in a future release.
Technical
- Added
editor/contextmenu contribution in package.json - Commented out selection-based CodeLens logic in
codeLensProvider.ts:80-108with TODO marker for future re-enablement
Full Changelog: v0.2.0...v0.2.1
v0.2.0
[0.2.0] - 2025-10-27
Added
- Sidebar View for Browsing All Notes (GitHub Issue #9)
- Dedicated Activity Bar icon with tree view showing all notes across workspace
- Notes organized by file with collapsible nodes showing path, note count, and previews
- Click notes to navigate directly to location in editor with real-time updates
- "+" button for quick note creation without text selection, Collapse All and Refresh buttons in toolbar
- Context menus: Note items (Go to, Edit, Delete, View History), File items (Open File)
- Configurable sorting by file path, date, or author with customizable preview length (20-200 chars)
- Empty state guide, lazy loading, and works with multi-note feature
Changed
- Add Note command now works without text selection - creates note for current cursor line when no text is selected
- Keyboard shortcut (
Ctrl+Alt+N/Cmd+Alt+N) no longer requires selection for more convenient note-taking - NoteManager enhanced with workspace-wide query methods (
getAllNotes(),getNotesByFile(),getNoteCount(),getFileCount()) - Added event emitter and file watcher for real-time sidebar updates
Testing
- 78 comprehensive unit tests for sidebar components (NoteTreeItem: 59 tests, NotesSidebarProvider: 19 tests)
- All TypeScript compilation and existing unit tests (41/41) passing
- Manual testing verified: create/edit/delete workflow, real-time updates, context menus, performance with 100+ notes
Technical
- Implemented
NotesSidebarProvider(TreeDataProvider) andNoteTreeItemclasses for tree structure - Added sidebar view and Activity Bar icon contributions to package.json
- New commands:
openNoteFromSidebar,refreshSidebar,collapseAll,editNoteFromSidebar,deleteNoteFromSidebar,viewNoteHistoryFromSidebar,openFileFromSidebar - Lazy loading, caching, debouncing (300ms), markdown stripping, and configuration options:
sidebar.sortBy,sidebar.previewLength,sidebar.autoExpand
Full Changelog: https://github.com/jnahian/code-context-notes/blob/main/docs/changelogs/v0.2.0.md
v0.1.8
Fixed
- Multiple note creation and navigation (GitHub Issue #6)
- Fixed thread lookup methods that were using note IDs instead of thread keys, breaking multi-note functionality
- Updated
focusNoteThread(),showHistoryInThread(),enableEditMode(), andsaveEditedNoteById()to properly handle multi-note threads - Fixed thread key format to use
filePath:lineStartfor consistent lookups - Added "➕ Add Note" CodeLens button that appears even when notes already exist on a line
- Users can now easily add multiple notes to the same line via CodeLens
- All multi-note features (viewing, editing, navigating) now work correctly
Changed
- Conditional navigation buttons with icon-only UI
- Moved Previous/Next/Add Note actions from markdown header to native VS Code icon buttons
- Previous (
$(chevron-left)) and Next ($(chevron-right)) buttons now only appear when there are multiple notes on the same line - Single-note threads show:
[+] [Edit] [History] [Delete] - Multi-note threads show:
[<] [>] [+] [Edit] [History] [Delete] - All buttons placed in inline group on the right side for consistent positioning
- Removed markdown navigation header from comment body for cleaner content display
- Introduced contextValue system: single notes use
noteId, multi-notes usenoteId:multisuffix - Smarter, cleaner UI that only shows navigation when needed
Technical
- Updated
commentController.ts:- Modified
createComment()to addisMultiNoteparameter and set contextValue conditionally (lines 156-190) - Updated
updateThreadDisplay()to calculate and pass multi-note state (lines 124-151) - Updated thread lookup methods to use thread keys (lines 638-872)
- Modified
- Updated
extension.ts:- Modified 7 command handlers to extract note ID from contextValue using
.replace(/:multi$/, '') - Commands: nextNote, previousNote, addNoteToLine, editNote, saveNote, deleteNoteFromComment, viewNoteHistory
- Modified 7 command handlers to extract note ID from contextValue using
- Updated
package.json:- Added conditional
whenclauses: Previous/Next usecomment =~ /:multi$/, other buttons usecomment =~ /^[a-f0-9-]+/
- Added conditional
- Updated
codeLensProvider.ts:- Added "Add Note" CodeLens for lines with existing notes (lines 70-77)
Full Changelog: v0.1.7...v0.1.8
v0.1.7
Fixed
- Prevented unwanted scrolling when adding notes via CodeLens
- Fixed issue where clicking "➕ Add Note" CodeLens button would cause the file to scroll slightly
- Added scroll position preservation logic that captures current viewport before creating thread
- Restores scroll position after thread creation with small delay to ensure smooth experience
- User's viewport now stays exactly where it was when adding notes
- Better UX with no jarring scrolling interruptions
Changed
-
Removed automatic focus/scroll behavior when viewing notes
- Removed automatic cursor movement to note location when viewing notes
- Removed automatic scrolling to center note in view
- Users now maintain full control of their cursor position and viewport
- Less disruptive experience - no unexpected cursor jumps or scrolling
- More predictable behavior when interacting with notes
-
Removed cancel notification
- Removed "Note creation cancelled" notification when canceling note creation
- Canceling is now a silent action - no unnecessary popup
- Reduces notification noise and interruptions
- Cleaner, quieter user experience
Technical
- Updated
openCommentEditor()with scroll position preservation (commentController.ts:246-279) - Updated
focusNoteThread()to remove cursor movement and reveal logic (commentController.ts:441-463) - Updated
cancelNewNoteCommandto remove notification (extension.ts:448-458)
Full Changelog: v0.1.6...v0.1.7
v0.1.6
Fixed
- CodeLens "Add Note" action now properly focuses input field
- Fixed issue where clicking "➕ Add Note" CodeLens would open comment editor but not focus the input
- Enhanced
openCommentEditor()to ensure document is shown, cursor is positioned, and UI has time to render - Added 50ms delay to allow VS Code to fully render the comment thread before focus
- Improved user experience - input is now immediately ready for typing
Changed
- Unified note creation to use consistent method
- Removed + icon from editor gutter by disabling
commentingRangeProvider - All note creation now goes through controlled
openCommentEditor()method - Ensures consistent behavior and proper input focus regardless of creation method
- Users should use:
Ctrl+Alt+N(Cmd+Alt+N) keyboard shortcut- "➕ Add Note" CodeLens button when code is selected
- Removed + icon from editor gutter by disabling
Technical
- Updated
openCommentEditor()with improved focus handling (lines 242-285) - Removed
commentingRangeProviderto eliminate inconsistent code paths
Full Changelog: v0.1.5...v0.1.6
v0.1.5
Added
- Auto-collapse all other notes when working on one - When opening, editing, or viewing a note, ALL other comment threads are automatically collapsed to improve focus and reduce visual clutter
- Only one note is visible at a time for better concentration
- All other notes (both expanded and already collapsed) are ensured to be collapsed
- Temporary threads (new notes being created) are disposed completely
- Editing threads are disposed when switching to another note
- Applies to all interaction methods: keyboard shortcuts, CodeLens, and edit buttons
- Creates a cleaner, more focused editing experience
Fixed
-
Keyboard shortcuts now use modern comment UI (Bug #9)
Ctrl+Alt+N(Add Note) now opens the comment editor instead of a simple input boxCtrl+Alt+H(View History) now shows history inline in the comment thread instead of opening a separate document- Provides better UX with markdown support, formatting shortcuts, and Save/Cancel buttons
- Consistent experience across all interaction methods
-
+ icon comment editor now saves notes (Bug #10)
- Fixed issue where clicking the + icon in the editor gutter would open a comment editor but Save wouldn't work
handleSaveNewNote()now handles threads created by both our code and VSCode's native + icon- Falls back to finding the document by URI matching if custom properties aren't set
- Provides clear error messages if document cannot be found
-
Test coverage configuration (Bug #8)
- Fixed nyc coverage tool reporting 0% coverage after esbuild migration
- Removed dependency on missing
@istanbuljs/nyc-config-typescriptpackage - Updated include path from
out/src/**/*.jstoout/**/*.js - All 41 unit tests continue to pass
Changed
- Improved comment thread lifecycle management with better editor state tracking
- Enhanced user experience by preventing multiple simultaneous comment editors
- Updated internal methods:
openCommentEditor(),enableEditMode(), andfocusNoteThread()to auto-close other editors - Improved labels with more relevant information
- New note editor: "Add your note" (clearer action)
- View/Edit notes: Shows "Last updated [date]" if modified, or "Created [date]" if new
- History entries: Shows action with full timestamp (e.g., "Updated on 10/19/2025 at 2:30:00 PM")
Technical
- New
closeAllCommentEditors()helper method in CommentController - Better detection of temporary vs. editing vs. viewing thread states
- Improved handling of VSCode's native + icon thread creation
- Continued compatibility with esbuild bundling
Contributors
- @dependabot[bot] made their first contribution in #3
- @jnahian made their first contribution in #4
Full Changelog: v0.1.4...v0.1.5
v0.1.4
Added
- Package testing script (
npm run test:package) - Better error handling for workspace-dependent operations
Changed - ES Module Migration
- Migrated to ES Modules (ESM) from CommonJS for better compatibility with modern npm packages
- Updated
package.jsonwith"type": "module" - Updated
tsconfig.jsonto use"module": "ES2022"and"moduleResolution": "bundler" - Added
.jsextensions to all local import statements in TypeScript source files (6 files) - Converted build scripts to ES modules (
scripts/package.jsandscripts/publish.js) - Updated all test files with
.jsextensions in imports (4 test files) - Fixed test runners to use
import.meta.urlinstead of__dirname(3 test runners) - Updated
.vscodeignoreto include production dependencies in packaged extension - All 41 unit tests passing with ES modules
- Package size optimized to 79KB (down from 81KB)
- More responsive activation events
Fixed
- Fixed
Cannot find module 'uuid'error by migrating to ES modules (uuid v13.0.0 is ESM-only) - Fixed
Cannot find module './storageManager'error by adding.jsextensions to imports - Fixed
Cannot find package 'uuid'error by updating packaging configuration to include dependencies - Extension now activates properly when no workspace is initially open
- Added graceful handling for commands when no workspace is available
- Improved activation events for better responsiveness
- Users now get helpful messages to open a workspace when needed
Technical
- Now compatible with uuid v13.0.0 and other ESM-only packages
- Better tree-shaking and optimization with ES modules
- All TypeScript files compile to ES modules with proper import paths
- Package size: 103KB (includes uuid dependency)
Migration Notes
- No breaking changes to extension API or functionality
- Extension continues to work with existing
.code-notes/directories - All existing notes remain compatible
Full Changelog: v0.1.0...v0.1.4
v0.1.0
🎉 Initial Release - Published to Marketplaces!
Marketplace URLs:
- VSCode Marketplace: https://marketplace.visualstudio.com/items?itemName=jnahian.code-context-notes
- Open VSX Registry: https://open-vsx.org/extension/jnahian/code-context-notes
Added
- Add notes to code using VSCode's native comment UI
- Markdown formatting support with keyboard shortcuts
- CodeLens indicators above code with notes
- Intelligent content tracking - notes follow code when line numbers change
- Complete version history for all note modifications
- Git integration for automatic author detection
- Human-readable markdown storage in
.code-notes/directory - Keyboard shortcuts for common actions
- Configuration options for storage directory, author name, and CodeLens display
- Edit, delete, and view history buttons in comment UI
- Inline history display as comment replies
- Automatic note position updates on document changes
- Content hash tracking for moved code detection
Features
Note Management
- Create notes for selected code ranges
- Edit notes with full history tracking
- Delete notes with confirmation dialog
- View complete edit history inline
UI Integration
- Native VSCode comment threads
- CodeLens indicators with note previews
- Markdown formatting toolbar
- Save/Cancel buttons for editing
- Edit/Delete/History buttons in comment title
Markdown Support
- Bold (
Ctrl/Cmd+B) - Italic (
Ctrl/Cmd+I) - Inline code (
Ctrl/Cmd+Shift+C) - Code blocks (
Ctrl/Cmd+Shift+K) - Links (
Ctrl/Cmd+K) - Lists, headings, and more
Storage
- One markdown file per note
- Files named by note ID
- Complete metadata (author, timestamps, line range, content hash)
- Full edit history preserved
- Human-readable format
Content Tracking
- Content hash generation for code blocks
- Automatic position updates when code moves
- Stale note detection when content changes significantly
- Document change event handling with debouncing
Git Integration
- Automatic git username detection
- Fallback to system username
- Configuration override support
Commands
- Add Note to Selection (
Ctrl+Alt+N/Cmd+Alt+N) - Delete Note at Cursor (
Ctrl+Alt+D/Cmd+Alt+D) - View Note History (
Ctrl+Alt+H/Cmd+Alt+H) - Refresh All Notes (
Ctrl+Alt+R/Cmd+Alt+R) - Markdown formatting commands
- Show Markdown Formatting Guide
Configuration
codeContextNotes.storageDirectory- Custom storage locationcodeContextNotes.authorName- Override author namecodeContextNotes.showCodeLens- Toggle CodeLens display
Full Changelog: https://github.com/jnahian/code-context-notes/commits/v0.1.0