training-academy/docs/VERSION_0.51_BUGFIXES.md

10 KiB

Version 0.51 - Bug Fixes & Improvements

Date: December 7, 2025

Library Management System Updates

Multi-Directory Selection

  • Added ability to select multiple directories at once when linking to library
  • Updated Electron API select-directory handler to support multiSelections property
  • Modified directory handlers for both images and videos to process arrays of paths
  • Updated button text to "Add Directory(ies)" to indicate multi-selection support

Library Container & Display

  • Increased library container width from 1400px to 95vw for better screen utilization
  • Added max-height of 75vh to image/video galleries with scrolling for better visibility
  • Improved ability to see more rows at once without excessive scrolling

Tag-Based Filtering System

Image Library

  • Implemented dynamic tag filter dropdown that populates with all available tags
  • Added "Untagged" filter option to show images without tags
  • Fixed tag manager not being globally accessible as window.globalMediaTagManager
  • Added automatic filter refresh when tags are created/modified
  • Corrected method name from getMediaTags() to getTagsForMedia()

Video Library

  • Implemented tag-based filtering for videos (matching image library functionality)
  • Added populateVideoFilterTags() function to dynamically load tags
  • Added filterVideosByCategory() function with tag support
  • Removed duplicate/obsolete video filter function that was causing errors
  • Added "Untagged" filter option for videos

Video Library UI Improvements

  • Removed dedicated "Preview" button from video items
  • Made video thumbnails clickable to open preview
  • Improved disable/enable button styling (full width, better spacing)
  • Streamlined video item layout for cleaner appearance

Video Directory Management

  • Fixed video directory unlinking not working properly
  • Updated ID type handling to support both string and number formats
  • Enhanced directory matching with comprehensive fallback checks
  • Added debug logging to troubleshoot ID mismatches

Tag System Integration

  • Exposed window.globalMediaTagManager and window.globalMediaTagUI globally
  • Added filter repopulation on tag changes via callback system
  • Integrated tag filtering into library refresh workflow

Technical Fixes

Code Quality

  • Removed duplicate filterVideosByCategory() function causing TypeError
  • Added null/undefined checks to prevent .toLowerCase() errors
  • Improved error handling and logging throughout filter functions

Data Consistency

  • Fixed ID comparison issues between localStorage and desktopFileManager
  • Added type conversion for directory IDs (string ↔ number)
  • Enhanced directory removal to handle multiple ID formats

Known Issues

  • None currently reported

Quick Play Popup Messages

Message Editing

  • Fixed edit button now uses modal dialog instead of non-functional prompt()

UI Simplification

  • Removed category and priority tagging system from message management
  • Removed category filter dropdown from message list
  • Removed category badges from individual messages
  • Simplified message statistics to show only total/enabled/disabled counts

Appearance Controls

  • Removed background color feature entirely (messages always transparent)
  • Removed background color picker and remove-background checkbox
  • Increased font size slider maximum from 48px to 300px for screen-filling text
  • Added proportional max-width scaling (messages stretch wider with larger font sizes)
  • Fixed preview style button to show test messages with current settings

Quick Play Popup Images

Frequency Controls

  • Added "Custom Range" option to frequency dropdown
  • Added conditional enable/disable for custom interval inputs (greyed out unless "Custom Range" selected)

UI Cleanup

  • Removed testing section (test buttons non-functional without library initialization)

Video Display Fixes

Portrait Video Support

  • Fixed portrait videos being cropped in Quick Play gameplay (changed object-fit from cover to contain)
  • Fixed portrait videos being cropped in cyberpunk billboard on index page (changed object-fit from cover to contain)

Global Settings

TTS (Text-to-Speech)

  • Unified TTS toggle setting across Campaign and Training Modules (saved to shared localStorage)
  • Fixed TTS state now persists when switching between Campaign and Training Modules

User Profile System

Profile Popup Integration

  • Converted user-profile.html into popup modal on index.html (matching game guide pattern)
  • Added popup backdrop with click-to-close functionality
  • Added Escape key support to close profile popup
  • Updated profile button to open popup instead of navigating to separate page
  • Integrated with existing popup system (backdrop, classList toggle, body overflow control)

Profile Features

  • Profile Management

    • Avatar upload with circular display (supports custom images)
    • Username and bio editing
    • Join date display
    • Theme preference selector
    • Save profile changes with success notifications
  • Statistics Display

    • Real-time stats updates (every 30 seconds while popup open)
    • Quick stats: Total Watch Time, Videos Watched, Total XP, Current Level, Day Streak, Playlists Created
    • Level progress bar with XP tracking
    • Detailed statistics: Days Active, Longest Streak, Videos Added to Playlists, Videos Skipped, Binge Sessions, Most Watched Video
    • XP breakdown by game mode (Quick Play, Cinema, Scenario)
    • Activity timeline (First Play Date, Last Activity)
  • Achievement System

    • 10 unlockable achievements with icons
    • Visual locked/unlocked states
    • Achievements include: First Taste, Eager Explorer, Marathon Session, Pleasure Curator, Addiction King, Passionate Soul, Lustful Awakening, Kinky Elite, Depraved Master, Desire Collector
  • Data Management

    • Export profile (JSON with profile + stats)
    • Import profile (restore from JSON backup)
    • Export statistics (detailed stats JSON)
    • Export player card (visual PNG image)
    • Reset all statistics (with confirmation)
    • Reset profile (with confirmation)

Player Card Export

  • Added visual player card generator with cyberpunk aesthetic

  • Design Features

    • Landscape format (1200x675, 16:9 aspect ratio)
    • Dark background with cyberpunk grid pattern
    • Neon purple and pink glowing borders and accents
    • Hexagonal profile picture mask with glowing borders
    • Glowing text effects throughout
  • Card Content

    • "[ PLAYER ID ]" header with neon glow
    • Large username display with pink glow
    • Rank box showing level icon, rank name, and level number
    • XP box displaying total XP with glow effects
    • Corner accents on info boxes (cyberpunk style)
    • Terminal-style footer with member since date
    • "● SYSTEM ONLINE" status indicator
  • Technical Implementation

    • Canvas-based image generation
    • Profile picture integration (or avatar letter if no image)
    • Real-time stats from PlayerStats system
    • Level calculation with rank names and icons
    • Downloads as PNG: [Username]-PlayerCard.png
    • Success notification on export

Technical Integration

  • UserProfile Class with full profile and stats management
  • Global helper functions for all profile operations
  • Initialization system matching game guide popup pattern
  • Stats synchronization with PlayerStats system
  • Level system integration with exponential XP requirements (20 levels)
  • Responsive design with mobile support
  • Theme-aware styling using CSS variables

Tag Modal UX Improvements

Modal Interaction

  • Removed X close buttons from all tag modals across the application
  • Added click-away-to-close functionality (click dark overlay to dismiss)
  • Updated modals affected:
    • Tag Management Modal (mediaTagUI.js)
    • Single Item Tag Modal (libraryTaggingIntegration.js)
    • Bulk Tag Modal (libraryTaggingIntegration.js)
    • Campaign Tag Modal (campaignTagging.js)
    • Campaign Help Modal (campaignTagging.js)
    • Quick Tag Modal (globalTaggingInit.js)

Technical Implementation

  • Added .modal-overlay CSS with proper z-index layering and full-screen coverage
  • Fixed event handlers to use e.target === e.currentTarget pattern for overlay-only click detection
  • Enhanced modal overlay styling with backdrop blur effect
  • Maintained compact modal sizing for optimal screen space usage

Page Architecture

  • Created hypno-menu.html landing page with mode selection cards
  • Separated into dedicated pages: hypno-single.html (single slideshow) and hypno-grid.html (2x2/3x3 grid)
  • Updated hypno-gallery.html to redirect to menu
  • Added Quick Play-style headers with cross-navigation (Home/Single/Grid) and theme switcher

Grid Mode Enhancements

  • Streamlined UI: Removed playlist management, control buttons, progress bars, and dropdown assignments
  • Click-to-Assign: Click any grid cell to open modal with slideshow selection list
  • Modal Features: Shows all slideshows with image counts, clear assignment option, cyberpunk styling, click-away-to-close
  • Randomization: Fisher-Yates shuffle and random starting index for each cell independently
  • Background Support: Fixed solid/gradient/blurred backgrounds to work with gridContainer

Visual Improvements

  • Floating Action Buttons: 80px circular buttons (gradient, glow, pulse animation) for starting slideshows
  • Menu Cards: Large icons, hover effects, feature lists for mode selection
  • Grid Cells: Cursor pointer, "Click to assign" text, removed progress indicators

Technical Fixes

  • Fixed slideshow loading timing and initialization sequence
  • Fixed background application with automatic setup on grid layout
  • Fixed template literal syntax errors in cell initialization
  • Removed references to non-existent UI elements
  • Added shuffleArray() method to GridCell class

Next Version: 0.52 (Planned)