# Changelog - Technodrome AI Content Assistant

## Version 4.0.6 - 2026-02-15

### DYNAMIC AI MODELS (API FETCH)
- **OpenAI:** Already had API fetch (`/v1/models`)
- **Google Gemini:** Now fetches models from API (`/v1beta/models`) instead of hardcoded list
- **DeepSeek:** Now fetches models from API (`/v1/models`) instead of hardcoded list
- **Cohere:** Now fetches models from API (`/v1/models`) instead of hardcoded list
- **Groq:** Now fetches models from API (`/v1/models`) instead of hardcoded list
- **Together AI:** Now fetches models from API (`/v1/models`) instead of hardcoded list
- **Mistral:** Now fetches models from API (`/v1/models`) instead of hardcoded list
- **Anthropic:** No public API - still uses hardcoded list (only provider without API)
- **Result:** 7 of 8 providers now use dynamic API fetch - users always see latest models

### UI IMPROVEMENTS
- **Numbered Fields:** Added step numbers to AI Provider (1.), API Key (2.), AI Model (3.)

---

## Version 4.0.5 - 2026-02-15

### CODE QUALITY IMPROVEMENTS
- **Added PHP 8.0+ Type Hints:** All AJAX handler methods now have return type declarations (`: void`)
  - 29 static methods updated with proper return types
  - Improved code documentation and IDE support
  - Better type safety

---

## Version 4.0.5 - 2026-02-15

### WOOCOMMERCE HPOS COMPATIBILITY
- **Added WooCommerce HPOS Support:** Plugin now compatible with WooCommerce High-Performance Order Storage
  - Uses standard WordPress CRUD functions (wp_insert_post, get_post, get_post_meta)
  - No custom SQL queries that could break with HPOS
  - Tested with WooCommerce 7.0 - 9.0

---

## Version 4.0.5 - 2026-02-15

### CODE QUALITY IMPROVEMENTS
- **AJAX Handler Refactoring (DRY Principle):** Created centralized `sanitize_profile_data()` method to eliminate code duplication
  - Replaced 3 duplicate code blocks with single method call
  - Reduced ~100 lines of redundant code
  - Improved maintainability and consistency

- **Removed Fake View Data:** Replaced simulated random view counts with "N/A"
  - WordPress doesn't have built-in view counter (unlike Joomla)
  - Fake data was misleading to users
  - Now shows "N/A" when no analytics plugin tracks views
  - Files affected: class-ajax-handler.php, history.php

---

## Version 4.0.3 - 2026-01-21

### CRITICAL BUG FIXES
- **Structure Name Not Persisting + Profile Button Not Updating:** CRITICAL FIX - Structure Name now saves and updates profile button names
  - Problem: structure_name was collected and saved but profile buttons weren't being updated with the value
  - Root Cause: updateProfileButtonsStatus() didn't ažurirati button text; switchProfile() wasn't calling it
  - FIX #1: Enhanced updateProfileButtonsStatus() to extract structure_name from profile and display on button (max 7 chars, uppercase)
  - FIX #2: Added updateProfileButtonsStatus() call in switchProfile() to update button when profile changes
  - FIX #3: Fixed 500ms debounce for structure_name changes (was 3000ms) for faster response
  - FIX #4: Fixed save_profile() to properly handle update_user_meta false return (false = data identical, not an error)
  - Result: Structure Name now serves as profile nickname - type "SPORT" and button shows "SPORT" instead of "Profile 1"

- **Default Tone AutoSave:** Fixed Default Tone field not saving to profile
  - Added missing DefaultTone sync in loadCompleteProfileData()
  - Default Tone now persists correctly across profile switches

---

## Version 4.0.2 - 2026-01-21

### NEW FEATURES
- **Custom Profile Names:** Rename profiles (Profile 1-6) with custom 7-character labels for better organization
  - Type in Structure Name field → Profile button updates instantly
  - Examples: SPORT, NEWS, BLOG, TECH for quick identification
  - Names persist across sessions

### IMPROVEMENTS
- Enhanced profile navigation and identification
- Simplified profile management workflow

---

## Version 4.0.1 - 2026-01-21

### NEW FEATURES
- **Dual Tab Navigation:** Access tab controls from both top and bottom of dashboard
  - Better UX for long content areas
  - Automatic synchronization between top and bottom tabs
  - Smooth auto-scroll when clicking bottom navigation

### IMPROVEMENTS
- Visual enhancement with blue gradient active tab highlighting
- Improved navigation accessibility
- Enhanced visual feedback for tab selection

---

## Version 4.0.0 - 2025-12-28

### NEW FEATURES
- **Credit Toggle Control:** PRO/PREMIUM users can optionally hide Technodrome credits from generated articles
  - FREE users: Credits are mandatory (toggle disabled)
  - PRO/PREMIUM users: Can toggle credits YES/NO globally

- **Auto-Reset on License Changes:** Automatically resets to FREE tier when:
  - License key is removed
  - License key becomes invalid
  - License expires

### IMPROVEMENTS
- Better license management experience
- Cleaner article footer control for premium users
- Automated license state management

---

## Version 3.8.3 - 2026-01-04

### IMPROVEMENTS
- **License Key Format Flexibility:** License keys now accept multiple formats
  - Automatic format normalization (spaces → dashes)
  - Paste keys in any format, plugin handles conversion
  - Reduces validation errors and user frustration

---

## Version 3.8.0 - 2025-12-20

### IMPROVEMENTS
- Enhanced model availability system across all AI providers
- Improved model loading reliability

---

## Version 3.5.3 - 2025-12-28

### NEW FEATURES
- **License Expiration Monitoring:** Automatic detection of expired licenses
  - Auto-resets to free tier on page load when license expires
  - Displays expiration banner for awareness
  - Seamless transition without disrupting workflow

---

## Version 3.5.1 - 2025-12-16

### NEW FEATURES
- **Clear Model Cache:** One-click button to refresh AI model lists
  - Eliminates 24-hour wait for new models to appear
  - Useful when upgrading to new API plans or changing API keys

### IMPROVEMENTS
- Faster model availability updates
- Better support for API changes without waiting

---

## Version 3.5.0 - 2025-12-16

### IMPROVEMENTS
- Enhanced API key validation performance
- Reduced redundant API calls during profile operations
- Better error messaging for API issues
- Improved stability for all AI providers

---

## Version 3.3.3 - 2025-12-13

### BUG FIXES
- Fixed AI image generation toggle behavior
- Improved model capability detection accuracy

---

## Version 3.3.2 - 2025-12-13

### BUG FIXES
- Fixed article generation with custom layout templates
- Enhanced template initialization stability

---

## Version 3.3.1 - 2025-12-13

### BUG FIXES
- Fixed API key handling and validation across all providers
- Improved data integrity during profile operations

---

## Version 3.3.0 - 2025-12-13

### NEW FEATURES
- **AI Image Generation:** Automatically generate featured images for articles using DALL-E 3
  - Works with OpenAI API
  - Generated images auto-saved to WordPress Media Library
  - Images set as featured images for articles
  - Non-blocking: Article generation continues even if image generation fails

### IMPROVEMENTS
- Real-time model capability detection
- Visual indicators for image-capable models
- Better image generation error handling

---

## Version 3.2.9 - 2025-12-09

### IMPROVEMENTS
- Enhanced schedule publishing with full template support
- Scheduled articles now use selected layout templates
- Better category handling in scheduled posts

---

## Version 3.2.7 - 2025-11-22

### IMPROVEMENTS
- Production code cleanup
- Improved performance and code quality

---

## Version 3.2.6 - 2025-11-20

### NEW FEATURES
- **Global Video System:** 2 video slots for adding videos to custom layouts
  - Support for YouTube, Vimeo, TikTok, X/Twitter, Instagram
  - Auto-embed conversion for proper display
  - Videos persist globally across profiles

### BUG FIXES
- Fixed character encoding for international languages (Serbian Cyrillic, etc.)
- Improved UTF-8 handling across the plugin

---

## Version 3.2.5 - 2025-11-04

### IMPROVEMENTS
- Enhanced web sources integration for better AI research
- Improved URL validation and feedback
- Better integration of sources into AI prompts

---

## Version 3.2.3 - 2025-10-16

### BUG FIXES
- Fixed custom template layout persistence after login
- Improved canvas preview reliability across profile switches

---

## Version 3.2.2 - 2025-10-14

### NEW FEATURES
- **Full Interface Localization:** Complete translations for 8 languages
  - Spanish, French, Serbian, Russian, German, Japanese, Chinese
  - Automatic language switching based on WordPress settings
  - Fallback to English for missing translations

---

## Version 3.2.1 - 2025-10-13

### IMPROVEMENTS
- Enhanced template positioning and naming

---

## Version 3.2.0 - 2025-10-12

### NEW FEATURES
- **Bulk Article Generation:** Generate multiple articles in one session
  - Batch processing (1-5 articles at a time)
  - Real-time queue management with Pause/Resume/Cancel
  - Live statistics and progress tracking
  - Intelligent delays to prevent API throttling
  - Error recovery and tracking

### IMPROVEMENTS
- Enhanced queue visualization
- Better progress estimation
- Improved error handling for batch operations

---

## Version 3.1.1 - 2025-10-11

### BUG FIXES
- Improved custom template canvas persistence
- Better async module initialization handling

---

## Version 3.1.0 - 2025-10-10

### NEW FEATURES
- **Content Structure Builder:** Organize and structure AI-generated content
  - Custom structure naming
  - Writing guidelines editor for AI instructions
  - Web sources input with validation
  - Real-time structure preview

### IMPROVEMENTS
- Enhanced AI content quality with improved token management
- Better Unicode character support for international languages
- Improved template persistence across sessions

---

## Version 3.0.0 - 2025-10-09

### NEW FEATURES
- **Custom Builder (Template 6):** Revolutionary drag & drop canvas system
  - Create custom article layouts with multiple elements
  - Draggable components: AI Text, Photos, Custom Text, Videos, Embeds
  - Full canvas persistence in user profiles
  - Real-time preview and layout editing

### IMPROVEMENTS
- Enhanced progress notifications during generation (7-step detailed feedback)
- Better layout template organization
- Improved visual feedback during content creation

---

## Version 2.7.1 - 2024-10-08

### NEW FEATURES
- **Photo Links:** Make article images clickable with custom URLs
  - Images link to custom destinations
  - Automatic target="_blank" for new tab opening
  - Persistent across profile switches

---

## Version 2.6.1 - 2025-10-07

### IMPROVEMENTS
- **Dynamic History Tab:** Fully AJAX-powered history management
  - No page reloads needed for any action
  - Auto-switch to History tab after article generation
  - Instant inline deletion with animations
  - Real-time list updates

---

## Version 2.6.0 - 2025-10-06

### IMPROVEMENTS
- Robust HTML parsing for reliable image insertion
- Better photo position data handling
- Improved photo persistence across operations

---

## Version 2.5.0 - 2025-09-15

### NEW FEATURES
- **Schedule Publishing:** Automated content generation and publishing
  - Schedule articles for future dates and times
  - Set content generation parameters in advance
  - Automated publishing at scheduled time
  - PRO/PREMIUM feature

### IMPROVEMENTS
- Better scheduler statistics filtering
- Improved user-specific scheduling

---

## Version 2.4.2 - 2025-09-10

### IMPROVEMENTS
- Enhanced user interface for content title input
- Improved visual feedback for generate button

---

## Version 2.4.0 - 2025-09-05

### IMPROVEMENTS
- Simplified content generation logic
- Better data flow from profiles to generation
- Improved reliability and predictability

---

## Version 2.3.0 - 2025-08-28

### NEW FEATURES
- **Default Tone Selector:** Set consistent writing tone for content
  - Available for all generation modes
  - Persists across articles

### IMPROVEMENTS
- Better notification handling
- Enhanced dark mode support
- Visual refinements throughout

---

## Version 2.2.0 - 2025-08-20

### IMPROVEMENTS
- Enhanced footer with real-time profile statistics
- Better output escaping for security
- Improved plugin check compliance

---

## Version 2.1.0 - 2025-08-15

### IMPROVEMENTS
- Overhauled license validation system
- Unified nonce system across all AJAX calls
- Better error handling and initialization

---

## Version 2.0.0 - 2025-08-01

### MAJOR REWRITE
- Complete plugin architecture modernization
- Modular design with separated concerns
- Multiple AI provider integration (OpenAI, Anthropic, Google, DeepSeek, Cohere)
- User profile system (6 profiles)
- Layout templates with media integration
- Content rules system
- Schedule publishing and bulk generation
- Dark mode support
- Comprehensive license system
- Enhanced security measures

---

## Version 1.0.0 - 2025-07-01

### INITIAL RELEASE
- Basic AI article generation
- Simple profile management
- Basic layout and interface
