theia IDE Migration - Immediate Next Steps
Created: 2025-10-26
Current Build: Build #10 running (Cargo dependency fixes)
Migration Analysis: See THEIA-MIGRATION-analysis.md for complete details
Key Discovery: theia-ide Structure
The theia-ide submodule is simpler than expected - it's a product distribution, not the full theia framework monorepo.
Structure:
theia-ide/
├── applications/
│ ├── browser/ # Browser application (target)
│ └── electron/ # Electron application
├── theia-extensions/ # Custom extensions directory
├── lerna.json # Monorepo orchestration
├── package.json # Root workspace
└── yarn.lock # Yarn dependencies
Build System:
- Lerna + Yarn workspaces (NOT npm)
- Build extensions first, then applications
- No
src/directory in applications (created during build)
Simplified Migration Path
Option 1: theia Extension (RECOMMENDED)
Create custom Coditect extension in theia-extensions/coditect-branding/
Advantages:
- ✅ Clean separation (Coditect code isolated)
- ✅ Easy to maintain (one directory)
- ✅ Follows theia best practices
- ✅ Can be reused across applications
Implementation:
# 1. Create extension directory
mkdir -p theia-ide/theia-extensions/coditect-branding/src
# 2. Copy branding files
cp theia-app/src/browser/coditect-chat-welcome-provider.tsx \
theia-ide/theia-extensions/coditect-branding/src/
cp theia-app/src/browser/coditect-branding-frontend-module.ts \
theia-ide/theia-extensions/coditect-branding/src/
# 3. Create package.json
cat > theia-ide/theia-extensions/coditect-branding/package.json << 'EOF'
{
"name": "theia-ide-coditect-ext",
"version": "1.65.100",
"private": true,
"dependencies": {
"@theia/ai-chat-ui": "1.65.1",
"@theia/core": "1.65.1"
},
"theiaExtensions": [
{
"frontend": "lib/coditect-branding-frontend-module"
}
],
"scripts": {
"build": "tsc",
"watch": "tsc -w",
"clean": "rimraf lib"
}
}
EOF
# 4. Create tsconfig.json
cat > theia-ide/theia-extensions/coditect-branding/tsconfig.json << 'EOF'
{
"extends": "../../configs/base.tsconfig",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
}
}
EOF
# 5. Build extension
cd theia-ide
yarn install
yarn build:extensions
yarn build:applications
Duration: 2-3 hours
Option 2: Direct Application Modification
Add branding directly to applications/browser/
Advantages:
- ✅ Faster initial setup
- ✅ No lerna complexity
Disadvantages:
- ❌ Harder to maintain (mixed with theia code)
- ❌ Conflicts with git submodule updates
- ❌ Not reusable
NOT RECOMMENDED - Use Option 1 instead.
Immediate Action Items
1. Wait for Build #10 (IN PROGRESS)
Status: Archive creation phase (31,752 files)
ETA: 25-35 minutes remaining
Command: Monitor /tmp/build-log-v10.txt
Verification:
tail -f /tmp/build-log-v10.txt
Success Criteria:
- ✅ All 6 stages compile without errors
- ✅ Rust binaries build successfully (codi2, monitor)
- ✅ Image pushed to Artifact Registry
- ✅ Build marked as SUCCESS (not FAILURE)
2. Test theia-ide Local Build (AFTER Build #10)
Objective: Verify theia-ide builds before adding Coditect branding
Commands:
cd /home/hal/v4/PROJECTS/t2/theia-ide
yarn install
yarn build
Expected Output:
✓ Extensions built
✓ Applications built
✓ Browser app ready at applications/browser/lib/
Duration: 10-15 minutes (yarn install + build)
Success Criteria:
- ✅ No TypeScript compilation errors
- ✅
applications/browser/lib/backend/main.jsexists - ✅ Can run
yarn browser startwithout errors
3. Add MCP SDK Dependency
Why: theia-ide missing @modelcontextprotocol/sdk (required for MCP integration)
File: theia-ide/applications/browser/package.json
Change:
{
"dependencies": {
// ... existing dependencies ...
"@modelcontextprotocol/sdk": "1.20.1" // ADD THIS
}
}
Command:
cd theia-ide/applications/browser
yarn add @modelcontextprotocol/sdk@1.20.1
Verification:
grep modelcontextprotocol theia-ide/applications/browser/package.json
# Expected: "@modelcontextprotocol/sdk": "1.20.1"
4. Create Coditect Branding Extension
Directory: theia-ide/theia-extensions/coditect-branding/
Files to Create:
package.json- Extension metadatatsconfig.json- TypeScript configurationsrc/coditect-chat-welcome-provider.tsx- Robot logo + welcome messagesrc/coditect-branding-frontend-module.ts- InversifyJS rebind
Copy Strategy:
# Copy source files from theia-app
cp theia-app/src/browser/*.tsx theia-ide/theia-extensions/coditect-branding/src/
cp theia-app/src/browser/*.ts theia-ide/theia-extensions/coditect-branding/src/
Build:
cd theia-ide
yarn build:extensions
yarn build:applications
Duration: 2-3 hours
5. Update theia-IDE Configuration
File: theia-ide/applications/browser/package.json
Change Application Name:
{
"theia": {
"frontend": {
"config": {
"applicationName": "Coditect AI IDE", // CHANGE from "theia IDE"
"defaultTheme": "dark",
"defaultIconTheme": "vs-seti",
"preferences": {
"ai.openai.apiKey": "",
"ai.ollama.models": []
}
}
}
}
}
6. Add 30+ VSCode Extensions
Strategy: Copy plugin URLs from theia-app/package.json to theia-ide/package.json
File: theia-ide/package.json
Change:
{
"theiaPlugins": {
// Existing plugins (keep these)
"eclipse-theia.builtin-extension-pack": "...",
// ADD 30+ plugins from theia-app
"ms-python.python": "https://open-vsx.org/api/ms-python/python/2024.16.1/file/ms-python.python-2024.16.1.vsix",
"vscode-eslint": "https://open-vsx.org/api/dbaeumer/vscode-eslint/3.0.10/file/dbaeumer.vscode-eslint-3.0.10.vsix",
"prettier-vscode": "https://open-vsx.org/api/esbenp/prettier-vscode/10.4.0/file/esbenp.prettier-vscode-10.4.0.vsix",
// ... copy all 30+ URLs
}
}
Command:
yarn download:plugins
Duration: 5-10 minutes
7. Update Dockerfile (Build #11 Preparation)
File: dockerfile.combined-fixed
Current (theia-app):
FROM node:20 AS theia-builder
WORKDIR /app/theia-app
COPY theia-app/package*.json ./
RUN npm ci
COPY theia-app/ .
RUN npm run prepare
New (theia-ide):
FROM node:20 AS theia-builder
WORKDIR /app/theia-ide
# Copy workspace root
COPY theia-ide/package.json theia-ide/yarn.lock theia-ide/lerna.json ./
# Copy applications
COPY theia-ide/applications ./applications
# Copy extensions (including Coditect branding)
COPY theia-ide/theia-extensions ./theia-extensions
# Install dependencies
RUN yarn install --frozen-lockfile
# Build extensions first
RUN yarn build:extensions
# Build browser application
RUN yarn build:applications
Key Changes:
- Switch from
npm ci→yarn install --frozen-lockfile - Copy entire workspace structure (root + applications + extensions)
- Run
yarn build:extensionsbeforeyarn build:applications
8. Test Docker Build Locally
Before submitting Build #11, test locally:
cd /home/hal/v4/PROJECTS/t2
docker build -f dockerfile.combined-fixed -t test-theia-ide:local .
Expected Duration: 25-30 minutes
Verification:
docker run -p 3000:3000 test-theia-ide:local
# Open http://localhost:3000
# Verify: "Coditect AI Agents" welcome message
# Verify: Robot logo displays
9. Submit Build #11 (Production Deployment)
Prerequisites:
- ✅ Build #10 successful
- ✅ Local Docker build successful
- ✅ Coditect branding verified locally
- ✅ theia-ide submodule committed to git
Commands:
# Commit theia-ide changes
git add theia-ide
git commit -m "feat: Migrate to Eclipse theia IDE v1.65.100 with Coditect branding"
# Submit Cloud Build
gcloud builds submit --config cloudbuild-combined.yaml \
--project serene-voltage-464305-n2 2>&1 | tee /tmp/build-log-v11.txt
Monitor:
tail -f /tmp/build-log-v11.txt
Expected Duration: 30-45 minutes
Risk Mitigation
Rollback Strategy
If Build #11 fails or theia-ide has issues:
-
Keep theia-app in Dockerfile:
# Stage: theia-builder-fallback (theia-app)
FROM node:20 AS theia-builder-fallback
COPY theia-app/ .
RUN npm run prepare -
Use ARG to switch:
ARG USE_THEIA_IDE=false
FROM theia-builder${USE_THEIA_IDE:+-ide} AS theia-final -
Deploy fallback if needed:
gcloud builds submit --config cloudbuild-combined.yaml \
--substitutions=_USE_THEIA_IDE=false
Testing Checklist
Before considering migration complete:
- theia-ide builds locally without errors
- Coditect branding displays correctly
- Robot logo renders with theme colors
- AI features work (LM Studio integration)
- 30+ plugins load successfully
- MCP SDK integration functional
- Docker image builds successfully
- GKE deployment updates without downtime
- Production URL (https://coditect.ai/theia) works
- No console errors in browser
- File operations work (create, edit, delete)
- terminal works
- Settings panel accessible
Success Metrics
Phase 2 Success (Branding Integration)
- ✅ Extension builds:
yarn build:extensionscompletes - ✅ Application builds:
yarn build:applicationscompletes - ✅ Welcome message: "Coditect AI Agents" appears
- ✅ Logo renders: Robot icon displays
- ✅ Theme integration: CSS variables work correctly
Phase 4 Success (Docker Integration)
- ✅ Docker build: No errors during build
- ✅ Container starts: Port 3000 accessible
- ✅ Branding preserved: Coditect branding in container
- ✅ Plugins load: All 30+ extensions functional
Phase 5 Success (GKE Deployment)
- ✅ Build #11 SUCCESS: All stages compile
- ✅ Deployment updates: Zero downtime
- ✅ Production verification: https://coditect.ai/theia loads
- ✅ End-to-end testing: Create file, edit, save, delete
Timeline Estimate
| Phase | Duration | Dependencies |
|---|---|---|
| Build #10 completion | 20-30 min | Currently running |
| Test theia-ide build | 10-15 min | Build #10 success |
| Add MCP SDK | 5 min | theia-ide builds |
| Create Coditect extension | 2-3 hours | MCP SDK added |
| Update configuration | 15 min | Extension created |
| Add 30+ plugins | 10 min | Configuration updated |
| Update Dockerfile | 30 min | All above complete |
| Test Docker build | 25-30 min | Dockerfile updated |
| Submit Build #11 | 30-45 min | Docker test success |
Total: ~6-8 hours (includes testing and verification)
Current Status
Build #10: ⏳ IN PROGRESS (archive creation phase) theia-ide submodule: ✅ ADDED (commit 9b5870cd, v1.65.100) Migration analysis: ✅ COMPLETE (THEIA-MIGRATION-analysis.md) Next action: ⏳ WAIT for Build #10 completion
Command to Monitor:
tail -f /tmp/build-log-v10.txt
Last Updated: 2025-10-26 23:25 UTC Owner: Migration team Status: Preparation complete, awaiting Build #10