Version 1.8.1

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-18 15:18:25 +00:00
parent ebc4088ccb
commit 6c69ca3feb
5 changed files with 302 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
# IGNY8 Change Log
**Current Version:** 1.8.0
**Last Updated:** January 17, 2026
**Current Version:** 1.8.1
**Last Updated:** January 18, 2026
---
@@ -9,6 +9,7 @@
| Version | Date | Summary |
|---------|------|---------|
| 1.8.1 | Jan 18, 2026 | **Automation Scheduling Overhaul** - Hourly scheduling (replaces 15-min windows), DefaultAutomationConfig singleton for centralized defaults, test mode for admin testing, Reset button fetches from backend, new migrations 0009-0012 |
| 1.8.0 | Jan 17, 2026 | **Major** - Unified Settings Consolidation: AI & Automation settings merged into Site Settings > Automation tab; Navigation Refactor Complete; Automation Overview & Run Detail pages; Publishing & Scheduling UX improvements; Skip Stage configuration; Content Calendar fixes |
| 1.7.6 | Jan 15, 2026 | **Navigation Refactor Complete** - Complete sidebar restructure, new Automation Overview page, Publish Settings page, Content Calendar improvements |
| 1.7.5 | Jan 14, 2026 | **Automation Overview** - New dashboard for automation runs, detailed run history, real-time progress tracking |
@@ -47,6 +48,185 @@
---
## v1.8.1 - January 18, 2026
### Automation Scheduling Overhaul & Centralized Default Settings
This release introduces a complete overhaul of the automation scheduling system, moving from 15-minute window checking to hourly scheduling. It also introduces the `DefaultAutomationConfig` singleton model for centralized default settings management, test mode functionality for admins, and backend-driven reset functionality for the frontend.
---
### ⏰ Hourly Scheduling System
**Previous Behavior (v1.8.0):**
- Celery checked every 15 minutes for automations within a 15-minute window
- Complex time window calculations prone to edge cases
**New Behavior (v1.8.1):**
- Celery checks **every hour at `:05`** (`crontab(minute=5)`)
- Simple hour matching: `scheduled_hour == current_hour`
- Users select hour only (12-hour AM/PM format in UI, stored as 24-hour `HH:00`)
**Celery Beat Schedule:**
| Task | Schedule | Purpose |
|------|----------|---------|
| `check_scheduled_automations` | Every hour at `:05` | Check if automations should run |
| `check_test_triggers` | Every minute | Check for admin test triggers |
| `schedule_approved_content` | Every hour at `:00` | Schedule approved content |
| `process_scheduled_publications` | Every 5 minutes | Publish scheduled content |
---
### 🔧 DefaultAutomationConfig Model
**New Singleton Model** (`backend/igny8_core/business/automation/models.py`):
A centralized configuration model for all default automation settings:
**Scheduling Defaults:**
- `is_enabled`, `frequency` (daily/weekly/monthly)
- `base_scheduled_hour`, `next_scheduled_hour` (auto-increment for new sites)
**Stage Defaults (per stage 1-7):**
- `stage_X_enabled` - Enable/disable individual stages
- `stage_X_batch_size` - Items per batch
- `stage_X_use_testing` - Use test AI model (AI stages only)
- `stage_X_budget_pct` - Credit budget percentage (AI stages only)
**Per-Run Limits:**
- `max_keywords_per_run`, `max_clusters_per_run`, etc.
- `max_credits_per_run`
**Publishing Defaults:**
- `auto_approval_enabled`, `auto_publish_enabled`
- `daily_publish_limit`, `weekly_publish_limit`, `monthly_publish_limit`
- `publish_days` (JSONField - e.g., `['mon', 'tue', 'wed', 'thu', 'fri']`)
- `publish_time_slots` (JSONField - e.g., `['09:00', '14:00', '18:00']`)
**Image Defaults:**
- `image_style` (default: 'photorealistic')
- `max_images_per_article` (default: 4)
---
### 🧪 Test Mode (Admin Feature)
New fields on `AutomationConfig` for admin testing:
- `test_mode_enabled` - Enable test functionality for a config
- `test_trigger_at` - When to trigger (set to `now` for immediate)
**How It Works:**
1. Admin enables test mode and sets trigger time
2. `check_test_triggers` task runs every minute
3. When `test_trigger_at <= now`, automation starts with `trigger_type='test'`
4. Bypasses 23-hour blocking and schedule requirements
**Admin Actions:**
- 🧪 **Trigger test run** - Sets test mode and immediate trigger
- 🧹 **Clear test mode** - Disables and clears trigger
---
### 🔄 Reset Button Backend Integration
**New API Endpoint:** `GET /api/v1/integration/settings/defaults/`
Frontend reset button now fetches defaults from backend instead of using hardcoded values:
**Response Format:**
```json
{
"automation": {
"enabled": false,
"frequency": "daily",
"time": "02:00"
},
"stages": [
{"number": 1, "enabled": true, "batch_size": 50, "per_run_limit": 0, "use_testing": false, "budget_pct": 15},
...
],
"delays": {
"within_stage": 3,
"between_stage": 5
},
"publishing": {
"auto_approval_enabled": false,
"auto_publish_enabled": false,
"daily_publish_limit": 3,
"weekly_publish_limit": 15,
"monthly_publish_limit": 50,
"publish_days": ["mon", "tue", "wed", "thu", "fri"],
"time_slots": ["09:00", "14:00", "18:00"]
},
"images": {
"style": "photorealistic",
"max_images": 4
}
}
```
**Note:** Image settings are NOT reset by the reset button - they come from a separate global system (`/api/v1/account/settings/ai/`).
---
### 🗄️ Database Migrations
| Migration | Description |
|-----------|-------------|
| `0009_add_stage_use_testing_and_budget_pct.py` | Adds `use_testing` and `budget_pct` fields per AI stage |
| `0010_add_test_mode_fields.py` | Adds `test_mode_enabled` and `test_trigger_at` fields |
| `0011_add_default_automation_config.py` | Creates `DefaultAutomationConfig` singleton model |
| `0012_add_publishing_image_defaults.py` | Adds publishing and image default fields to `DefaultAutomationConfig` |
---
### 🖥️ Admin Interface
**DefaultAutomationConfig Admin:**
- New admin page for managing centralized defaults
- Organized fieldsets: Scheduling, Stage Toggles, Batch Sizes, Testing Models, Budget Allocation, Per-Run Limits, Delays, Publishing, Images
**AutomationConfig Admin:**
- New Test Mode actions: "🧪 Trigger test run", "🧹 Clear test mode"
- Display of test mode status in list view
---
### 🎨 Frontend Fixes
**AIAutomationSettings Component:**
- Reset button fetches from `/api/v1/integration/settings/defaults/`
- Fixed Run Time dropdown layout (was bleeding outside card)
- Uses `grid grid-cols-2 gap-2` with wrapped dropdowns
- Toast message clarifies which settings are reset
**Dropdown Fixes:**
- Fixed `SelectDropdown` width issues in Run Time selection
- Hour and AM/PM dropdowns no longer overlap or bleed
---
### 📚 Documentation
**New Documentation:**
- [AUTOMATION-AND-PUBLISHING-SCHEDULING.md](docs/40-WORKFLOWS/AUTOMATION-AND-PUBLISHING-SCHEDULING.md) - Comprehensive guide to the scheduling system
**Reorganized:**
- Moved `AUTOMATION-ENHANCEMENT-PLAN.md` to `docs/plans/automation/`
- Moved `FINAL-PRELAUNCH-*.md` to `docs/plans/implemented/`
---
### 🐛 Bug Fixes
- Fixed 404 on `/v1/settings/defaults/` (correct path: `/v1/integration/settings/defaults/`)
- Fixed "Cannot read properties of undefined (reading 'automation')" error in reset handling
- Fixed SelectDropdown bleeding outside card boundaries
- Fixed dropdown portals not opening when `overflow-hidden` was applied
---
## v1.8.0 - January 17, 2026
### Unified Settings Consolidation & Navigation Refactor Complete