diff --git a/components/task-details.tsx b/components/task-details.tsx index 66269b9f..51026b28 100644 --- a/components/task-details.tsx +++ b/components/task-details.tsx @@ -2042,233 +2042,235 @@ export function TaskDetails({ task, maxSandboxDuration = 300 }: TaskDetailsProps
{/* Content Area */}
- {activeTab === 'code' ? ( -
- {/* Current File Path Bar */} -
+ {/* Code Tab */} +
+ {/* Current File Path Bar */} +
+ + + {selectedFile || 'Select a file'} + +
+ + {/* Diff Viewer */} +
+
+ handleUnsavedChanges(selectedFile, hasChanges) : undefined + } + onSavingStateChange={ + selectedFile ? (isSaving) => handleSavingStateChange(selectedFile, isSaving) : undefined + } + onOpenFile={(filename, lineNumber) => { + openFileInTab(filename) + // TODO: Optionally scroll to lineNumber after opening + }} + onFileLoaded={handleFileLoaded} + onSaveSuccess={handleSaveSuccess} + /> +
+
+
+ + {/* Chat Tab */} +
+ +
+ + {/* Preview Tab */} +
+
+ {/* Preview Toolbar */} +
+ + {task.sandboxUrl ? ( + + {task.sandboxUrl} + + ) : ( + + {currentStatus === 'pending' || currentStatus === 'processing' + ? 'Creating sandbox...' + : 'Sandbox not running'} + + )} - - {selectedFile || 'Select a file'} - -
- - {/* Diff Viewer */} -
-
- handleUnsavedChanges(selectedFile, hasChanges) : undefined - } - onSavingStateChange={ - selectedFile ? (isSaving) => handleSavingStateChange(selectedFile, isSaving) : undefined - } - onOpenFile={(filename, lineNumber) => { - openFileInTab(filename) - // TODO: Optionally scroll to lineNumber after opening - }} - onFileLoaded={handleFileLoaded} - onSaveSuccess={handleSaveSuccess} - /> -
-
-
- ) : activeTab === 'chat' ? ( -
- -
- ) : activeTab === 'preview' ? ( -
-
- {/* Preview Toolbar */} -
- - {task.sandboxUrl ? ( - - {task.sandboxUrl} - + - + + + + + + {task.keepAlive && ( + <> + {task.sandboxUrl ? ( + + {isStoppingSandbox ? ( + <> + + Stopping... + + ) : ( + 'Stop Sandbox' + )} + + ) : ( + + {isStartingSandbox ? ( + <> + + Starting... + + ) : ( + 'Start Sandbox' + )} + + )} + )} - - - - - - - {task.keepAlive && ( + + {isRestartingDevServer ? ( <> - {task.sandboxUrl ? ( - - {isStoppingSandbox ? ( - <> - - Stopping... - - ) : ( - 'Stop Sandbox' - )} - - ) : ( - - {isStartingSandbox ? ( - <> - - Starting... - - ) : ( - 'Start Sandbox' - )} - - )} + + Restarting... + ) : ( + 'Restart Dev Server' )} - - {isRestartingDevServer ? ( + + + +
+ {task.sandboxUrl ? ( +
+ {sandboxHealth === 'running' ? ( +