Commit Graph
58 Commits
Author SHA1 Message Date
Ewald d72a31f4e3 Fix Florence vector health regression and sync backfill polling exports 2026-04-15 10:22:27 +02:00
Ewald a2053d0cba refactor(v2): plan V2 complet — splits JS, tests frontend, durcissement securite
Chantier F - Typage Python
- ruff S101 déplacé en per-file-ignores (pyproject.toml)
- pyrightconfig.json : mode standard confirmé

Chantier G - Assertions & bare-except
- 16 blocs except documentés dans config.py
- --cov-branch activé, seuil coverage 60→68%

Chantier H - Cache settings
- Stratégie documentée dans settings.py
- _resolve_index_dir() logguée dans config.py

Chantier I - Split gros fichiers JS
- client.js 1509L → client.js 406L + clientAuth.js + clientOps.js + fetchUtils.js
- toolbar.js 927L → toolbar.js 458L + toolbarActions.js + toolbarControls.js
- FloatingViewer.js → FloatingViewer.impl.js + floatingViewer*(8 modules)
- Viewer_impl.js → ViewerRuntime.js + viewerShell.js + viewerThemeStyles.js + viewerOverlayDismiss.js
- model3dRenderer.js → model3dRenderer.impl.js + model3dCore.js + model3dLoaders.js + model3dSupport.js
- dialogs.js → dialogs.js + DialogTemplates.js

Chantier J - Tests frontend (Phases 1-2)
- use_drag_drop.vitest.mjs : 5 tests
- use_grid_state.vitest.mjs : 18 tests
- security_client_headers, security_deep_merge, security_runtime_state, runtime_store, dialog_templates
- Total: 80 fichiers test / 350 tests vitest

Chantier K - Pinia migration
- runtimeState.js entièrement migré vers Pinia
- getOptionalRuntimeStore.js + runtimeEnrichmentState.js ajoutés

Chantier L - Durcissement sécurité
- tests/security/test_rate_limit.py : 8 tests rate-limit (state machine complète)
- clientAuth.js : docstring sessionStorage security boundary
- three.js 0.183.2 audité : 0 CVE (Snyk)

Chantier M - Simplification config
- deps.py, tool_detect.py, utils.py nettoyés

docs: PLAN_REFACTO_V2_LONG_TERME.md ajouté et clôturé
.gitignore: coverage/ ajouté
2026-04-11 09:38:41 +02:00
MajoorWaldi edd2186f4e fix(api): improve authentication token handling and refresh logic
- Add session storage for temporary token storage
- Implement logic to clear local storage token after bootstrap refresh
- Refactor token refresh process to handle remote cookie refresh without exposing token
- Update fetchAPI function to use new token refresh logic
- Add tests for new token handling behavior
2026-04-08 09:07:59 +02:00
MajoorWaldi 9f9480e2f9 feat(settings): add index directory setting for Majoor
- Implement new API endpoints for getting and setting index directory
- Add corresponding frontend functionality in settings advanced section
- Introduce new toast messages for index directory-related actions
- Update i18n dictionary with new index directory-related translations
2026-04-07 16:39:13 +02:00
Ewald ALOEBOETOEandCopilot Autofix powered by AI addce04d2e Potential fix for code scanning alert no. 16: Clear text storage of sensitive information
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-04-07 12:25:57 +02:00
MajoorWaldi df96cac6ac feat(settings): add verbose logging options for route registration and startup
- Add new API endpoints for route logging settings
- Implement new settings in the advanced settings page
- Update installation instructions to reflect the correct WinGet package ID for ExifTool
2026-04-06 18:07:19 +02:00
MajoorWaldi 977179de90 feat(security): implement settings-first remote setup flow and improve documentation
- Add Recommended Remote LAN Setup option in Settings for trusted LAN configurations
- Implement loopback recovery bootstrap for local browser sessions
- Automatically rotate legacy token hashes to new plaintext tokens
- Update documentation to reflect new remote setup process and security features
- Add runtime write authorization status indicators in Assets Manager
- Improve client-side token handling and session management
- Update environment variables guide with new bootstrap capabilities
2026-04-06 16:59:18 +02:00
MajoorWaldi 07262353f4 feat: add remote access write permissions and bootstrap token handling; enhance error messaging for write access issues 2026-04-06 10:26:23 +02:00
Ewald d66fb7ae70 feat: ajouter la normalisation du temps de génération et des tests associés pour les balises d'actifs 2026-04-03 19:25:05 +02:00
MajoorWaldi b0070544d0 feat: implement request deduplication in API client
- Added deduplication logic to prevent multiple simultaneous requests for the same asset metadata.
- Introduced a pending requests cache to manage in-flight promises.
- Updated `getAssetMetadata` and `vectorFindSimilar` functions to utilize the deduplication feature.
- Enhanced error handling to clear pending entries on request failures.

feat: add MediaBlobCache for media asset error tracking

- Created MediaBlobCache to manage blob URLs and track loading errors for media assets.
- Implemented methods to mark URLs as errored and acquire blob URLs with ref-counting.
- Integrated MediaBlobCache into the Card component to handle broken image URLs.

feat: reconcile selection IDs in grid management

- Added `reconcileSelectionIds` function to synchronize selected asset IDs with visible assets.
- Updated grid selection management to prune selections based on visibility.
- Enhanced the AssetsManagerPanel to trigger selection reconciliation on filter changes.

style: improve loading overlay and skeleton loaders

- Refined loading overlay styles for better user experience.
- Added CSS for skeleton loaders to provide visual feedback during asset loading.

test: add unit tests for API client deduplication and grid selection

- Implemented tests for deduplication logic in the API client.
- Added tests for the new `reconcileSelectionIds` function in the grid selection manager.
2026-03-30 17:04:33 +02:00
Ewald 44c0c57f6e feat: Add asset management and real-time listener functionalities
- Implemented entry UI registration for the Assets Manager, including sidebar and bottom panel integration.
- Created real-time listeners for execution events, asset updates, and enrichment status.
- Developed execution runtime controller to manage job tracking, asset buffering, and indexing.
- Introduced lazy initialization for vector services to optimize resource usage.
- Added HTTP handlers for plugin management, enabling listing, enabling, and reloading of plugins.
2026-03-29 01:03:49 +01:00
MajoorWaldi 8e480d7d68 feat: Enhance various components with error handling, resource management, and dependency updates 2026-03-28 20:51:34 +01:00
MajoorWaldi 925b718e38 feat: Update vector backfill logic to use backfill_id and enhance stack management 2026-03-28 20:31:37 +01:00
MajoorWaldi 0124a8f6d5 feat: enhance asset management with job finalization logic, improve coverage thresholds, and update documentation for AI/vector features 2026-03-28 15:35:28 +01:00
MajoorWaldi dc72be0139 feat: enhance JS testing and linting setup
- Added coverage reporting for Vitest with configuration in vitest.config.mjs
- Updated package.json to include new scripts for JS coverage, linting, and formatting
- Modified run_quality_gate.py to allow skipping ESLint and Prettier checks
- Introduced .prettierrc for consistent code formatting
- Created .prettierignore to exclude specific files and directories from formatting
2026-03-28 14:14:28 +01:00
MajoorWaldi cb171e826d feat: Add runtime bootstrap helpers and search request normalization
- Introduced runtime bootstrap helpers in `mjr_am_backend.features.runtime` for dependency initialization.
- Implemented `apply_startup_settings` to handle various startup configurations.
- Added search request normalization helpers in `mjr_am_backend.features.search` including `SearchRequestContext` and `parse_search_request` for better query handling.
- Created audit logging helpers in `mjr_am_backend.routes.core.audit_log` for state-changing route handlers.
- Developed a quality gate script in `scripts/run_quality_gate.py` to enforce code quality checks.
- Added comprehensive tests for audit routes, scan consistency, vendor routes, and code quality metrics.
2026-03-26 20:42:51 +01:00
MajoorWaldi 459b12ac39 feat(viewer): add 3D model viewing support
- Implement basic 3D model thumbnail rendering with fallback icon
- Update viewer mode selection logic to handle 3D models
- Add checks for 3D model interactions in the viewer
- Extend drag & drop support to include 3D model assets
2026-03-16 23:47:08 +01:00
MajoorWaldi 04a3da6643 feat(assets): enhance tag handling and agenda calendar functionality
- Implement tag deduplication and improve tag normalization
- Add toggle behavior for agenda calendar day selection
- Display asset count badges on agenda calendar days
- Extend agenda calendar API to support additional filters
- Adjust grid controller to use semantic filter options
- Update backend scanner to notify about asset updates
2026-03-08 00:51:40 +01:00
MajoorWaldi 834ef1fef3 feat(docs): comprehensive AI features guide and new documentation
- Added new AI_FEATURES.md guide covering all AI-powered capabilities
- Updated DOCUMENTATION_INDEX.md to include new AI features guide
- Added AI Features section to README.md with overview and models used
- Improved backfill warning information in README.md
- Updated reset index / delete DB procedures in DB_MAINTENANCE.md
- Added configuration options for AI features in README.md
2026-03-06 12:43:46 +01:00
MajoorWaldi 29e5059c4d feat(ai): enhance asset alignment, captioning and tagging
- Add AI alignment score display to asset metadata
- Implement image description fallback for non-workflow image assets
- Improve AI captioning UI and UX
- Optimize AI tagging suggestions with bootstrap generation
- Refactor collections controller to support AI toggling
- Enhance error handling and retry logic for asset indexing
2026-03-05 02:21:13 +01:00
MajoorWaldi aaf16f4653 feat: Add new vector caption route and enhance search functionality
- Added a new POST route for caption generation at /mjr/am/vector/caption/{asset_id}.
- Enhanced result hydration in search to include AI-related metadata such as has_ai_info, has_ai_vector, has_ai_auto_tags, and has_ai_enhanced_caption.
- Updated deduplication logic in search results to ensure accurate total counts.
- Improved test coverage for database maintenance routes, including force delete and backup functionalities.
- Introduced new tests for hybrid search routes to validate scope filtering and ensure correct behavior with invalid inputs.
- Added functionality to bypass list gate in background scan initiation.
- Enhanced error handling and response validation in various search and scan routes.
2026-03-03 20:02:46 +01:00
MajoorWaldi 88a89372a2 feat: Enhance vector service with multimodal capabilities and logging settings
- Updated vector_service.py to support SigLIP2, X-CLIP, and Florence-2 models for embedding images, text, and video keyframes.
- Introduced AI verbose logging settings, allowing dynamic configuration of logging verbosity for model loading and inference.
- Modified database maintenance to backfill missing vectors for both image and video assets.
- Added health check routes for managing AI logging settings.
- Implemented enhanced caption generation for images using Florence-2.
- Updated vector search routes to include enhanced prompt generation and improved error handling.
- Added tests for new features, including enhanced prompt generation and dimension fallback mechanisms.
2026-03-03 00:15:58 +01:00
MajoorWaldi 0fa92e19c6 feat: Enhance vector service and database maintenance with HuggingFace token management
- Introduced functions to manage HuggingFace tokens in settings, including retrieval and updates.
- Added asynchronous routes for getting and setting HuggingFace token information.
- Implemented operation gates for delete, rename, and move operations in custom routes.
- Enhanced vector service with quiet encoding to suppress output during model encoding.
- Added retry logic for text embeddings to handle length constraints.
- Implemented vector backfill job management with status tracking and history pruning.
- Improved error handling in vector search routes and added logging for failures.
- Added tests for new HuggingFace settings routes and operation gate enforcement in database maintenance.
- Created tests for vector alignment and search routes, ensuring proper handling of exceptions and invalid inputs.
2026-03-02 20:13:04 +01:00
MajoorWaldi 83c2d19327 Add audit, hybrid search, and vector search functionalities
- Implemented library audit route to surface assets based on completeness and quality scores.
- Created hybrid search route combining FTS and semantic search with inline filter parsing.
- Developed vector search routes for semantic search, find-similar, and alignment score retrieval.
- Added auto-clustering utility for grouping assets by visual similarity using K-Means.
- Enhanced vector search capabilities with support for AI auto-tags and clustering suggestions.
2026-03-02 14:03:31 +01:00
MajoorWaldi 2240cbc74d feat(i18n): add tooltip translations for various UI elements
- Updated delete collection button title to use translation.
- Updated agenda calendar cell title for no assets to use translation.
- Updated asset manager panel titles and tooltips for various buttons and actions to use translations.
- Updated sidebar asset refresh tooltip to use translation.
- Updated status dot delete database button title to use translation.
- Updated floating viewer button titles to use translations for close, live stream, and capture view.
- Updated viewer toolbar button titles and tooltips to use translations for various modes and actions.
- Added performance metrics utility for tracking rendering and search query durations.
- Enhanced toast styling to include icons and improved layout.
2026-02-28 20:52:11 +01:00
MajoorWaldi 623cc346d5 Update documentation and enhance features for version 2.3.3
- Added versioning and last updated dates to multiple documentation files.
- Introduced new features in the Drag & Drop Guide, Hotkeys & Shortcuts Guide, Installation Guide, Ratings, Tags & Collections Guide, Search & Filtering Guide, Security Model & Environment Variables Guide, Settings & Configuration Guide, and Viewer Feature Tutorial.
- Enhanced the Hotkeys & Shortcuts Guide with new shortcuts for the Majoor Floating Viewer (MFV) and improved organization.
- Updated installation prerequisites to include full Linux support and clarified Python version compatibility.
- Improved the Testing documentation with detailed test coverage sections for both backend and frontend.
- Modified API client to ensure proper authentication token handling.
- Updated health route handlers to improve logging for token operations.
- Created a backup README file with comprehensive project information and installation instructions.
2026-02-28 18:51:24 +01:00
MajoorWaldi 08e07b5312 fix: replace silent catches with debug logging across multiple files
- Updated error handling in videoProcessor.js, videoProcessorWebGL.js, videoSync.js, viewerInstanceManager.js, and various utility files to log caught exceptions using console.debug.
- Introduced a new script to automate the replacement of silent catch blocks with logging statements.
- Enhanced safety checks in the database schema and transaction manager to prevent SQL injection vulnerabilities.
- Added regex patterns for validating column definitions and executable names in the ExifTool adapter.
- Improved error handling in health and filesystem routes to ensure better feedback on invalid inputs.
- Added tests to cover new error handling and validation logic.
2026-02-27 21:00:17 +01:00
MajoorWaldi e7c2443670 fix(security): improve API token handling and add server-side bootstrapping
- Move token from local to session storage on client side
- Set httpOnly cookie for server-side token on bootstrap/rotate
- Add token validation and auto-sanitization
- Implement retry logic for failed operations
- Add input validation for collection names
- Update toast durations and error handling
2026-02-27 10:09:44 +01:00
MajoorWaldi d1840910f4 fix(majoor): enhance security and reliability across frontend and backend
- Implement input validation and sanitization for various components
- Add checks to prevent symlink following and directory traversal attacks
- Introduce error handling and reporting improvements
- Optimize database queries and schema interactions
- Enhance file path handling in ffprobe adapter
- Refactor enrichment state management
- Improve grid view performance and stability
- Update panel state handling with sanitization
- Refine status dot functionality
- Add runtime store handling for assets deleted event
2026-02-26 19:05:09 +01:00
Your Name 966cf86f28 chore: commit current AssetsManager fixes 2026-02-19 16:36:55 +01:00
Your Name 657ddc4c8e feat: enhance filename handling and sanitization
- Added `splitNameExt` function to separate filename and extension.
- Implemented `normalizeRenameFilename` to preserve extensions during renaming.

fix: improve error handling in search queries

- Added checks for malformed match errors in `IndexSearcher`.
- Enhanced FTS query sanitization to remove reserved tokens and normalize case.

feat: implement security token management

- Introduced API token generation, hashing, and rotation in `AppSettings`.
- Added endpoints for rotating and bootstrapping security tokens.

fix: enforce write access across various routes

- Integrated `_require_write_access` checks in multiple route handlers to ensure proper authorization.

test: add unit tests for search query sanitization

- Created tests for sanitizing FTS queries, ensuring reserved tokens are removed and terms are lowercased.
2026-02-19 11:19:13 +01:00
Ewald da847f35f9 Add regression tests for route security guards
- Implement tests to ensure file paths are properly allowlisted in custom view and folder info handlers.
- Verify that collections mutations enforce CSRF protection and write access guards.
- Check that settings mutations require write access for specific routes.
2026-02-18 14:37:13 +01:00
Your Name 0debbd53a2 feat: Enhance context and custom roots management
- Added resetBrowserHistory functionality to contextController for better state management.
- Improved handling of custom root states in customRootsController, including resetting labels and paths.
- Removed unused refreshCustomRoots from scopeController.
- Updated sidebarController to provide more context in asset status updates.
- Introduced new folder details section in the sidebar to display folder metadata.
- Created pinned folders popover view for better folder management.
- Implemented custom status dot themes for improved visual feedback in asset status.
- Added folder info endpoint in the backend to retrieve folder statistics and metadata.
2026-02-15 23:44:26 +01:00
Your Name 7d306e201d Enhance ExifTool and Custom Roots Functionality
- Added asynchronous wrappers for ExifTool read and write operations to improve performance.
- Implemented trusted directory validation for ExifTool binary resolution to enhance security.
- Improved error handling in ExifTool commands, including detailed return codes for better debugging.
- Introduced a canonical path key function in custom roots to handle duplicate detection across case/format variants.
- Enhanced the list_custom_roots function to include offline and invalid states for better user feedback.
- Updated the IndexScanner to handle batch processing more robustly, including fallback mechanisms for individual processing.
- Refactored filesystem browsing and asset listing to support new sorting options and improve performance.
- Added a new test for recursive file iteration to ensure symlinked files are included correctly.
2026-02-14 19:53:46 +01:00
Ewald 42bc855749 feat: Enhance asset management with browser mode and custom root support
- Introduced browser mode for file operations, allowing users to interact with arbitrary file paths without prior indexing.
- Added functionality to resolve file paths from request bodies, supporting both asset IDs and direct file paths.
- Implemented new service methods for listing visible subfolders and filesystem entries, enhancing directory navigation.
- Updated asset routes to accommodate new file path handling, improving error responses and validation.
- Created a new FolderCard component for better UI representation of folders in the frontend.
- Added tests for browser service functionalities to ensure robustness and correctness.
2026-02-14 02:03:59 +01:00
Ewald 77fc6ffdcf feat: Enhance asset management with improved rename handling and foreign key updates 2026-02-13 17:39:42 +01:00
Ewald b700149b2d feat: Enhance metadata handling and fallback mechanisms
- Introduced fallback readers for metadata extraction when ExifTool/ffprobe are unavailable, utilizing Pillow and hachoir for images and media files respectively.
- Added settings for metadata fallback preferences, allowing users to toggle image and media fallback options.
- Implemented route collision logging to prevent overlapping API paths.
- Added middleware for authentication on sensitive routes, ensuring secure access.
- Updated API documentation to reflect new endpoints and settings.
- Enhanced unit tests for metadata handling, case sensitivity in file paths, and fallback mechanisms.
- Removed compatibility shims for shared modules, consolidating imports under mjr_am_shared.
2026-02-13 16:37:44 +01:00
Ewald 00ee7806f7 feat: Add tool detection helpers for ExifTool and FFprobe
- Implemented caching for tool availability and versions.
- Added functions to check for ExifTool and FFprobe availability.
- Included version satisfaction checks against minimum required versions.
- Created utility functions for parsing boolean and float values from environment variables.
- Introduced shared utilities for error message sanitization and logging with emoji indicators.
- Established a Result pattern for error handling without exceptions.
- Added scan throttling helpers to manage background scans efficiently.
- Implemented time utilities for timestamps and performance measurement.
- Defined shared types, enums, and constants for consistent error handling and file classification.
- Created version management utilities to retrieve version information from pyproject.toml.
- Developed installation script for runtime dependencies.
- Added tests for ExifTool batch processing and various configuration scenarios.
- Implemented tests for version route aliases and runtime output root configuration.
2026-02-12 17:55:28 +01:00
Your Name 5747000562 feat(config): increase DB query timeout to 60 seconds
feat(config): extend watcher debounce time to 3000 ms and add backward-compatible aliases for file size settings

feat(enricher): modify enrichment queue to support priority and add method to get queue length

feat(scanner): adjust batch size logic to incorporate initial and minimum batch sizes

feat(service): add runtime status method to expose enrichment queue length

feat(watcher): implement methods to flush pending files and get pending count

feat(watcher_scope): restrict watcher scope to output only for safety

feat(health): add runtime status endpoint for diagnostics including DB connections and watcher status

feat(scan): create endpoint to flush watcher pending queue and ensure scope is output only

docs: update DB query timeout documentation to reflect new default of 60 seconds

docs: revise security and settings documentation for updated DB query timeout

feat(api): add runtime status API client method and endpoint

feat(settings): introduce runtime status dashboard in the UI for monitoring DB and watcher metrics

fix(grid): enhance error messaging for asset loading failures and attach grid metrics display

test: add tests for watcher scope enforcement and flush functionality
2026-02-12 07:29:24 +01:00
Ewald c1b1c92576 Untrack restored files and ignore them (AGENTS, ROADMAP, VERSION, eslint.config.js) 2026-02-10 11:11:53 +01:00
Ewald 86578cd53a feat: Implement database backup and restore functionality with UI integration 2026-02-09 17:44:25 +01:00
Your Name 285e07518b feat: Enhance menu management and improve file path normalization 2026-02-08 23:53:17 +01:00
Your Name 825e93695a feat: Enhance grid management and asset loading
- Introduced a delay in registering major settings to ensure proper asset loading.
- Added `prepareGridForScopeSwitch` function to handle context switching more effectively by aborting in-flight requests and clearing the grid state.
- Updated asset loading functions to utilize the new preparation method during resets.
- Implemented a debounce mechanism for grid refresh events to improve performance.
- Enhanced the `renderAssetsManager` function to support abortable operations and prevent stale data during rapid context switches.
- Modified the `updateStatus` function to accept an abort signal for better control over HTTP requests.
- Improved event listener management in the `AssetsManagerPanel` to ensure cleanup and prevent memory leaks.
- Refactored grid controller and scope controller to support new lifecycle management features.
- Updated audio visualizer functions to improve naming consistency and maintainability.
2026-02-08 22:10:29 +01:00
Your Name 1646e2171b feat: Implement duplicate detection and similarity analysis features
- Added DuplicatesService for background duplicate analysis and similarity detection.
- Introduced endpoints for analyzing duplicates, checking status, and merging tags.
- Created utility functions for file hashing and perceptual hashing.
- Implemented watcher settings for runtime tuning of debounce and deduplication.
- Added database maintenance tools for resetting and deleting the database.
- Enhanced error handling with sanitization for client responses.
- Added tests for duplicates service and error handling.
- Updated ESLint configuration for better code quality checks.
- Introduced filename validation and logging utilities.
2026-02-08 15:11:17 +01:00
Your Name 4c38513a1e feat: add API token setup and storage for write authorization; enhance settings and localization 2026-02-07 11:20:58 +01:00
Ewald 640eccf422 chore: save workspace changes 2026-02-06 21:17:46 +01:00
Your Name cf56e1d70f feat: implement hard reset functionality for database with enhanced safety checks and user options 2026-02-04 00:58:02 +01:00
Your Name 19d0c605e2 feat: Enhance media handling and improve sidebar functionality
- Added cleanupCardMediaHandlers to reset media event handlers for images and videos in Card.js.
- Refactored showAssetInSidebar in SidebarView.js to improve asset loading and metadata fetching with better abort handling.
- Introduced cleanupMinimapSections to clean up sidebar sections when assets are shown.
- Improved grid message handling in GridView.js to provide clearer user feedback for asset loading states.
- Optimized VirtualGrid.js for better resize handling and rendering performance.
- Implemented debounced state saving in panelState.js to reduce unnecessary storage writes.
- Enhanced popover management in popoverManager.js with improved event handling and cleanup.
- Fixed WebGL context management in videoProcessorWebGL.js to handle context loss and restoration more gracefully.
- Adjusted image processing chunk size in imageProcessor.js for better performance.
- Updated lifecycle.js to observe the correct target node for DOM changes.
2026-02-03 22:46:50 +01:00
Your Name 16e9eaad37 Refactor: Enhance native metadata extraction strategy and add settings toggle 2026-02-03 20:34:23 +01:00
Your Name 892781074a Add utility functions for backend operations and improve error handling in core routes 2026-01-28 15:05:20 +01:00