โ† ะะฐะทะฐะด

Task Migration Report

Date: 2026-02-25
Task: dash-tasks - Create Task Files for Each Project
Status: โœ… COMPLETED

Summary

Successfully migrated dashboard task management from a single system.json file to project-specific JSON files.

What Was Implemented

1. Created Migration Script (migrate-tasks.cjs)

2. Project Task Files Created/Updated

Project File Tasks Migrated Total Tasks
piewell piewell.json +2 8
futures-screener futures-screener.json 0 (already had tasks) 5
openclaw openclaw.json +1 5
options options.json 0 (already had tasks) 3
affiliate affiliate.json 0 (already had tasks) 4
system system.json 0 (kept as-is) 21

New tasks migrated:

3. Backend API Updated

Modified: /home/app/dashboard/backend/index.js

Changes:

Project Name Mapping:

{
  'piewell': 'piewell.json',
  'futures-screener': 'futures-screener.json',
  'futures': 'futures-screener.json',  // alias
  'screener': 'futures-screener.json', // alias
  'openclaw': 'openclaw.json',
  'options': 'options.json',
  'affiliate': 'affiliate.json',
  'system': 'system.json',
  'ideas': 'ideas.json'
}

4. Testing

All endpoints tested and confirmed working:

GET /api/projects/piewell/kanban-tasks          โ†’ 8 tasks โœ…
GET /api/projects/futures-screener/kanban-tasks โ†’ 5 tasks โœ…
GET /api/projects/openclaw/kanban-tasks         โ†’ 5 tasks โœ…
GET /api/projects/options/kanban-tasks          โ†’ 3 tasks โœ…
GET /api/projects/affiliate/kanban-tasks        โ†’ 4 tasks โœ…
GET /api/projects/system/kanban-tasks           โ†’ 21 tasks โœ…

Response format:

{
  "project": "piewell",
  "tasks": [...],
  "timestamp": "2026-02-25T17:42:10.853Z",
  "source": "json-file",
  "file": "piewell.json"
}

File Structure

/home/app/dashboard/tasks/
โ”œโ”€โ”€ affiliate.json          (4 tasks)
โ”œโ”€โ”€ futures-screener.json   (5 tasks)
โ”œโ”€โ”€ ideas.json              (existing)
โ”œโ”€โ”€ openclaw.json           (5 tasks)
โ”œโ”€โ”€ options.json            (3 tasks)
โ”œโ”€โ”€ piewell.json            (8 tasks)
โ””โ”€โ”€ system.json             (21 tasks - dashboard/workflow tasks)

Task Schema

Each project file follows this structure:

{
  "project": "piewell",
  "name": "Piewell.com",
  "tasks": [
    {
      "id": "piewell-1",
      "title": "...",
      "description": "...",
      "priority": "high|medium|low",
      "status": "proposed|approved|done|verified",
      "tags": ["tag1", "tag2"],
      "createdAt": "2026-02-25T08:00:00Z",
      "updatedAt": "2026-02-25T08:00:00Z",
      "completedAt": "..." // optional
    }
  ]
}

Requirements Met

โœ… Separate task files for each project - All 6 projects have their own JSON files
โœ… Proper structure - All files follow the specified schema
โœ… Task migration - Existing tasks sorted by project and moved appropriately
โœ… Backend support - API endpoint reads from correct project files
โœ… Fallback handling - Returns 404 if project/file doesn't exist
โœ… No data loss - All tasks preserved, duplicates avoided
โœ… Testing - All endpoints verified working

Files Modified/Created

Backup Created

Next Steps (Optional Enhancements)

  1. Remove migrated tasks from system.json (if desired)

    • Currently system.json still contains dash-tasks and piewell-pilot
    • Can be manually removed or kept for historical reference
  2. Add sample tasks for empty projects (as per requirement #5)

    • Currently all projects have tasks, but can add more samples if needed
  3. Frontend integration

    • Frontend should already work since it calls the same endpoint
    • Verify kanban modal loads tasks correctly for each project

Notes


Migration completed successfully! โœ