mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-01 09:39:53 +01:00
fix(connections): recover missing personal AI credentials in chat (#15376)
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
ea8e686197
commit
2ca0d26a99
19 files changed
+359
-35
No files matched your search
@@ -16,6 +16,7 @@ import type {
|
||||
} from "@paperclipai/shared";
|
||||
import { heartbeatsApi } from "@/api/heartbeats";
|
||||
import { nativeRunEventsToTranscript } from "./transcript/native-run-events";
|
||||
import { pendingConnectionIntentInteraction } from "@/fixtures/issueThreadInteractionFixtures";
|
||||
import type { HeartbeatRunEvent } from "@paperclipai/shared";
|
||||
|
||||
const transcriptState = vi.hoisted(() => ({
|
||||
@@ -1010,6 +1011,22 @@ describe("TaskChatThread runtime transcript selection", () => {
|
||||
expect(container.textContent).not.toContain("Workspace restore failed");
|
||||
});
|
||||
|
||||
it("directs a missing personal AI credential to its card without offering a premature retry", () => {
|
||||
render(<TaskChatThread comments={[]} onAdd={async () => {}} issueStatus="blocked"
|
||||
onRetryFailedRun={vi.fn()} interactions={[{
|
||||
...pendingConnectionIntentInteraction, sourceRunId: "missing-ai-run",
|
||||
payload: { ...pendingConnectionIntentInteraction.payload, purpose: "ai" },
|
||||
}]} linkedRuns={[{
|
||||
runId: "missing-ai-run", runtimeMode: "legacy", status: "failed", errorCode: "configuration_incomplete",
|
||||
agentId: "agent-1", agentName: "Chief of Staff", adapterType: "claude_local",
|
||||
createdAt: "2026-08-25T18:00:00.000Z", startedAt: null, finishedAt: "2026-08-25T18:00:02.000Z",
|
||||
}]} />);
|
||||
expect(container.textContent).toContain("AI connection needed");
|
||||
expect(container.textContent).toContain("Use the connection card below to continue.");
|
||||
expect(container.textContent).not.toContain("The selected AI account is unavailable");
|
||||
expect(container.querySelector('[data-testid="task-chat-run-failed-try-again"]')).toBeNull();
|
||||
});
|
||||
|
||||
it("projects the saved Plan inline at its native write_document boundary", () => {
|
||||
planState.data = planDocument({
|
||||
updatedAt: new Date("2026-08-25T18:00:02.000Z"),
|
||||
|
||||
Reference in new issue
Block a user