From 75cce1ab5629fbbbaf763a1ea1a2d93c850ed1c2 Mon Sep 17 00:00:00 2001 From: Pedram Amini Date: Sun, 23 Nov 2025 21:06:43 -0600 Subject: [PATCH] chore: remove non-functional tunnel placeholder code Removed incomplete tunnel implementation that was returning fake URLs. - Removed tunnel:start and tunnel:stop IPC handlers from main process - Removed tunnel API from preload contextBridge - Added documentation comment noting tunnel feature is planned for Phase 6 - Tunnel UI settings remain in place for future implementation The tunnel feature is documented as a planned Phase 6 feature in PRD.md and CLAUDE.md:385. This change removes the non-functional placeholder code from production while keeping the UI settings for future use. Resolves housekeeping task #8 --- src/main/index.ts | 19 ++++--------------- src/main/preload.ts | 10 ---------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 05802f0e..662522c6 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -197,21 +197,10 @@ function setupIpcHandlers() { } }); - // Tunnel management (placeholder - will integrate ngrok/cloudflare) - ipcMain.handle('tunnel:start', async (_event, port: number, provider: string) => { - // TODO: Implement actual tunnel spawning - console.log(`Starting tunnel on port ${port} with ${provider}`); - return { - url: `https://mock-${Math.random().toString(36).substr(2, 9)}.ngrok.io`, - active: true, - }; - }); - - ipcMain.handle('tunnel:stop', async (_event, sessionId: string) => { - // TODO: Implement tunnel cleanup - console.log(`Stopping tunnel for session ${sessionId}`); - return true; - }); + // Tunnel management + // NOTE: Tunnel feature is planned for Phase 6 (see PRD.md and CLAUDE.md:385) + // When implemented, will support ngrok/cloudflare for remote access + // Remove this comment when implementing the feature // Web server management ipcMain.handle('webserver:getUrl', async () => { diff --git a/src/main/preload.ts b/src/main/preload.ts index 019173ea..aba72d75 100644 --- a/src/main/preload.ts +++ b/src/main/preload.ts @@ -40,12 +40,6 @@ contextBridge.exposeInMainWorld('maestro', { readFile: (filePath: string) => ipcRenderer.invoke('fs:readFile', filePath), }, - // Tunnel API - tunnel: { - start: (port: number, provider: string) => ipcRenderer.invoke('tunnel:start', port, provider), - stop: (sessionId: string) => ipcRenderer.invoke('tunnel:stop', sessionId), - }, - // Web Server API webserver: { getUrl: () => ipcRenderer.invoke('webserver:getUrl'), @@ -104,10 +98,6 @@ export interface MaestroAPI { readDir: (dirPath: string) => Promise; readFile: (filePath: string) => Promise; }; - tunnel: { - start: (port: number, provider: string) => Promise<{ url: string; active: boolean }>; - stop: (sessionId: string) => Promise; - }; webserver: { getUrl: () => Promise; };