Skip to content

merge: Integrate main branch features into dev branch#2

Merged
dev-Ninjaa merged 23 commits into
devfrom
main
Jan 29, 2026
Merged

merge: Integrate main branch features into dev branch#2
dev-Ninjaa merged 23 commits into
devfrom
main

Conversation

@dev-Ninjaa

Copy link
Copy Markdown
Member

Description

This pull request merges the main branch into the dev branch to integrate the latest production-ready features and updates.

Changes Included

  • Data Management: Removed mockNotes.ts and mockData.ts files for cleaner data handling
  • Feature Development: Added subcategory support
  • UI Enhancements: Refactored modal and command palette components
  • Code Quality: Various improvements and bug fixes

Total Changes

  • 23 Commits from main branch
  • 23 Files modified
  • 1 Contributor

Merge Type

This is a forward integration merge from the main production branch into the dev development branch to keep the development environment synchronized with the latest stable code.

Testing

Please verify that all changes integrate correctly with the existing dev branch code and that no conflicts arise.

- Delete mockNotes.ts from app/data directory
- Remove hardcoded mock data that is no longer needed
- Simplify data management by relying on actual data sources or dynamic generation
- Delete mockData.ts containing mock topic data
- Remove hardcoded mockTopics array with sample categories and subtopics
- Clean up unused mock data as application transitions to real data persistence
- Replace SettingsView with SettingsModal component for modal-based settings
- Replace SearchView with CommandPalette component for command palette UI
- Add SubCategory type and SubCategoryStore persistence layer
- Add subcategory state management (selectedSubCategoryId, isLoaded states)
- Implement subcategory CRUD operations (create, update, load, save)
- Add handleMoveNote function to support moving notes between categories/subcategories
- Add handleSelectCategory and handleSelectSubCategory handlers for navigation
- Refactor handleChangeView to open modals instead of changing view mode
- Update handleCreateNote to accept optional subCategoryId parameter
- Update handleOpenNote to track and restore subcategory selection
- Add subcategory validation and repair logic in handleRestoreNote
- Remove hardcoded CATEGORY_COLORS constant (moved to component level)
- Update category creation to accept color and icon parameters
- Add handleUpdateCategory function for editing existing categories
- Improve note restoration with category/subcategory reference validation
…ories

- Add optional `icon` field to Category interface for custom category icons
- Create new SubCategory interface with id, name, categoryId, icon, and createdAt
- Add optional `subCategoryId` field to Note interface for subcategory assignment
- Enable hierarchical organization of notes through category and subcategory structure
- Add onTogglePin prop to AllNotesViewProps interface
- Pass onTogglePin handler to component destructuring
- Add isPinned state detection to NoteContextMenu component
- Implement onTogglePin callback handler in context menu
- Close context menu after toggling pin state
- Enable users to pin/unpin notes directly from context menu
…iate closure

- Add setTimeout with 0ms delay before attaching mousedown event listener
- Prevent context menu from closing immediately after opening
- Clear timeout in cleanup function to avoid memory leaks
- Maintain keydown listener attachment without delay
- This fixes the issue where context menu would close on the same click that opened it
…andling

- Add Edit Category button with Edit3 icon to context menu
- Import additional icons (Edit3, Palette, Sparkles) from lucide-react
- Add onEdit callback prop to CategoryContextMenu interface
- Delay click listener attachment to prevent immediate menu closure
- Update delete button styling with red color scheme for better UX
- Add proper cleanup of timeout in useEffect return function
- Improve visual distinction between edit and delete actions
…egories

- Create new CategoryModal component with create and edit modes
- Add preset color palette with 12 color options for category customization
- Implement icon selection with 8 preset icons (folder, book, briefcase, heart, star, lightbulb, coffee, music)
- Add category name input with validation and keyboard shortcuts (Enter to save, Escape to close)
- Include live preview of selected color and icon combination
- Add focus management with auto-focus on input when modal opens
- Implement modal backdrop with blur effect and click-to-close functionality
- Add responsive design with scrollable content area and fixed header/footer
- Support both create and edit modes with appropriate labels and button text
- Import Pin icon from lucide-react for visual indicator
- Display pin icon in note card footer when note.isPinned is true
- Position pin icon on the right side using ml-auto with flex-shrink-0
- Style pin icon with stone-400 color and 10px size for subtle appearance
- Provides visual feedback to users about pinned notes in the card view
…behavior

- Add Pin and PinOff icons from lucide-react for pin state indication
- Add isPinned prop to track note pin state in context menu
- Add onTogglePin callback prop to handle pin/unpin actions
- Add pin/unpin button to context menu with conditional icon and label
- Delay click listener attachment to prevent immediate menu closure
- Update delete button styling with red color scheme for better UX
- Close menu automatically after pin toggle or delete action
- Import and integrate NoteCard component for consistent note display
- Add onTogglePin prop to component interface and handler
- Convert note list from vertical stack to responsive grid layout (2-5 columns)
- Replace custom note rendering with reusable NoteCard component
- Pass isPinned state to NoteContextMenu for pin toggle functionality
- Add onTogglePin callback to context menu for pin/unpin operations
- Increase max-width from 4xl to 7xl to better utilize grid layout
- Improves UI consistency across note views and enables pin management from pins view
- Add onTogglePin callback prop to RecentView component
- Pass isPinned state to NoteContextMenu for proper pin indicator display
- Implement onTogglePin handler to toggle note pin status and close context menu
- Enable users to pin/unpin notes directly from recent notes view
- Change border from right to left alignment for sidebar positioning
- Add bottom border to header section for better visual separation
- Increase header text color contrast from stone-400 to stone-500
- Adjust spacing from space-y-8 to space-y-6 with added py-6 padding
- Enhance date label styling with larger text (text-sm) and darker color
- Update reflection textarea with improved styling: larger text, better borders, focus ring, and min-height constraint
- Replace textarea rows attribute with min-h-[88px] for consistent sizing
- Update placeholder text to "What did you explore today?" for better UX
- Enhance reflection display area with hover effects and consistent min-height
- Replace FileText icon with subtle dot indicator for note list items
- Improve overall visual consistency and readability throughout the component
- Add SubCategory type import and subcategory-related props to Sidebar component
- Implement CategoryModal and SubCategoryModal components for creating and editing categories/subcategories
- Add SubCategoryContextMenu component for subcategory-specific actions
- Introduce state management for category and subcategory modal modes (create/edit)
- Add getSubCategoriesForCategory helper function to filter subcategories by parent category
- Update getNotesForCategory to support filtering by subcategory
- Implement handleSubCategoryContextMenu for right-click subcategory actions
- Add canDeleteSubCategory validation to prevent deletion of subcategories with notes
- Implement handleSaveCategory and handleSaveSubCategory for modal form submissions
- Add modal open handlers for both create and edit modes for categories and subcategories
- Implement drag and drop functionality for moving notes between categories/subcategories
- Add dragOverTarget state to track drag-over targets for visual feedback
- Enhance category and subcategory rendering with expanded/collapsed states
- Add icon selection support for categories and subcategories with lucide-react icons
- Update all related callback signatures to support new subcategory operations
- Add ViewMode prop to support dynamic breadcrumb rendering based on current view
- Implement breadcrumb navigation showing view hierarchy (pulm > view > category > subcategory)
- Add pin toggle button with visual feedback for pinned/unpinned states
- Support subcategory display in breadcrumb for library view mode
- Hide TopBar for settings and search views
- Add isPinned and onTogglePin props to enable note pinning from top bar
- Improve layout with justify-between to separate breadcrumb and pin button
- Import Pin icon from lucide-react for pin toggle button
- Create new CommandPalette component with search functionality
- Implement keyboard navigation (arrow keys, enter, escape)
- Add real-time note filtering by title with case-insensitive search
- Display search results with note title and category information
- Show category color indicator and name for each note result
- Auto-focus search input when palette opens
- Support keyboard shortcuts for result selection and palette closure
- Add backdrop overlay with blur effect for modal presentation
- Filter out deleted notes from search results
- Improve note discovery and navigation experience
- Create new SettingsModal component for displaying application settings and information
- Display data statistics including notes count and categories count
- Add General section with dark mode toggle (disabled) and local-only storage information
- Add Data section showing current notes, categories, and storage location details
- Add About section with app name, version, and description
- Implement keyboard escape key handling to close modal
- Prevent body scroll when modal is open
- Support backdrop click to dismiss modal
- Use consistent styling with existing modal components (CategoryModal pattern)
…ory actions

- Create new SubCategoryContextMenu component with rename and delete options
- Implement rename functionality to allow subcategory renaming
- Add delete functionality with conditional disabling when subcategory contains notes
- Include keyboard event handling for Escape key to close menu
- Add click-outside detection to automatically close menu on external clicks
- Display helpful tooltip when delete is disabled
- Use Lucide icons (Edit3, Trash2) for consistent UI design
- Style menu with fixed positioning, shadow, and hover states matching app design system
…subcategories

- Add new SubCategoryModal component with create and edit modes
- Implement preset icon selection with 8 icon options (Folder, Book, Briefcase, Heart, Star, Lightbulb, Coffee, Music)
- Add form validation for subcategory name input with disabled save button when empty
- Implement keyboard shortcuts (Enter to save, Escape to close)
- Add auto-focus on input field when modal opens
- Include backdrop blur and overlay for modal presentation
- Support optional icon selection with toggle functionality
- Display parent category name in modal header for context
…ersistence

- Implement LocalStorageSubCategoryStore class implementing SubCategoryStore interface
- Add loadSubCategories method to retrieve subcategories from localStorage with JSON parsing
- Add saveSubCategories method to persist subcategories to localStorage
- Include error handling for localStorage operations with console logging
- Handle server-side rendering by checking for window object availability
- Parse createdAt timestamps back to Date objects during deserialization
- Enable subcategory data persistence across browser sessions
…sistence

- Define SubCategoryStore interface with loadSubCategories and saveSubCategories methods
- Enable abstraction layer for subcategory data persistence across different storage implementations
- Support consistent subcategory data management throughout the application
- Add export for SubCategoryStore interface type
- Add export for LocalStorageSubCategoryStore implementation
- Convert NoteStore export to type-only export
- Convert CategoryStore export to type-only export
- Convert ReflectionStore export to type-only export
- Improve type safety by distinguishing between interfaces and implementations
- Replace topicId and subtopicId with categoryId for simplified hierarchy
- Add isPinned field to support note pinning functionality
- Add lastOpenedAt field to track note access history
- Add isDeleted and deletedAt fields for soft delete support
- Align schema with new category-based organization system and note management features
@dev-Ninjaa dev-Ninjaa merged commit 2e39357 into dev Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant