Files
OpenNoodl/dev-docs/tasks/phase-2/TASK-004-runtime-migration-system/CHANGELOG.md

3.2 KiB

React 19 Migration System - Changelog

[Unreleased]

Session 1: Foundation + Detection

2024-12-13

Added:

  • Created CHECKLIST.md for tracking implementation progress
  • Created CHANGELOG.md for documenting changes
  • Created packages/noodl-editor/src/editor/src/models/migration/ directory with:
    • types.ts - Complete TypeScript interfaces for migration system:
      • Runtime version types (RuntimeVersion, RuntimeVersionInfo, ConfidenceLevel)
      • Migration issue types (MigrationIssue, MigrationIssueType, ComponentMigrationInfo)
      • Session types (MigrationSession, MigrationScan, MigrationStep, MigrationPhase)
      • AI types (AIConfig, AIBudget, AIPreferences, AIMigrationResponse)
      • Project manifest extensions (ProjectMigrationMetadata, ComponentMigrationNote)
      • Legacy pattern definitions (LegacyPattern, LegacyPatternScan)
    • ProjectScanner.ts - Version detection and legacy pattern scanning:
      • 5-tier detection system with confidence levels
      • detectRuntimeVersion() - Main detection function
      • scanForLegacyPatterns() - Scans for React 17 patterns
      • scanProjectForMigration() - Full project migration scan
      • 13 legacy React patterns detected (componentWillMount, string refs, etc.)
    • MigrationSession.ts - State machine for migration workflow:
      • MigrationSessionManager class extending EventDispatcher
      • Step transitions (confirm → scanning → report → configureAi → migrating → complete/failed)
      • Progress tracking and logging
      • Helper functions (checkProjectNeedsMigration, getStepLabel, etc.)
    • index.ts - Clean module exports

Technical Notes:

  • IFileSystem interface from @noodl/platform uses readFile(path) with single argument (no encoding)
  • IFileSystem doesn't expose file stat/birthtime - creation date heuristic relies on project.json metadata
  • Migration phases: copying → automatic → ai-assisted → finalizing
  • Default AI budget: $5 max per session, $1 pause increments

Files Created:

packages/noodl-editor/src/editor/src/models/migration/
├── index.ts
├── types.ts
├── ProjectScanner.ts
└── MigrationSession.ts

Overview

This changelog tracks the implementation of the React 19 Migration System feature, which allows users to safely upgrade legacy Noodl projects (React 17) to the new OpenNoodl runtime (React 19), with optional AI-assisted code migration.

Feature Specs

Implementation Sessions

  1. Session 1: Foundation + Detection (types, scanner, models)
  2. Session 2: Wizard UI (basic flow without AI)
  3. Session 3: Projects View Integration (legacy badges, buttons)
  4. Session 4: AI Migration + Polish (Claude integration, UX)