From 94aa88c154e1fbe9e85d7ae0dcf3b3a11988b47e Mon Sep 17 00:00:00 2001 From: Fusion Date: Tue, 19 May 2026 23:06:54 +0200 Subject: [PATCH] feat: add Sessions Hub page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Sessions tab to navigation between Dashboard and Projects - Show active session count badge in navigation - Create SessionsPage with: - Last session section with resume button - Active sessions grid with open/stop actions - Recent sessions list - Create session form with project/repo/tool selectors - Add last_session_id to user config - Update UserConfig schemas (backend and frontend) - Add comprehensive CSS for sessions page Quality gates: typecheck ✓, lint ✓, build ✓ --- apps/api/src/api/user_config.py | 2 + apps/web/src/api/settings.ts | 2 + apps/web/src/components/app-shell.tsx | 30 +- apps/web/src/pages/sessions.tsx | 416 ++++++++++++++++++ apps/web/src/pages/settings.tsx | 1 + apps/web/src/router.tsx | 2 + apps/web/src/styles.css | 173 ++++++++ .../.openspec/config.yaml | 0 .../2026-05-19-api-documentation}/design.md | 0 .../2026-05-19-api-documentation}/proposal.md | 0 .../specs/spec.md | 0 .../2026-05-19-api-documentation}/tasks.md | 0 .../sessions-hub/.openspec/config.yaml | 2 + openspec/changes/sessions-hub/design.md | 120 +++++ openspec/changes/sessions-hub/proposal.md | 51 +++ openspec/changes/sessions-hub/specs/spec.md | 115 +++++ openspec/changes/sessions-hub/tasks.md | 93 ++++ 17 files changed, 996 insertions(+), 11 deletions(-) create mode 100644 apps/web/src/pages/sessions.tsx rename openspec/changes/{api-documentation => archive/2026-05-19-api-documentation}/.openspec/config.yaml (100%) rename openspec/changes/{api-documentation => archive/2026-05-19-api-documentation}/design.md (100%) rename openspec/changes/{api-documentation => archive/2026-05-19-api-documentation}/proposal.md (100%) rename openspec/changes/{api-documentation => archive/2026-05-19-api-documentation}/specs/spec.md (100%) rename openspec/changes/{api-documentation => archive/2026-05-19-api-documentation}/tasks.md (100%) create mode 100644 openspec/changes/sessions-hub/.openspec/config.yaml create mode 100644 openspec/changes/sessions-hub/design.md create mode 100644 openspec/changes/sessions-hub/proposal.md create mode 100644 openspec/changes/sessions-hub/specs/spec.md create mode 100644 openspec/changes/sessions-hub/tasks.md diff --git a/apps/api/src/api/user_config.py b/apps/api/src/api/user_config.py index c458a8e..05a8091 100644 --- a/apps/api/src/api/user_config.py +++ b/apps/api/src/api/user_config.py @@ -47,6 +47,7 @@ class UserConfigResponse(BaseModel): theme: str = "system" git_user_name: str | None = None git_user_email: str | None = None + last_session_id: str | None = None class UserConfigUpdate(BaseModel): @@ -54,6 +55,7 @@ class UserConfigUpdate(BaseModel): theme: str | None = None git_user_name: str | None = None git_user_email: str | None = None + last_session_id: str | None = None @router.get( diff --git a/apps/web/src/api/settings.ts b/apps/web/src/api/settings.ts index bd32406..4114854 100644 --- a/apps/web/src/api/settings.ts +++ b/apps/web/src/api/settings.ts @@ -5,6 +5,7 @@ export interface UserConfig { theme: string; git_user_name: string | null; git_user_email: string | null; + last_session_id: string | null; } export interface UserConfigUpdate { @@ -12,6 +13,7 @@ export interface UserConfigUpdate { theme?: string; git_user_name?: string; git_user_email?: string; + last_session_id?: string; } export const getUserConfig = async (): Promise => { diff --git a/apps/web/src/components/app-shell.tsx b/apps/web/src/components/app-shell.tsx index 92ba608..1f4196f 100644 --- a/apps/web/src/components/app-shell.tsx +++ b/apps/web/src/components/app-shell.tsx @@ -11,6 +11,7 @@ import type { IconName } from "../utils/icons"; const NAV_ITEMS: { to: string; label: string; icon: IconName }[] = [ { to: "/", label: "Dashboard", icon: "dashboard" }, + { to: "/sessions", label: "Sessions", icon: "terminal" }, { to: "/projects", label: "Projects", icon: "projects" }, { to: "/ssh-keys", label: "SSH Keys", icon: "profile" }, { to: "/tool-types", label: "Tool Types", icon: "code" }, @@ -83,17 +84,24 @@ export const AppShell = () => {