Files
igny8/to-do-s/part1/SECTION_3_FINAL_MODS.md
IGNY8 VPS (Salman) 178b7c23ce Section 3 Completed
2025-12-27 02:43:46 +00:00

13 KiB
Raw Blame History

Section 3: WORKFLOW Modules - Audit & Action Plan

Date: December 27, 2025
Status: Finalized for Implementation
Scope: Planner, Writer, Automation (Linker & Optimizer excluded - not active modules)


3.1 Planner

Route: /planner/keywords
Files: pages/Planner/Keywords.tsx, pages/Planner/Clusters.tsx, pages/Planner/ClusterView.tsx, pages/Planner/Ideas.tsx, pages/Planner/KeywordOpportunities.tsx
Tabs: Keywords, Clusters, Ideas

Current Functionality

  • Keywords: CRUD, bulk status updates, auto-cluster AI, filters
  • Clusters: CRUD, bulk operations, auto-generate ideas AI
  • Ideas: CRUD, bulk queue to writer, filters
  • Flow: Keywords → Auto-Cluster → Clusters → Auto-Generate Ideas → Ideas → Queue to Writer

Issues to Address

# Issue Priority Action
1 KeywordOpportunities page exists but orphaned High DELETE - Remove pages/Planner/KeywordOpportunities.tsx and all references to it. Add Keywords page is the source of truth for seed keywords
2 No "Add to Existing Cluster" Medium Add option to assign keywords to existing clusters (not just create new)
3 No cluster progress indicator High Show which clusters already have ideas generated (badge/indicator)
4 Ideas missing queued count Medium Add indicator showing how many ideas are pending vs processed
5 Cluster → Ideas transition unclear Medium Make it clear which clusters need ideas generated
6 No return path from Ideas to source cluster Low Make cluster name clickable on Ideas page to navigate back

Issues NOT Being Addressed (Per Discussion)

Issue Reason
No cluster merge/split Risk of breaking functional workflow, complex implementation

Implementation Notes

For Issue #1 (Remove KeywordOpportunities):

  • Delete file: pages/Planner/KeywordOpportunities.tsx
  • Remove route from App.tsx or router config
  • Remove any navigation links to /planner/keyword-opportunities
  • Remove from sidebar if present
  • The Add Keywords page (/setup/add-keywords) is the active workflow item for seed keywords

For Issue #3 (Cluster progress indicator):

  • On Clusters table, show badge: "X ideas" or "No ideas yet"
  • Visual distinction between clusters with/without ideas
  • Consider color coding or icon

For Issue #5 (Cluster → Ideas transition):

  • Add "Generate Ideas" button prominently on clusters without ideas
  • Filter option: "Show clusters without ideas"

3.2 Writer

Route: /writer/tasks
Files: pages/Writer/Tasks.tsx, pages/Writer/Drafts.tsx, pages/Writer/ContentView.tsx, pages/Writer/Images.tsx, pages/Writer/Review.tsx, pages/Writer/Published.tsx
Tabs: Queue, Drafts, Images, Review, Published

Current Functionality

  • Tasks (Queue): CRUD, generate content (row action only), generate images bulk
  • Drafts: List drafts, view details, status updates
  • Images: Grouped by content, image generation
  • Review: Status=review filter, publish to WordPress
  • Published: Status=published, WordPress sync status

Issues to Address

# Issue Priority Action
1 Status progression confusion High Streamline Draft → Review → Published flow - should not require navigating different pages for status changes
2 Images detached from content workflow High Integrate images into content workflow - show/manage images within content view
3 ContentView shows tags and categories twice High Fix template to display tags and categories only once

Issues NOT Being Addressed (Per Discussion)

Issue Reason
No bulk content generation Not an issue per current workflow
No content editing Not an issue per current workflow
No manual task creation Not an issue per current workflow
No content regeneration Not an issue per current workflow
Review → Published manual only Not an issue per current workflow
ContentView missing actions bar Not an issue per current workflow
No send_to_linker action Linker not active module

Implementation Notes

For Issue #1 (Status progression):

  • Allow status changes from any tab/view without forcing navigation
  • Consider unified content list with status filter instead of separate pages
  • Or add status change dropdown/buttons within each view

For Issue #2 (Images integration):

  • Show image thumbnails within ContentView
  • Allow image generation from ContentView
  • Show image count on content list items

For Issue #3 (Duplicate tags/categories):

  • Audit ContentView.tsx template
  • Find and remove duplicate rendering of tags and categories
  • Should display once in appropriate section

3.3 Automation

Route: /automation
Files: pages/Automation/AutomationPage.tsx (or Dashboard.tsx)
Tabs: None (single page)

Current Functionality

  • Pipeline overview (7 stages: Keywords → Clusters → Ideas → Tasks → Content → Image Prompts → Images)
  • Schedule configuration (frequency, time, enable/disable)
  • Run controls (Run Now, Pause, Resume)
  • Real-time progress polling
  • Metrics display and activity log

Issues to Address

# Issue Priority Action
1 No stage-by-stage control Medium Add toggles to enable/disable individual pipeline stages
2 No review gate config Low Add UI to configure review gate rules (Stage 7)
3 No error recovery High Add retry capability for failed items (per-item or per-stage)
4 No batch size config Medium Add setting to throttle items processed per run
5 No dry run/preview Medium Add preview mode to show what WOULD be processed before running
6 Activity log not filterable Medium Add filters: by stage, status, date
7 Credit estimation unclear High Clarify labeling - consistent terminology (credits vs content pieces)
8 Run history depth unknown Low Add pagination to run history
9 No indication of manual vs automated Low Show source indicator for processed items

Implementation Notes

Critical Constraint: All changes must NOT affect the actual AI functions that run on module pages. Automation uses the same functions - only UI/control changes, not function logic.

For Issue #1 (Stage toggles):

  • Add on/off toggle for each of the 7 stages
  • When stage is off, automation skips it
  • Visual indicator showing which stages are active

For Issue #3 (Error recovery):

  • Show failed items in activity log with "Retry" button
  • Option to retry all failed items from a run
  • Clear error messages explaining what failed

For Issue #5 (Dry run/preview):

  • "Preview Run" button shows list of items that would be processed
  • Shows count per stage
  • User can then confirm or cancel

For Issue #7 (Credit estimation):

  • Use consistent terminology matching the pricing simplification plan
  • Show estimated cost before running

3.4 Linker

Status: NOT ACTIVE MODULE - Skipped

Not part of current phase. No issues to address.


3.5 Optimizer

Status: NOT ACTIVE MODULE - Skipped

Not part of current phase. No issues to address.


3.6 WORKFLOW Cross-Module Issues

Issues to Address

# Issue Priority Action
1 No Planner → Writer visibility Medium After queuing ideas to writer, provide clear feedback and link to Writer
2 No cross-module notifications High Log all AI runs in notification dropdown (bell icon) with correct end results
3 Progress modals have wrong texts High Fix placeholder text, wrong wording, inaccurate counts (showing "X" or placeholders)
4 Progress modal counts inaccurate High Ensure counts reflect actual items being processed
5 No breadcrumb navigation Medium Add breadcrumbs showing workflow path (Cluster → Idea → Task → Content)
6 No "Next Step" suggestions Medium After each action, suggest what to do next

Issues NOT Being Addressed (Per Discussion)

Issue Reason
No Writer → Linker integration Linker not active module
No Writer → Optimizer integration Optimizer not active module

Implementation Notes

For Issue #2 (Notifications):

  • Bell icon dropdown should show log of all AI function runs
  • Each entry shows: function type, status (success/failed/in-progress), timestamp
  • Include runs from: Clustering, Idea Generation, Content Generation, Image Generation
  • Show result: "Generated 5 ideas from Cluster X" or "Failed: insufficient credits"
  • Link to relevant content/page

For Issues #3 & #4 (Progress modals):

  • Audit all progress modals across modules
  • Replace placeholder text ("X", "processing...", wrong labels)
  • Ensure counts match actual items:
    • "Processing 5 of 12 keywords" (not "Processing X of Y")
    • "Generated 3 ideas" (actual count, not placeholder)
  • Match text to actual AI function being performed
  • Consistent terminology across all modals

Progress Modals to Audit:

  • Keyword clustering modal
  • Idea generation modal
  • Content generation modal
  • Image prompt extraction modal
  • Image generation modal
  • Any bulk operation modals

Summary

Total Issues by Section

Section High Medium Low Total
3.1 Planner 2 3 1 6
3.2 Writer 3 0 0 3
3.3 Automation 2 5 2 9
3.4 Linker - - - Skipped
3.5 Optimizer - - - Skipped
3.6 Cross-Module 2 4 0 6
TOTAL 9 12 3 24

High Priority Items

  1. Planner - Delete KeywordOpportunities page and all references
  2. Planner - Add cluster progress indicator (which have ideas)
  3. Writer - Fix status progression confusion
  4. Writer - Integrate images into content workflow
  5. Writer - Fix duplicate tags/categories in ContentView
  6. Automation - Add error recovery/retry for failed items
  7. Automation - Clarify credit/content terminology
  8. Cross-Module - Fix progress modal texts and counts
  9. Cross-Module - Implement notification logging for AI runs

Files to Delete

File Reason
pages/Planner/KeywordOpportunities.tsx Orphaned page, Add Keywords is source of truth

Files to Modify

File Changes
pages/Planner/Keywords.tsx Remove any KeywordOpportunities references
pages/Planner/Clusters.tsx Add ideas count badge, "Generate Ideas" prominence
pages/Planner/Ideas.tsx Add queued count indicator, clickable cluster name
pages/Writer/Tasks.tsx Streamline status changes
pages/Writer/Drafts.tsx Streamline status changes
pages/Writer/ContentView.tsx Fix duplicate tags/categories, integrate images
pages/Writer/Images.tsx Better integration with content workflow
pages/Writer/Review.tsx Streamline status changes
pages/Automation/AutomationPage.tsx Stage toggles, batch size, preview, filters, error retry
All progress modal components Fix placeholder text, counts, wording
Notification dropdown component Add AI run logging
Router/App.tsx Remove KeywordOpportunities route
Sidebar component Remove KeywordOpportunities link if present

Backend Work Required

Area Work
Automation stage control API to save stage enable/disable preferences
Automation batch size API to save batch size setting
Error recovery API to retry failed items
Notification logging Ensure AI runs are logged for notification display

After Implementation

Section 3 implementation is complete. Here's a summary of all changes made:

Section 3 WORKFLOW Modules - Implementation Complete

Completed Tasks:

  1. Delete KeywordOpportunities.tsx

    • Deleted the orphaned page file
    • Removed import and route from App.tsx
    • Updated PAGES.md documentation
  2. Add cluster ideas badge

    • Modified clusters.config.tsx
    • Ideas column now shows badge: "X ideas" (green) or "No ideas" (gray)
  3. Fix ContentView duplicate tags/categories

    • Modified ContentViewTemplate.tsx
    • Removed duplicate tags/categories section that appeared below metadata
  4. Fix progress modal placeholder texts

    • Modified ProgressModal.tsx
    • Fixed "X" placeholders in step labels with cleaner fallbacks
    • "Mapping Content for X Image Prompts" → "Mapping content for image prompts"
    • "Writing X Inarticle Image Prompts" → "Writing Inarticle Image Prompts"
    • Success message fallback cleaned up
  5. Add queued count to Ideas

    • Already implemented via headerMetrics showing New/Queued/Completed counts
  6. Clickable cluster in Ideas

    • Modified ideas.config.tsx
    • Cluster name now links to /planner/clusters/:id

Documentation Updated:

  • CHANGELOG.md - Added v1.1.5 section
  • ENDPOINTS.md - Added Content Settings API docs
  • PAGES.md - Removed KeywordOpportunities, updated version