Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ad736f3
task: plan docs update for the week's user-facing changes (29 Sep - 6…
raphaeltm Oct 6, 2026
74fd3ad
docs: explain agent permission requests, questions and links; usage l…
raphaeltm Oct 6, 2026
67efaa7
docs: screenshots of permission, question and link cards, and the usa…
raphaeltm Oct 6, 2026
2814fd0
docs: add the 29 Sep - 6 Oct cycle to Recent Product Changes; storage…
raphaeltm Oct 6, 2026
ddde86b
docs(api): list the chat agent-request routes
raphaeltm Oct 6, 2026
bd4dd1e
docs: address round-1 local review - accurate cards, release ranges, …
raphaeltm Oct 6, 2026
a302e05
docs: address round-2 user review - stall risk, release steps, card w…
raphaeltm Oct 6, 2026
2944d49
docs: address round-2 fact-check - session-start failures, Chat vs Ta…
raphaeltm Oct 6, 2026
5f99196
docs: address round-3 review - root devcontainers, stalled turns, Cha…
raphaeltm Oct 6, 2026
848fb0a
docs: address round-4 review - woken chats, VM-only stall check, Chat…
raphaeltm Oct 6, 2026
c16b779
docs: address round-5 user review - woken chats can't ask, clearer pe…
raphaeltm Oct 6, 2026
b6ab2b1
docs: address round-5 fact-check - woken chat model, env var forwardi…
raphaeltm Oct 6, 2026
48433c8
docs: address round-6 user review - woken chats run without asking, l…
raphaeltm Oct 6, 2026
63dbce2
docs: address round-6 fact-check - woken tasks don't open PRs, restor…
raphaeltm Oct 6, 2026
f71f144
docs: address round-7 fact-check - fresh-start PRs, Task wake path, c…
raphaeltm Oct 6, 2026
a8613c6
docs: address round-7 user review - follow-up pushes after a Task sle…
raphaeltm Oct 6, 2026
35add05
docs: address round-8 fact-check - fresh-start pushes, Task label, re…
raphaeltm Oct 6, 2026
3f32289
docs: address round-8 user review - woken-chat fix trade-off, keep fi…
raphaeltm Oct 6, 2026
66b5d3b
docs: address round-9 fact-check - Task pushes after a sleep, skills …
raphaeltm Oct 6, 2026
c54407d
docs: address round-9 user review - replies to slept Tasks, settings …
raphaeltm Oct 6, 2026
0a3db0d
Merge remote-tracking branch 'origin/main' into HEAD
raphaeltm Oct 6, 2026
2a961c3
docs: complete screenshot review and resolve Sonar duplication
raphaeltm Oct 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions apps/web/tests/playwright/docs-chat-fixtures.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/** Common session-list fixtures and API responses for documentation captures. */
import type { Route } from '@playwright/test';

export function neighboringDocsSessions(now: number) {
const hour = 60 * 60_000;
return [
{
id: 'sess-sleeping',
topic: 'Move invoice rendering to a queue',
status: 'sleeping' as const,
taskStatus: 'in_progress' as const,
taskMode: 'conversation' as const,
lastMessageAt: now - 3 * hour,
},
{
id: 'sess-completed',
topic: 'Add retries to the webhook sender',
status: 'stopped' as const,
taskStatus: 'completed' as const,
taskMode: 'task' as const,
lastMessageAt: now - 26 * hour,
},
];
}

interface DocsSession {
id: string;
topic: string;
workspaceId: string | null;
startedAt: number;
task: { id: string };
}

interface DocsChatRoutes {
project: { id: string };
user: unknown;
sessions: DocsSession[];
messages: Record<string, unknown[]>;
state: unknown;
}

/** Called after scene-specific routes, preserving their priority over common responses. */
export async function fulfillDocsChatRoute(route: Route, data: DocsChatRoutes): Promise<void> {
const { pathname } = new URL(route.request().url());
const projectId = data.project.id;
const json = (body: unknown) => route.fulfill({ status: 200, json: body });

if (pathname.startsWith('/api/auth')) return json(data.user);
if (pathname === '/api/projects') return json({ projects: [data.project], nextCursor: null });
if (pathname === `/api/projects/${projectId}`) return json(data.project);
if (pathname === `/api/projects/${projectId}/sessions`) {
return json({ sessions: data.sessions, total: data.sessions.length });
}

const detail = pathname.match(
new RegExp(`^/api/projects/${projectId}/sessions/([^/]+)(/messages|/state)?$`)
);
if (detail) {
const [, sessionId, suffix] = detail;
const session = data.sessions.find((item) => item.id === sessionId);
const messages = data.messages[sessionId ?? ''] ?? [];
if (suffix === '/state') return json(data.state);
if (suffix === '/messages') return json({ messages, hasMore: false });
if (session) return json({ session, messages, hasMore: false, state: data.state });
}

// The chat re-reads its task on open; return its real status to avoid a starting banner.
const taskMatch = pathname.match(new RegExp(`^/api/projects/${projectId}/tasks/([^/]+)$`));
if (taskMatch) {
const session = data.sessions.find((item) => item.task.id === taskMatch[1]);
if (session) {
return json({
...session.task,
title: session.topic,
projectId,
workspaceId: session.workspaceId,
startedAt: new Date(session.startedAt).toISOString(),
});
}
}

if (pathname === '/api/report-issue/config') return json({ enabled: false });
if (pathname === `/api/projects/${projectId}/comment-threads`) {
return json({ threads: [], total: 0 });
}
if (pathname === `/api/projects/${projectId}/members`) return json({ members: [] });
if (pathname === `/api/projects/${projectId}/agent-profiles`) return json({ items: [] });
if (pathname === `/api/projects/${projectId}/tasks`) return json({ tasks: [], total: 0 });
if (pathname === '/api/agents') return json({ agents: [] });
if (pathname.startsWith('/api/notifications')) return json([]);
if (pathname.startsWith('/api/credentials')) return json([]);
if (pathname === '/api/github/installations') return json([]);
return json({});
}
Loading
Loading