Replace session picker modal with instance welcome view

Transform the session picker from a modal into a comprehensive welcome screen that displays instance metadata, session history, and creation options. The new view provides full keyboard navigation, shows MCP server status, OpenCode binary path, and project information in a compact, space-efficient layout.

Key features:
- Instance metadata sidebar showing folder, project, VCS, version, binary path, MCP status, and server info
- Session list with keyboard navigation (↑↓, PgUp/PgDn, Home/End, Enter)
- Cmd+Enter shortcut to create new session from anywhere
- Compact design with efficient space usage
- Visual MCP server status indicators (running/stopped/error)
- Scrollable layout that keeps "New Session" section accessible
This commit is contained in:
Shantur Rathore
2025-10-24 15:41:59 +01:00
parent a1a5c4b396
commit 6f31ffc467
8 changed files with 571 additions and 54 deletions

View File

@@ -35,13 +35,13 @@ export function setupInstanceIPC(mainWindow: BrowserWindow) {
instances.set(id, instance)
try {
const { pid, port } = await processManager.spawn(folder, id)
const { pid, port, binaryPath } = await processManager.spawn(folder, id)
instance.port = port
instance.pid = pid
instance.status = "ready"
mainWindow.webContents.send("instance:started", { id, port, pid })
mainWindow.webContents.send("instance:started", { id, port, pid, binaryPath })
const meta = processManager.getAllProcesses().get(pid)
if (meta) {
@@ -51,7 +51,7 @@ export function setupInstanceIPC(mainWindow: BrowserWindow) {
})
}
return { id, port, pid }
return { id, port, pid, binaryPath }
} catch (error) {
instance.status = "error"
instance.error = error instanceof Error ? error.message : String(error)