diff --git a/backend/tests/test_coding_agent.py b/backend/tests/test_coding_agent.py index f391c1f..d4a3275 100644 --- a/backend/tests/test_coding_agent.py +++ b/backend/tests/test_coding_agent.py @@ -185,7 +185,7 @@ def test_workspace_file_index_lists_relative_paths_only(self) -> None: headers={"Authorization": f"Bearer {alice_key}"}, ) dot_paths = [item["path"] for item in with_dot.json()["entries"]] - self.assertTrue(any(p.startswith(".evotown/") for p in dot_paths)) + self.assertTrue(any(p == ".evotown" or p.startswith(".evotown/") for p in dot_paths)) def test_create_run_and_runner_writes_shared_context(self) -> None: from infra import claude_agent_runs, workspaces diff --git a/frontend/src/components/CodingAgentWorkspacePage.tsx b/frontend/src/components/CodingAgentWorkspacePage.tsx index 88c8fd1..e114702 100644 --- a/frontend/src/components/CodingAgentWorkspacePage.tsx +++ b/frontend/src/components/CodingAgentWorkspacePage.tsx @@ -17,6 +17,14 @@ import { WorkspaceFileList, type WorkspaceFileEntry } from "./WorkspaceFileList" type Workspace = { workspace_id: string; owner_account_id: string; name: string; root_path: string; status: "active" | "archived"; created_at: string; updated_at: string; + template_id?: string; +}; + +type AgentTemplateSummary = { + template_id: string; + has_workspace_dir?: boolean; + workspace_dir_root?: string; + workspace_dir_prefix?: string; }; type AgentRun = { @@ -168,7 +176,9 @@ export function CodingAgentWorkspacePage() { const ws = d.workspace || d; if (ws.template_id) { adminFetch("/api/v1/agent-templates").then(r => r.json()).then(td => { - const tpl = (td.templates || []).find((t: any) => t.template_id === ws.template_id); + const tpl = ((td.templates || []) as AgentTemplateSummary[]).find( + (t) => t.template_id === ws.template_id, + ); if (tpl?.has_workspace_dir) { setDevDirRoot(tpl.workspace_dir_root as "workspace" | "shared" | "server"); setDevDirPrefix((tpl.workspace_dir_prefix || "").replace(/\/$/, "")); } }).catch(() => {}); } diff --git a/frontend/src/components/McpPanel.tsx b/frontend/src/components/McpPanel.tsx index 7c73144..3bb8628 100644 --- a/frontend/src/components/McpPanel.tsx +++ b/frontend/src/components/McpPanel.tsx @@ -9,6 +9,8 @@ type McpService = { service_type: string; endpoint_url: string; db_type: string; status: string; source: string; workspace_id: string; created_at: string; updated_at: string; + bound_workspaces?: number; + calls_24h?: number; }; type McpSource = "internal" | "external" | "system"; @@ -219,8 +221,8 @@ export function McpPanel({ locale }: { locale: Locale }) { "border-emerald-200 bg-emerald-50 text-emerald-700" }`}>{SOURCE_LABELS[svc.source] || svc.source} -