AkurAI Build
Menu

popagent

public

Latest change baffb3c2ac834de138dc9ac86330273851896d24 - Move task board to root overview by AkurAI Build

import { describe, expect, test } from "bun:test";
import { renderToStaticMarkup } from "react-dom/server";
import { WorkspaceChatDeleteDialog, WorkspaceOverview } from "./WorkspaceOverview";

describe("WorkspaceChatDeleteDialog", () => {
  test("confirms permanent deletion of active and archived workspace chats", () => {
    const html = renderToStaticMarkup(<WorkspaceChatDeleteDialog
      workspace={{ id: "docs", name: "Docs", repositoryPath: "docs", createdAt: "", updatedAt: "" }}
      deleting={false}
      error=""
      onCancel={() => {}}
      onDelete={() => {}}
    />);

    expect(html).toContain("Delete all chats in “Docs”?");
    expect(html).toContain("active and archived chats");
    expect(html).toContain("Independent long-term memories are retained");
  });
});

test("puts task creation and the live Kanban board in the root overview", () => {
  const html = renderToStaticMarkup(<WorkspaceOverview
    workspaces={[{ id: "mail", name: "AkurAI-Mail", repositoryPath: "AkurAI-Mail", createdAt: "", updatedAt: "" }]}
    sessions={[]}
    tasks={[{
      id: "mail-task",
      sessionId: null,
      scheduleId: null,
      source: "user",
      workspaceId: "mail",
      prompt: "Configure mail clients",
      model: "cx/gpt-5.6-sol",
      status: "running",
      output: null,
      error: null,
      stepsCompleted: 4,
      progress: "Reviewer checking TLS",
      recoveryCount: 0,
      attemptCount: 1,
      maxAttempts: 3,
      nextAttemptAt: null,
      lastErrorClass: null,
      deadLetteredAt: null,
      createdAt: "2026-08-14T18:16:51.000Z",
      startedAt: "2026-08-14T18:16:52.000Z",
      completedAt: null,
    }]}
    taskStepLimit={24}
    onCreateTask={async () => true}
    onCancelTask={() => {}}
    onOpen={() => {}}
    onManage={() => {}}
    onOpenNavigation={() => {}}
  />);

  expect(html).toContain("Task board");
  expect(html).toContain("Start a task");
  expect(html).toContain("AkurAI-Mail");
  expect(html).toContain("Reviewer checking TLS");
  expect(html).toContain("4 of 24 steps");
});