refactor(web): drop team API calls (P1.1)

The local sidecar has no /api/team/* routes since P1.1.

- Remove searchTeamMemory, getTeamMembers, getTeamActivity and
  getTeamMessages from the adapter.
- Mission Control loses its Team and Activity tabs (both read the team
  server) and keeps the fleet view, with its own load-error state.
- Drop the stale adapter mocks from the web tests; the Mission Control
  test checks that no team tab is offered.
This commit is contained in:
shumeiko.it
2026-10-24 16:39:27 +02:00
parent 8ce2c42544
commit 7dac06706e
8 changed files with 74 additions and 213 deletions

View File

@@ -1429,16 +1429,6 @@ class LocalAdapter {
return res.json();
}
async searchTeamMemory(query: string, limit = 20): Promise<Array<{ id: string; content: string; authorId: string; authorName: string; importance: string; timestamp: string }>> {
try {
const res = await this.fetch(`/api/team/memory/search?q=${encodeURIComponent(query)}&limit=${limit}`);
const data = await res.json();
return data.results ?? [];
} catch {
return [];
}
}
async getLocalInferenceHardware(): Promise<{ hardware: Record<string, unknown>; source: string }> {
const res = await this.fetch('/api/local-inference/hardware');
return res.json();
@@ -2948,31 +2938,6 @@ class LocalAdapter {
return res.json();
}
// --- Team ---
async getTeamMembers(): Promise<{ id: string; name: string; status: string; avatar?: string }[]> {
try {
const res = await this.fetch('/api/team/members');
if (!res.ok) return [];
return unwrapArray(await res.json());
} catch (err) { console.error('[adapter] getTeamMembers failed:', err); return []; }
}
async getTeamActivity(): Promise<{ id: string; user: string; action: string; timestamp: string }[]> {
try {
const res = await this.fetch('/api/team/activity');
if (!res.ok) return [];
return unwrapArray(await res.json());
} catch (err) { console.error('[adapter] getTeamActivity failed:', err); return []; }
}
async getTeamMessages(workspaceId: string): Promise<unknown[]> {
try {
const res = await this.fetch(`/api/team/messages?workspaceId=${workspaceId}`);
if (!res.ok) return [];
return unwrapArray(await res.json());
} catch (err) { console.error('[adapter] getTeamMessages failed:', err); return []; }
}
// --- Costs ---
async getCosts(): Promise<unknown> {
const res = await this.fetch('/api/costs');