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
This commit is contained in:
Pedram Amini
2025-11-23 21:06:43 -06:00
parent c1be375d56
commit 75cce1ab56
2 changed files with 4 additions and 25 deletions

View File

@@ -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 () => {

View File

@@ -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<any[]>;
readFile: (filePath: string) => Promise<string>;
};
tunnel: {
start: (port: number, provider: string) => Promise<{ url: string; active: boolean }>;
stop: (sessionId: string) => Promise<boolean>;
};
webserver: {
getUrl: () => Promise<string>;
};