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:
@@ -5,7 +5,6 @@ const mocks = vi.hoisted(() => ({
|
||||
getModels: vi.fn(),
|
||||
getModel: vi.fn(),
|
||||
getSettings: vi.fn(),
|
||||
getTeamMembers: vi.fn(),
|
||||
patchWorkspace: vi.fn(),
|
||||
useChat: vi.fn(),
|
||||
toast: vi.fn(),
|
||||
@@ -59,7 +58,6 @@ beforeEach(() => {
|
||||
.mockResolvedValueOnce(['openai/model-released-while-open']);
|
||||
mocks.getModel.mockResolvedValue('openai/existing-model');
|
||||
mocks.getSettings.mockResolvedValue({});
|
||||
mocks.getTeamMembers.mockResolvedValue([]);
|
||||
mocks.patchWorkspace.mockResolvedValue(undefined);
|
||||
mocks.useChat.mockReturnValue(chatState);
|
||||
});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Play, Pause, Square, Radio, Clock, Zap, RefreshCw, Users, Plus, Rocket, AlertCircle } from 'lucide-react';
|
||||
import { Play, Pause, Square, Radio, Clock, Zap, RefreshCw, Plus, Rocket, AlertCircle } from 'lucide-react';
|
||||
import { adapter } from '@/lib/adapter';
|
||||
import { DATE_LOCALE } from '@/lib/date-locale';
|
||||
import type { FleetSession, Workspace } from '@/lib/types';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
@@ -21,45 +20,24 @@ interface ToolInventoryCounts {
|
||||
hooked: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Per-tab load errors (error-as-empty rule, notes/error-as-empty.md): each
|
||||
* data tab needs an ERROR render distinct from its EMPTY render so a fetch
|
||||
* failure never masquerades as a genuinely empty fleet/team/activity feed.
|
||||
*/
|
||||
interface SectionErrors {
|
||||
fleet: string | null;
|
||||
team: string | null;
|
||||
activity: string | null;
|
||||
}
|
||||
|
||||
const NO_ERRORS: SectionErrors = { fleet: null, team: null, activity: null };
|
||||
|
||||
const MissionControlApp = ({ onSpawnOpen }: MissionControlAppProps) => {
|
||||
const [sessions, setSessions] = useState<FleetSession[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [teamMembers, setTeamMembers] = useState<{ id: string; name: string; status: string }[]>([]);
|
||||
const [activity, setActivity] = useState<{ id: string; user: string; action: string; timestamp: string }[]>([]);
|
||||
const [tab, setTab] = useState<'fleet' | 'team' | 'activity'>('fleet');
|
||||
const [toolCounts, setToolCounts] = useState<ToolInventoryCounts | null>(null);
|
||||
const [errors, setErrors] = useState<SectionErrors>(NO_ERRORS);
|
||||
|
||||
const reason = (r: PromiseRejectedResult, fallback: string): string =>
|
||||
r.reason instanceof Error ? r.reason.message : fallback;
|
||||
// Load error kept distinct from the empty fleet (error-as-empty rule,
|
||||
// notes/error-as-empty.md) so a fetch failure never reads as "no sessions".
|
||||
const [fleetError, setFleetError] = useState<string | null>(null);
|
||||
|
||||
const refresh = async () => {
|
||||
// Reset loading + clear stale errors so Retry gives visible feedback that
|
||||
// Reset loading + clear a stale error so Retry gives visible feedback that
|
||||
// the re-fetch fired (otherwise the error panel lingers with no spinner).
|
||||
setLoading(true);
|
||||
setErrors(NO_ERRORS);
|
||||
const [fleet, members, act, tools] = await Promise.allSettled([
|
||||
setFleetError(null);
|
||||
const [fleet, tools] = await Promise.allSettled([
|
||||
adapter.getFleet(),
|
||||
adapter.getTeamMembers(),
|
||||
adapter.getTeamActivity(),
|
||||
adapter.detectTools(),
|
||||
]);
|
||||
if (fleet.status === 'fulfilled') setSessions(fleet.value);
|
||||
if (members.status === 'fulfilled') setTeamMembers(members.value);
|
||||
if (act.status === 'fulfilled') setActivity(act.value);
|
||||
if (tools.status === 'fulfilled' && tools.value) {
|
||||
const ts = tools.value.tools;
|
||||
setToolCounts({
|
||||
@@ -68,13 +46,9 @@ const MissionControlApp = ({ onSpawnOpen }: MissionControlAppProps) => {
|
||||
hooked: ts.filter((t) => t.hooksInstalled).length,
|
||||
});
|
||||
}
|
||||
// Thread each tab's load error so the ERROR render stays distinct from the
|
||||
// EMPTY render (error-as-empty rule); clear on success.
|
||||
setErrors({
|
||||
fleet: fleet.status === 'rejected' ? reason(fleet, 'Failed to load fleet sessions') : null,
|
||||
team: members.status === 'rejected' ? reason(members, 'Failed to load team members') : null,
|
||||
activity: act.status === 'rejected' ? reason(act, 'Failed to load activity') : null,
|
||||
});
|
||||
if (fleet.status === 'rejected') {
|
||||
setFleetError(fleet.reason instanceof Error ? fleet.reason.message : 'Failed to load fleet sessions');
|
||||
}
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
@@ -145,136 +119,63 @@ const MissionControlApp = ({ onSpawnOpen }: MissionControlAppProps) => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Tabs */}
|
||||
<div className="flex gap-1 mb-4 p-0.5 rounded-lg bg-muted/50 w-fit">
|
||||
{(['fleet', 'team', 'activity'] as const).map(t => (
|
||||
<button
|
||||
key={t}
|
||||
onClick={() => setTab(t)}
|
||||
className={`px-3 py-1.5 text-xs rounded-md font-display transition-colors capitalize ${
|
||||
tab === t ? 'bg-primary text-primary-foreground' : 'text-muted-foreground hover:text-foreground'
|
||||
}`}
|
||||
{fleetError && sessions.length === 0 ? (
|
||||
<div role="alert" className="flex flex-col items-center justify-center py-12 text-center">
|
||||
<AlertCircle className="w-10 h-10 text-destructive/50 mb-3" />
|
||||
<p className="text-sm text-foreground">Couldn't load fleet sessions</p>
|
||||
<p className="text-xs text-muted-foreground/60 max-w-xs">This is a load error, not an empty fleet. {fleetError}</p>
|
||||
<Button variant="outline" size="sm" className="mt-3 gap-1.5 text-xs" onClick={refresh}>
|
||||
<RefreshCw className="w-3.5 h-3.5" /> Retry
|
||||
</Button>
|
||||
</div>
|
||||
) : sessions.length === 0 && !loading && (
|
||||
<div className="flex flex-col items-center justify-center py-12 text-center">
|
||||
<Radio className="w-10 h-10 text-muted-foreground/20 mb-3" />
|
||||
<p className="text-sm text-muted-foreground">No active fleet sessions</p>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="mt-3 gap-1.5 text-xs"
|
||||
onClick={onSpawnOpen}
|
||||
>
|
||||
{t}
|
||||
</button>
|
||||
<Rocket className="w-3.5 h-3.5" /> Spawn your first agent
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
<div className="space-y-2">
|
||||
{sessions.map(s => (
|
||||
<div key={s.workspaceId} className="p-3 rounded-xl bg-secondary/30 border border-border/30">
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className={`w-2 h-2 rounded-full ${s.status === 'active' ? 'bg-emerald-400 animate-pulse' : s.status === 'paused' ? 'bg-amber-400' : 'bg-muted-foreground'}`} />
|
||||
<span className="text-sm font-display font-medium text-foreground">{s.workspaceName}</span>
|
||||
<span className={`text-[11px] capitalize ${statusColors[s.status]}`}>{s.status}</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-1">
|
||||
{s.status === 'active' && (
|
||||
<button type="button" onClick={() => handleAction(s.workspaceId, 'pause')} aria-label={`Pause ${s.workspaceName}`} className={`p-1 rounded text-muted-foreground hover:text-amber-400 transition-colors ${iconButtonFocus}`}>
|
||||
<Pause className="w-3.5 h-3.5" aria-hidden="true" />
|
||||
</button>
|
||||
)}
|
||||
{s.status === 'paused' && (
|
||||
<button type="button" onClick={() => handleAction(s.workspaceId, 'resume')} aria-label={`Resume ${s.workspaceName}`} className={`p-1 rounded text-muted-foreground hover:text-emerald-400 transition-colors ${iconButtonFocus}`}>
|
||||
<Play className="w-3.5 h-3.5" aria-hidden="true" />
|
||||
</button>
|
||||
)}
|
||||
<button type="button" onClick={() => handleAction(s.workspaceId, 'stop')} aria-label={`Stop ${s.workspaceName}`} className={`p-1 rounded text-muted-foreground hover:text-destructive transition-colors ${iconButtonFocus}`}>
|
||||
<Square className="w-3.5 h-3.5" aria-hidden="true" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-4 text-[11px] text-muted-foreground">
|
||||
<span className="flex items-center gap-0.5"><Clock className="w-2.5 h-2.5" />{Math.round((s.duration ?? 0) / 60)}m</span>
|
||||
<span className="flex items-center gap-0.5"><Zap className="w-2.5 h-2.5" />{s.toolCount ?? 0} tools</span>
|
||||
<span>{s.model ?? 'default'}</span>
|
||||
<span>{(s.tokenUsage ?? 0).toLocaleString()} tokens</span>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{tab === 'fleet' && (
|
||||
<>
|
||||
{errors.fleet && sessions.length === 0 ? (
|
||||
<div role="alert" className="flex flex-col items-center justify-center py-12 text-center">
|
||||
<AlertCircle className="w-10 h-10 text-destructive/50 mb-3" />
|
||||
<p className="text-sm text-foreground">Couldn't load fleet sessions</p>
|
||||
<p className="text-xs text-muted-foreground/60 max-w-xs">This is a load error, not an empty fleet. {errors.fleet}</p>
|
||||
<Button variant="outline" size="sm" className="mt-3 gap-1.5 text-xs" onClick={refresh}>
|
||||
<RefreshCw className="w-3.5 h-3.5" /> Retry
|
||||
</Button>
|
||||
</div>
|
||||
) : sessions.length === 0 && !loading && (
|
||||
<div className="flex flex-col items-center justify-center py-12 text-center">
|
||||
<Radio className="w-10 h-10 text-muted-foreground/20 mb-3" />
|
||||
<p className="text-sm text-muted-foreground">No active fleet sessions</p>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="mt-3 gap-1.5 text-xs"
|
||||
onClick={onSpawnOpen}
|
||||
>
|
||||
<Rocket className="w-3.5 h-3.5" /> Spawn your first agent
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
<div className="space-y-2">
|
||||
{sessions.map(s => (
|
||||
<div key={s.workspaceId} className="p-3 rounded-xl bg-secondary/30 border border-border/30">
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className={`w-2 h-2 rounded-full ${s.status === 'active' ? 'bg-emerald-400 animate-pulse' : s.status === 'paused' ? 'bg-amber-400' : 'bg-muted-foreground'}`} />
|
||||
<span className="text-sm font-display font-medium text-foreground">{s.workspaceName}</span>
|
||||
<span className={`text-[11px] capitalize ${statusColors[s.status]}`}>{s.status}</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-1">
|
||||
{s.status === 'active' && (
|
||||
<button type="button" onClick={() => handleAction(s.workspaceId, 'pause')} aria-label={`Pause ${s.workspaceName}`} className={`p-1 rounded text-muted-foreground hover:text-amber-400 transition-colors ${iconButtonFocus}`}>
|
||||
<Pause className="w-3.5 h-3.5" aria-hidden="true" />
|
||||
</button>
|
||||
)}
|
||||
{s.status === 'paused' && (
|
||||
<button type="button" onClick={() => handleAction(s.workspaceId, 'resume')} aria-label={`Resume ${s.workspaceName}`} className={`p-1 rounded text-muted-foreground hover:text-emerald-400 transition-colors ${iconButtonFocus}`}>
|
||||
<Play className="w-3.5 h-3.5" aria-hidden="true" />
|
||||
</button>
|
||||
)}
|
||||
<button type="button" onClick={() => handleAction(s.workspaceId, 'stop')} aria-label={`Stop ${s.workspaceName}`} className={`p-1 rounded text-muted-foreground hover:text-destructive transition-colors ${iconButtonFocus}`}>
|
||||
<Square className="w-3.5 h-3.5" aria-hidden="true" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-4 text-[11px] text-muted-foreground">
|
||||
<span className="flex items-center gap-0.5"><Clock className="w-2.5 h-2.5" />{Math.round((s.duration ?? 0) / 60)}m</span>
|
||||
<span className="flex items-center gap-0.5"><Zap className="w-2.5 h-2.5" />{s.toolCount ?? 0} tools</span>
|
||||
<span>{s.model ?? 'default'}</span>
|
||||
<span>{(s.tokenUsage ?? 0).toLocaleString()} tokens</span>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
{tab === 'team' && (
|
||||
<div className="space-y-2">
|
||||
{errors.team && teamMembers.length === 0 ? (
|
||||
<div role="alert" className="flex flex-col items-center justify-center py-12 text-center">
|
||||
<AlertCircle className="w-10 h-10 text-destructive/50 mb-3" />
|
||||
<p className="text-sm text-foreground">Couldn't load team members</p>
|
||||
<p className="text-xs text-muted-foreground/60 max-w-xs">This is a load error, not an empty team. {errors.team}</p>
|
||||
<Button variant="outline" size="sm" className="mt-3 gap-1.5 text-xs" onClick={refresh}>
|
||||
<RefreshCw className="w-3.5 h-3.5" /> Retry
|
||||
</Button>
|
||||
</div>
|
||||
) : teamMembers.length === 0 && (
|
||||
<div className="flex flex-col items-center justify-center py-12 text-center">
|
||||
<Users className="w-10 h-10 text-muted-foreground/20 mb-3" />
|
||||
<p className="text-sm text-muted-foreground">No team members</p>
|
||||
<p className="text-xs text-muted-foreground/60">Connect to a team server in Settings</p>
|
||||
</div>
|
||||
)}
|
||||
{teamMembers.map(m => (
|
||||
<div key={m.id} className="flex items-center gap-3 p-3 rounded-xl bg-secondary/30 border border-border/30">
|
||||
<div className={`w-2 h-2 rounded-full ${m.status === 'online' ? 'bg-emerald-400' : 'bg-muted-foreground'}`} />
|
||||
<span className="text-sm text-foreground flex-1">{m.name}</span>
|
||||
<span className="text-[11px] text-muted-foreground capitalize">{m.status}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{tab === 'activity' && (
|
||||
<div className="space-y-1.5">
|
||||
{errors.activity && activity.length === 0 ? (
|
||||
<div role="alert" className="flex flex-col items-center justify-center py-12 text-center">
|
||||
<AlertCircle className="w-10 h-10 text-destructive/50 mb-3" />
|
||||
<p className="text-sm text-foreground">Couldn't load activity</p>
|
||||
<p className="text-xs text-muted-foreground/60 max-w-xs">This is a load error, not an empty feed. {errors.activity}</p>
|
||||
<Button variant="outline" size="sm" className="mt-3 gap-1.5 text-xs" onClick={refresh}>
|
||||
<RefreshCw className="w-3.5 h-3.5" /> Retry
|
||||
</Button>
|
||||
</div>
|
||||
) : activity.length === 0 && (
|
||||
<div className="text-center py-12">
|
||||
<p className="text-sm text-muted-foreground">No activity</p>
|
||||
</div>
|
||||
)}
|
||||
{activity.map(a => (
|
||||
<div key={a.id} className="flex items-center gap-3 p-2 rounded-lg bg-secondary/20 border border-border/20">
|
||||
<span className="text-xs text-foreground font-display">{a.user}</span>
|
||||
<span className="text-xs text-muted-foreground flex-1">{a.action}</span>
|
||||
<span className="text-[11px] text-muted-foreground">{new Date(a.timestamp).toLocaleTimeString(DATE_LOCALE)}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -74,7 +74,6 @@ const mocks = vi.hoisted(() => ({
|
||||
getWorkspaceContext: vi.fn(),
|
||||
getWorkspaceState: vi.fn(),
|
||||
getWorkspaceActivity: vi.fn(),
|
||||
getTeamMembers: vi.fn(),
|
||||
getWorkspaceFiles: vi.fn(),
|
||||
uploadFile: vi.fn(),
|
||||
},
|
||||
@@ -171,7 +170,6 @@ describe('Lane HM · workspace surface (destination)', () => {
|
||||
mocks.adapter.getWorkspaceContext.mockResolvedValue(okCtx);
|
||||
mocks.adapter.getWorkspaceState.mockResolvedValue({ pending: [], blocked: [] });
|
||||
mocks.adapter.getWorkspaceActivity.mockResolvedValue({ events: [] });
|
||||
mocks.adapter.getTeamMembers.mockResolvedValue([]);
|
||||
mocks.adapter.getWorkspaceFiles.mockResolvedValue([]);
|
||||
|
||||
const { default: WorkspaceDesktopApp } = await import('@/components/os/apps/WorkspaceDesktopApp');
|
||||
@@ -203,7 +201,6 @@ describe('Lane HM · workspace surface (destination)', () => {
|
||||
mocks.adapter.getWorkspaceContext.mockResolvedValue(okCtx);
|
||||
mocks.adapter.getWorkspaceState.mockResolvedValue({ pending: [], blocked: [] });
|
||||
mocks.adapter.getWorkspaceActivity.mockResolvedValue({ events: [] });
|
||||
mocks.adapter.getTeamMembers.mockResolvedValue([]);
|
||||
mocks.adapter.getWorkspaceFiles.mockResolvedValue([]);
|
||||
|
||||
const { default: WorkspaceDesktopApp } = await import('@/components/os/apps/WorkspaceDesktopApp');
|
||||
|
||||
@@ -6,8 +6,6 @@ import type { FleetSession } from '@/lib/types';
|
||||
const mocks = vi.hoisted(() => ({
|
||||
adapter: {
|
||||
getFleet: vi.fn(),
|
||||
getTeamMembers: vi.fn(),
|
||||
getTeamActivity: vi.fn(),
|
||||
detectTools: vi.fn(),
|
||||
fleetAction: vi.fn(),
|
||||
},
|
||||
@@ -31,8 +29,6 @@ beforeEach(() => {
|
||||
session('w-active', 'Alpha Workspace', 'active'),
|
||||
session('w-paused', 'Beta Workspace', 'paused'),
|
||||
]);
|
||||
mocks.adapter.getTeamMembers.mockResolvedValue([]);
|
||||
mocks.adapter.getTeamActivity.mockResolvedValue([]);
|
||||
mocks.adapter.detectTools.mockResolvedValue({ tools: [] });
|
||||
mocks.adapter.fleetAction.mockResolvedValue(undefined);
|
||||
});
|
||||
@@ -56,4 +52,14 @@ describe('MissionControlApp accessibility', () => {
|
||||
expect(control.className).toContain('focus-visible:ring-[var(--focus-ring)]');
|
||||
}
|
||||
});
|
||||
|
||||
it('shows only the fleet view: team mode is not part of the community edition', async () => {
|
||||
render(<MissionControlApp onSpawnOpen={vi.fn()} />);
|
||||
|
||||
await screen.findByText('Alpha Workspace');
|
||||
|
||||
expect(screen.queryByRole('button', { name: /^team$/i })).toBeNull();
|
||||
expect(screen.queryByRole('button', { name: /^activity$/i })).toBeNull();
|
||||
expect(screen.queryByText(/team server/i)).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -28,7 +28,6 @@ const mocks = vi.hoisted(() => ({
|
||||
getWorkspaceContext: vi.fn(),
|
||||
getWorkspaceState: vi.fn(),
|
||||
getWorkspaceActivity: vi.fn(),
|
||||
getTeamMembers: vi.fn(),
|
||||
getWorkspaceFiles: vi.fn(),
|
||||
getWorkspaceTasks: vi.fn().mockResolvedValue([]),
|
||||
},
|
||||
@@ -55,7 +54,6 @@ beforeEach(() => {
|
||||
pending: [{ id: 't1', content: 'Draft the launch brief' }], blocked: [], completed: [],
|
||||
});
|
||||
mocks.adapter.getWorkspaceActivity.mockResolvedValue({ events: [] });
|
||||
mocks.adapter.getTeamMembers.mockResolvedValue([]);
|
||||
mocks.adapter.getWorkspaceFiles.mockResolvedValue([]);
|
||||
});
|
||||
afterEach(() => {
|
||||
|
||||
@@ -26,7 +26,6 @@ const mocks = vi.hoisted(() => ({
|
||||
getWorkspaceContext: vi.fn(),
|
||||
getWorkspaceState: vi.fn(),
|
||||
getWorkspaceActivity: vi.fn(),
|
||||
getTeamMembers: vi.fn(),
|
||||
getWorkspaceFiles: vi.fn(),
|
||||
getWorkspaceTasks: vi.fn().mockResolvedValue([]),
|
||||
listMemories: vi.fn(),
|
||||
@@ -219,7 +218,6 @@ describe('WorkspaceDesktopApp error states (P2)', () => {
|
||||
function mockFeedsOk() {
|
||||
mocks.adapter.getWorkspaceState.mockResolvedValue(null);
|
||||
mocks.adapter.getWorkspaceActivity.mockResolvedValue({ events: [] });
|
||||
mocks.adapter.getTeamMembers.mockResolvedValue([]);
|
||||
mocks.adapter.getWorkspaceFiles.mockResolvedValue([]);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ const mocks = vi.hoisted(() => ({
|
||||
getWorkspaceContext: vi.fn(),
|
||||
getWorkspaceState: vi.fn(),
|
||||
getWorkspaceActivity: vi.fn(),
|
||||
getTeamMembers: vi.fn(),
|
||||
getWorkspaceFiles: vi.fn(),
|
||||
},
|
||||
shell: {
|
||||
@@ -248,7 +247,6 @@ describe('WorkspaceDesktopApp memory tab embed (P3/D2, S02-FR2)', () => {
|
||||
});
|
||||
mocks.adapter.getWorkspaceState.mockResolvedValue({ pending: [], blocked: [] });
|
||||
mocks.adapter.getWorkspaceActivity.mockResolvedValue([]);
|
||||
mocks.adapter.getTeamMembers.mockResolvedValue([]);
|
||||
mocks.adapter.getWorkspaceFiles.mockResolvedValue([]);
|
||||
|
||||
const { default: WorkspaceDesktopApp } = await import('@/components/os/apps/WorkspaceDesktopApp');
|
||||
|
||||
Reference in New Issue
Block a user