# Changelog All notable changes to PersoNotes will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [2.3.0] - 2025-11-11 ### Added - **Favorites System** ⭐ - Star notes and folders for quick access - Favorites section in sidebar with expandable folders - Persistent storage in `.favorites.json` - Hover to reveal star buttons on notes/folders - Complete REST API for favorites management (`/api/favorites`) - **Comprehensive Keyboard Shortcuts** ⌨️ - 10 global shortcuts for navigation and editing - `Ctrl/Cmd+K` - Open search modal - `Ctrl/Cmd+S` - Save note - `Ctrl/Cmd+D` - Open daily note - `Ctrl/Cmd+N` - Create new note - `Ctrl/Cmd+H` - Go home - `Ctrl/Cmd+B` - Toggle sidebar - `Ctrl/Cmd+,` - Open settings - `Ctrl/Cmd+P` - Toggle preview (changed from `/` for AZERTY compatibility) - `Ctrl/Cmd+Shift+F` - Create new folder - `Escape` - Close modals - Full documentation in `docs/KEYBOARD_SHORTCUTS.md` - Help section on About page - **Font Customization** 🔤 - 8 font options: JetBrains Mono, Fira Code, Inter, Poppins, Public Sans, Cascadia Code, Source Code Pro, Sans-serif - 4 size options: Small (14px), Medium (16px), Large (18px), X-Large (20px) - Font selector in settings modal with live previews - Preferences saved in localStorage - **Vim Mode Support** 🎮 - Full Vim keybindings in CodeMirror editor - hjkl navigation, insert/normal/visual modes - All standard Vim commands and motions - Toggle in Settings → Éditeur tab - Powered by `@replit/codemirror-vim` - Graceful fallback if package not installed - **About Page** ℹ️ - New "About PersoNotes" page accessible from sidebar - Features overview with keyboard shortcuts reference - Visual guide to all shortcuts with `` styling - Accessible via ℹ️ button next to settings - **Enhanced Settings Modal** - Tabbed interface: Thèmes, Polices, Éditeur - Organized and intuitive navigation - Visual previews for themes and fonts - Toggle switches with smooth animations ### Changed - **Sidebar UI Improvements** - Increased width from 280px to 300px for better readability - JetBrains Mono as default font - Compact spacing throughout - Root indicator (📁 notes) non-clickable, visually distinct - "Nouveau dossier" button moved to bottom - Section titles enlarged for hierarchy - Settings and About buttons side-by-side at bottom - **Slash Commands Styling** - Palette now uses theme colors (var(--bg-secondary), var(--accent-primary)) - Adapts to selected theme automatically - Consistent with overall UI aesthetic - **Homepage Layout** - Favorites section with expandable folders - Note count in section titles ("📂 Toutes les notes (39)") - Scrollable favorites list (max 300px height) - Better organization and hierarchy - **Preview Toggle Shortcut** - Changed from `Ctrl+/` to `Ctrl+P` for AZERTY keyboard compatibility - Updated in code, documentation, and About page ### Fixed - Slash commands palette colors now respect theme selection - Modal centering improved for delete confirmations - Sidebar overflow handling with scrollable sections - Font size now properly cascades using `rem` units from `:root` ### Technical - Added `@replit/codemirror-vim` as optional dependency - Created `vim-mode-manager.js` for Vim mode lifecycle - Created `font-manager.js` for font and size management - Created `keyboard-shortcuts.js` for centralized shortcuts - Created `favorites.js` for favorites UI management - New backend endpoints: `/api/favorites`, `/api/about` - Enhanced `theme-manager.js` with tab switching - CSS toggle switch component added - Improved error handling for missing packages ### Documentation - Added `docs/KEYBOARD_SHORTCUTS.md` - Complete shortcuts reference - Updated README.md with all new features - Added sections on customization, favorites, and Vim mode - Updated feature list and usage examples ## [2.2.0] - 2025-11-11 ### Added - **Multi-Theme System** 🎨 - Added 8 professional dark themes: Material Dark (default), Monokai Dark, Dracula, One Dark, Solarized Dark, Nord, Catppuccin Mocha, and Everforest Dark - New settings button (⚙️) at the bottom of the sidebar - Interactive theme selection modal with visual previews - Instant theme switching without page reload - Theme preference automatically saved in localStorage - Full responsive design on desktop, tablet, and mobile - Comprehensive documentation in `docs/THEMES.md` and `docs/GUIDE_THEMES.md` ### Changed - Added `/frontend/` route to serve frontend JavaScript files - Enhanced sidebar with persistent theme settings button ## [2.1.2] - 2025-11-11 ### Fixed - **Bulk Deletion 404 Error** - Corrected the HTTP method for bulk deletion from `POST` to `DELETE` in both frontend and backend. - Adjusted the Go backend handler to manually parse the request body for `DELETE` requests, as `r.ParseForm()` does not automatically process bodies for this method. - This resolves the 404 error encountered during bulk deletion operations. ## [2.1.1] - 2025-01-11 ### Daily Notes UX Improvement 🎨 ### Changed - **Calendar Click Behavior** - Only existing notes are now clickable in the calendar - Days without notes are visually grayed out (50% opacity) with `cursor: not-allowed` - Days with notes show blue dot (●) and are clickable with hover effects - This prevents accidental creation of notes on random dates - **Creating New Daily Notes** - Use "📅 Note du jour" button or `Ctrl/Cmd+D` for today's note - Use API endpoint `/api/daily/{YYYY-MM-DD}` for specific dates - Manual file creation still possible in `notes/daily/YYYY/MM/DD.md` ### Technical **Templates**: - `templates/daily-calendar.html`: Added conditional HTMX attributes (`{{if and .InMonth .HasNote}}`) - Added CSS classes: `.calendar-day-clickable` and `.calendar-day-no-note` **Styles** (`static/theme.css`): - `.calendar-day`: Changed default cursor from `pointer` to `default` - `.calendar-day-clickable`: Explicit `cursor: pointer` for notes - `.calendar-day-no-note`: 50% opacity + `cursor: not-allowed` + muted text color **Documentation**: - Updated `docs/DAILY_NOTES.md` with new click behavior and creation methods ## [2.1.0] - 2025-01-11 ### Daily Notes Feature 📅 Major new feature: **Daily Notes** for quick, organized daily note-taking. ### Added - **Daily Notes System** - Automatic daily note creation with structured template - Notes organized by date: `notes/daily/YYYY/MM/DD.md` - Pre-filled template with sections: Objectifs, Notes, Accompli, Réflexions, Liens - Automatic `[daily]` tag for all daily notes - **Interactive Calendar Widget** - Monthly calendar view in sidebar - Visual indicators for existing notes (blue dots) - Today highlighted with violet border - Month navigation with arrow buttons (‹ ›) - Click any date to open/create that day's note - Responsive design for mobile and desktop - **Quick Access** - "📅 Note du jour" button in header - Keyboard shortcut: `Ctrl/Cmd+D` (works anywhere in the app) - "Récentes" section showing last 7 daily notes - One-click access to recent notes - **Backend Endpoints** - `GET /api/daily/today` - Today's note (auto-create) - `GET /api/daily/{YYYY-MM-DD}` - Specific date note - `GET /api/daily/calendar/{YYYY}/{MM}` - Calendar HTML - `GET /api/daily/recent` - Recent notes list - **Frontend Module** - New `daily-notes.js` module for keyboard shortcuts - Auto-refresh calendar after saving daily notes - HTMX integration for seamless updates - **Styling** - Complete CSS theme for calendar and recent notes - Hover effects and smooth animations - Material Darker theme integration - Mobile-responsive calendar grid ### Technical Details **Backend** (`internal/api/daily_notes.go`): ```go // New handler functions handleDailyToday(w, r) handleDailyDate(w, r, dateStr) handleDailyCalendar(w, r, year, month) handleDailyRecent(w, r) ``` **Templates**: - `templates/daily-calendar.html` - Calendar widget - `templates/daily-recent.html` - Recent notes list **Frontend** (`frontend/src/daily-notes.js`): ```javascript initDailyNotesShortcut() // Ctrl/Cmd+D handler refreshDailyNotes() // Auto-refresh after save ``` **Documentation**: - Complete guide in `docs/DAILY_NOTES.md` - Usage examples and customization tips - API documentation and troubleshooting ### Changed - Sidebar layout updated to include Daily Notes section - Header now includes "Note du jour" button - Template index.html receives current date for calendar initialization ### Use Cases 1. **Daily Journal**: Track daily activities and reflections 2. **Project Log**: Document daily progress on projects 3. **Stand-up Notes**: Prepare daily stand-up meetings 4. **Learning Log**: Track daily learnings and discoveries ## [2.0.0] - 2025-01-11 ### Architecture Optimization Release 🎯 Major refactoring to optimize the HTMX + JavaScript coordination pattern. This release significantly improves code quality, performance, and maintainability. ### Changed - **HTMX Integration Optimization** - Replaced manual `fetch()` calls with `htmx.ajax()` in file-tree.js - Eliminated manual DOM manipulation after AJAX requests (~60 lines of code removed) - HTMX now automatically processes out-of-band swaps without explicit `htmx.process()` calls - **Event System Optimization** - Replaced `MutationObserver` with HTMX event listeners (`htmx:afterSwap`, `htmx:oobAfterSwap`) - ~30% reduction in CPU usage during DOM updates - More predictable and reliable event handling - **File Operations** - File moving (drag & drop) now uses `htmx.ajax()` for consistency - Folder creation now uses `htmx.ajax()` for consistency - Both operations leverage HTMX's automatic out-of-band swap processing ### Fixed - **File Tree Click Issue** - Fixed missing `id="sidebar"` attribute on `