89 Commits

Author SHA1 Message Date
1a35eb346e chore: reorganize repo layout, remove dead files
- Move phase/plan docs into docs/
- Move legacy node:test files into tests/legacy/ with README
- Remove .backup file, test audit artifacts, and unused AI prompt/skill files
- Remove broken iOS GitHub workflows (reference missing MovieMapper-iOS/)
2026-08-20 20:11:57 +00:00
3d5537d3cc Merge remote changes 2026-08-19 21:23:54 -05:00
00d8e072c5 feat: Add Rust UI and backend implementation with project infrastructure
Adds the new Rust-based UI (iced), backend service, shared Swift models,
CI/CD workflows, build scripts, and project documentation.
2026-08-19 21:22:08 -05:00
Agent
98f71fc21f ci: use gitea-job-image (Python+Node+Git unified) 2026-07-06 18:48:02 +00:00
Agent
0200c848fb ci: trigger re-run 2026-07-06 18:35:24 +00:00
jarianc
7102dbe78b Merge pull request 'test: add Vitest suite with 86% coverage threshold' (#16) from feat/add-tests into main
Reviewed-on: https://git.home.ms/jarianc/MovieMapper/pulls/16
2026-07-06 00:02:32 -05:00
Jarian
e41103b9cc ci: use node:20-bookworm image for test/lint/security jobs 2026-07-06 05:00:05 +00:00
Jarian
0f04fe39f4 chore: remove coverage artifacts from git 2026-07-06 04:54:44 +00:00
Jarian
56351b277e test: add Vitest suite with 86% coverage threshold
- Add Vitest + jsdom test framework with V8 coverage
- 118 tests across 7 test files covering AppState, ProgressManager, EpisodeManager, FileListManager, fileUtils, main.js logic, renderer escapeHtml, preload module polyfill
- Fix async bug in extractFileDuration (await in non-async callback)
- CI enforces 85% coverage threshold on testable modules
- Exclude Electron IPC wrappers (FileManager, SearchManager, TagManager, ModalManager, UIManager) from coverage as they require Electron runtime
2026-07-06 04:54:40 +00:00
jarianc
edadfe20dd Merge pull request 'Fix #10: Replace sync fs calls with async in fileUtils.js' (#15) from fix/async-fs into main
Reviewed-on: https://git.home.ms/jarianc/MovieMapper/pulls/15
2026-07-05 02:38:32 -05:00
jarianc
c19a0d3e40 Merge branch 'main' into fix/async-fs 2026-07-05 02:37:42 -05:00
opencode
70273d37ce fix #10: replace sync fs calls with async in fileUtils.js 2026-07-05 07:36:50 +00:00
jarianc
3e41a5704c Merge pull request 'Fix #11: Remove vim swap file, harden .gitignore' (#14) from fix/gitignore-swap into main
Reviewed-on: https://git.home.ms/jarianc/MovieMapper/pulls/14
2026-07-05 02:36:19 -05:00
opencode
345f9583c3 fix #11: remove vim swap file, add swap patterns to .gitignore 2026-07-05 07:33:30 +00:00
jarianc
9770a703c5 Merge pull request 'Fix #3,#4,#5,#6,#7,#8,#9: Security hardening - Electron context isolation, XSS fixes, command injection fix' (#13) from fix/security-all into main
Reviewed-on: https://git.home.ms/jarianc/MovieMapper/pulls/13
2026-07-05 02:33:02 -05:00
opencode
8a29c4bc96 security: harden Electron app - context isolation, preload, fix XSS & command injection
- Enable contextIsolation, disable nodeIntegration, remove enableRemoteModule
- Add preload.js with safe contextBridge API exposure
- Fix OS command injection: exec() → execFile() in open-file-in-player
- Fix DOM XSS: replace innerHTML with textContent/createElement in FileListManager, UIManager, ModalManager
- Remove direct fs/electron access from renderer, route through IPC
- Add validate-folder and get-file-stats IPC handlers
- Load renderer modules via script tags with require polyfill
2026-07-05 07:31:06 +00:00
jarianc
362af53648 Merge pull request 'CI: remove --no-cache for docker layer caching' (#12) from ci-fix-nocache into main
Reviewed-on: https://git.home.ms/jarianc/MovieMapper/pulls/12
2026-07-04 22:23:25 -05:00
Jarian
1ad37a3df9 CI: remove --no-cache for docker layer caching 2026-07-05 03:13:22 +00:00
Jarian
92905a22d0 CI: add generalized workflow 2026-07-05 02:46:33 +00:00
Jarian Cottingham
323df5de2e feat: Add Rust implementation for performance-critical components
- Implement core Rust backend with FFmpeg integration
- Add TheTVDB API client with token caching
- Implement directory scanner with progress callbacks
- Create file manager with rename and move operations
- Add audit logging functionality
- Implement file mapping for TV episode renaming
- Build Node.js native addon via NAPI
- Include comprehensive unit and integration tests
- Update gitignore to exclude build artifacts and temp files

Resolves #TBD
2026-02-28 09:52:08 -06:00
Jarian Cottingham
4764bedafc Add file editing via double-click and fix TVDB ID appending logic
- Add double-click handler to make file names editable in UI
- Remove duplicate IPC handler for rename-file in renderer.js
- Fix checkEpisodeCountMatch to properly validate sequential episodes
- Fix begin-mapping to handle both season folder and show folder cases
- Improve open-file-in-player handler to properly log results
2026-02-26 19:20:15 -06:00
Jarian Cottingham
ec8af7782d fix: Implement proper tagging feature with file movement
- Fix handleTagClick to unselect other tags when selecting new tag
- Add handlePlayButtonClick to move individual tagged files
- Add 'behind-the-scenes' tag support to main.js
- Map tag types to Jellyfin-compatible folder names
- Add comprehensive test coverage (24 new tests)
- Fix displayCreatedFolder folder name mapping issue

This implements the full tagging workflow: tag a file with extra/
behind-the-scenes/delete, then click play button to move it to the
appropriate folder.
2026-02-25 10:13:05 -06:00
Jarian Cottingham
1400a593a6 Add handleTagClick method and event listeners for tag icons 2026-02-25 09:15:19 -06:00
Jarian Cottingham
c82c5b9138 Fix behind-the-scenes tag class name and tagType consistency 2026-02-25 09:13:19 -06:00
Jarian Cottingham
ccf136fe2b Change behind-the-scenes icon from clapperboard to movie camera 2026-02-25 09:10:55 -06:00
Jarian Cottingham
a47857681e Rename commentary tag to behind-the-scenes (Jellyfin compatible) 2026-02-25 09:09:52 -06:00
Jarian Cottingham
03586ee420 Fix episode arrow buttons and expand test suite to 111 tests 2026-02-25 08:42:52 -06:00
Jarian Cottingham
f0f423c2f1 Update comprehensive test suite with improved mocks
- Improved mock element implementation with proper innerHTML/textContent support
- Added getElementById mock that returns different elements based on ID
- Enhanced querySelectorAll mock for episode number queries
- Fixed isUpdatingEpisodeNumbers test to access property directly
- Tests now show 41/70 passing with improved mocks
2026-02-25 08:15:55 -06:00
Jarian Cottingham
4d7d476a44 Refactor renderer.js into modular class-based architecture
- Split renderer.js into 9 manager classes following SOLID principles:
  * AppState - State management
  * EpisodeManager - Episode numbering and range editing
  * TagManager - File tagging system
  * SearchManager - TheTVDB search integration
  * FileManager - Directory and file operations
  * ModalManager - Video preview modals
  * ProgressManager - Progress display
  * FileListManager - File list rendering and drag/drop
  * UIManager - Main UI coordinator

- Add comprehensive test suite (test-renderer-classes-comprehensive.js)
  with 100+ tests covering all business logic
- Fix drag/drop handler 'this' binding issues
- Add CSS for highlighted episodes and improved file list styling
- Restore all original functionality including episode cascading,
  tagging system, TVDB search, and Jellyfin naming
2026-02-25 02:47:35 -06:00
Jarian Cottingham
759139a6f8 Add comprehensive test coverage for renderer class refactoring
- Added test-renderer-classes.js with tests for all 8 new class files
- Updated test-functional.js to match new code structure
- All tests passing:
  * 4 renderer class tests (AppState, EpisodeManager, ProgressManager, imports)
  * 9 audit system tests
  * 4 functional tests
- Syntax verified with node --check
2026-02-25 02:33:37 -06:00
Jarian Cottingham
d0c70ca3e2 Refactor renderer.js into modular class-based structure
- Split large renderer.js file into 8 separate class files:
  - AppState.js: Manages application state
  - FileListManager.js: Handles file list display and manipulation
  - TagManager.js: Manages file tagging functionality
  - EpisodeManager.js: Handles episode number editing and highlighting
  - SearchManager.js: Manages TVDB search and show selection
  - FileManager.js: Handles file operations
  - ModalManager.js: Manages video preview modal
  - ProgressManager.js: Manages progress display
  - UIManager.js: Main coordinator for UI functionality
- Follows SOLID principles and single responsibility
- Improves code maintainability and testability
- All syntax verified with node --check
2026-02-25 02:32:08 -06:00
Jarian Cottingham
102167a365 Fix episode range format to include E prefix on both episodes
- Changed S05E01-03 to S05E01-E03 (proper format with E prefix on end episode)
- File now names correctly as 'Demon Slayer S05E01-E03 - 1080p.mkv'
2026-02-25 00:34:16 -06:00
Jarian Cottingham
76aa2b905d Fix show name extraction to remove leading semicolons
- Add regex to strip leading semicolons/colons from show folder name
- This fixes filenames like ';Demon Slayer S05E01-03' -> 'Demon Slayer S05E01-03'
2026-02-25 00:33:07 -06:00
Jarian Cottingham
52678d3c47 Fix episode number arrow cascade and remove Update Ranges button
- Add isUpdatingEpisodeNumbers flag to prevent re-entrant calls
- Arrow buttons now properly cascade shifts to all subsequent episodes
- Remove Update Ranges button and associated code
- Remove DevTools auto-open for cleaner release
- Syntax validation passes
2026-02-25 00:24:54 -06:00
Jarian Cottingham
ead563ab54 Fix arrow button episode number cascading - all subsequent episodes now shift correctly 2026-02-25 00:17:51 -06:00
Jarian Cottingham
14c1bac5e8 Add Begin Mapping feature with Jellyfin naming, fix tvdbid regex 2026-02-22 03:08:51 -06:00
Jarian Cottingham
f9aee85e4f Add delete tag, episode count matching indicator, fix season episode counts 2026-02-22 02:33:41 -06:00
Jarian Cottingham
83f3ec4ec4 MKV opens directly in player, improved search results contrast, updated AGENTS.md 2026-02-22 02:04:30 -06:00
Jarian Cottingham
ecf75036ed Clean up UI with dark theme and improved layout 2026-02-22 01:42:20 -06:00
Jarian Cottingham
13fd64aa9d Fix play button, add progress spinner, folder navigation, and UI improvements 2026-02-22 01:38:48 -06:00
Jarian Cottingham
7109e1e513 Clean up all duplicate path declarations in main.js 2026-02-21 16:06:16 -06:00
Jarian Cottingham
35f9969c80 Add startup log file creation with error handling 2026-02-21 16:03:47 -06:00
Jarian Cottingham
7813490a72 Fix duplicate path declaration properly 2026-02-21 15:59:15 -06:00
Jarian Cottingham
37d90ab836 Fix duplicate variable declaration in main.js 2026-02-21 15:58:48 -06:00
Jarian Cottingham
5b3f72e7ee Add debug logging to file moving functionality 2026-02-21 15:58:08 -06:00
Jarian Cottingham
c2cd8986d0 Add comprehensive debugging to move functionality 2026-02-21 15:53:45 -06:00
Jarian Cottingham
51ffed0d2d Add detailed logging to file moving functionality for debugging 2026-02-21 15:51:42 -06:00
Jarian Cottingham
3794289de5 Fix missing play button click handler and add debugging 2026-02-21 15:50:26 -06:00
Jarian Cottingham
af2814ce2f Add directory creation feedback and improve move functionality 2026-02-21 15:49:02 -06:00
Jarian Cottingham
d9bf4a5f88 Add functionality to move tagged files to extra/commentary folders 2026-02-21 15:47:48 -06:00