Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions apps/web/src/components/ChatView.browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1773,6 +1773,36 @@ describe("ChatView timeline estimator parity (full app)", () => {
}
});

it("restores the connecting composer state without showing the stop button", async () => {
const mounted = await mountChatView({
viewport: DEFAULT_VIEWPORT,
snapshot: createSnapshotForTargetUser({
targetMessageId: "msg-user-connecting-state" as MessageId,
targetText: "connecting state target",
sessionStatus: "starting",
}),
});

try {
const connectingButton = await waitForElement(
() => document.querySelector<HTMLButtonElement>('button[aria-label="Connecting"]'),
"Unable to find connecting send button.",
);
expect(connectingButton.disabled).toBe(true);
expect(
document.querySelector<HTMLButtonElement>('button[aria-label="Stop generation"]'),
).toBeNull();

const composerEditor = await waitForElement(
() => document.querySelector<HTMLElement>('[contenteditable="false"]'),
"Unable to find disabled composer editor.",
);
expect(composerEditor).toBeTruthy();
} finally {
await mounted.cleanup();
}
});

it("hides the archive action when the pointer leaves a thread row", async () => {
const mounted = await mountChatView({
viewport: DEFAULT_VIEWPORT,
Expand Down
2 changes: 0 additions & 2 deletions apps/web/src/components/ChatView.logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ export function collectUserMessageBlobPreviewUrls(message: ChatMessage): string[
return previewUrls;
}

export type SendPhase = "idle" | "preparing-worktree" | "sending-turn";

export interface PullRequestDialogState {
initialReference: string | null;
key: number;
Expand Down
Loading
Loading