feat(KB-330): rename internal packages from @kb/* to @fusion/*

- Rename @kb/core, @kb/dashboard, @kb/engine to @fusion/* namespace
- Update all import statements across 143+ files to use new package names
- Update workspace dependencies and root package.json references
- Fix bundler configurations (tsup, vite) for new package names
- Update test files and fix typecheck issues
- Add changeset file documenting the package rename
This commit is contained in:
gsxdsm
2026-03-31 13:33:44 -07:00
parent a9e47f8708
commit 3f77d80096
142 changed files with 340 additions and 328 deletions

View File

@@ -1,5 +1,5 @@
import { useState, useCallback, useEffect } from "react";
import type { TaskDetail, TaskCreateInput, Task, ThemeMode } from "@kb/core";
import type { TaskDetail, TaskCreateInput, Task, ThemeMode } from "@fusion/core";
import { fetchConfig, fetchSettings, fetchAuthStatus, updateSettings, fetchModels } from "./api";
import type { ModelInfo } from "./api";
import { Header } from "./components/Header";

View File

@@ -19,7 +19,7 @@ import {
startPlanningStreaming,
fetchTasks,
} from "./api";
import type { Task, TaskDetail, BatchStatusResponse } from "@kb/core";
import type { Task, TaskDetail, BatchStatusResponse } from "@fusion/core";
const FAKE_DETAIL: TaskDetail = {
id: "KB-001",
@@ -1061,7 +1061,7 @@ describe("Git Management API", () => {
// --- Planning Mode API Tests ---
import { startPlanning, respondToPlanning, cancelPlanning, createTaskFromPlanning } from "./api";
import type { PlanningQuestion, PlanningSummary } from "@kb/core";
import type { PlanningQuestion, PlanningSummary } from "@fusion/core";
describe("Planning Mode API", () => {
const originalFetch = globalThis.fetch;

View File

@@ -17,9 +17,9 @@ import type {
WorkflowStep,
WorkflowStepInput,
WorkflowStepResult,
} from "@kb/core";
import type { PlanningQuestion, PlanningSummary, PlanningResponse } from "@kb/core";
import type { ScheduledTask, ScheduledTaskCreateInput, ScheduledTaskUpdateInput, AutomationRunResult, AutomationStep } from "@kb/core";
} from "@fusion/core";
import type { PlanningQuestion, PlanningSummary, PlanningResponse } from "@fusion/core";
import type { ScheduledTask, ScheduledTaskCreateInput, ScheduledTaskUpdateInput, AutomationRunResult, AutomationStep } from "@fusion/core";
function looksLikeHtml(body: string): boolean {
const trimmed = body.trim();
@@ -564,16 +564,16 @@ export function refreshPrStatus(id: string): Promise<PrRefreshResponse> {
// --- Issue Management API ---
/** Re-export GitHub badge-related types for convenience */
export type { IssueInfo, BatchStatusResult, BatchStatusEntry } from "@kb/core";
export type { IssueInfo, BatchStatusResult, BatchStatusEntry } from "@fusion/core";
/** Fetch cached issue status for a task */
export function fetchIssueStatus(id: string): Promise<{ issueInfo: import("@kb/core").IssueInfo; stale: boolean }> {
return api<{ issueInfo: import("@kb/core").IssueInfo; stale: boolean }>(`/tasks/${id}/issue/status`);
export function fetchIssueStatus(id: string): Promise<{ issueInfo: import("@fusion/core").IssueInfo; stale: boolean }> {
return api<{ issueInfo: import("@fusion/core").IssueInfo; stale: boolean }>(`/tasks/${id}/issue/status`);
}
/** Force refresh issue status from GitHub */
export function refreshIssueStatus(id: string): Promise<import("@kb/core").IssueInfo> {
return api<import("@kb/core").IssueInfo>(`/tasks/${id}/issue/refresh`, {
export function refreshIssueStatus(id: string): Promise<import("@fusion/core").IssueInfo> {
return api<import("@fusion/core").IssueInfo>(`/tasks/${id}/issue/refresh`, {
method: "POST",
});
}
@@ -1221,7 +1221,7 @@ export function reorderAutomationSteps(id: string, stepIds: string[]): Promise<S
// ── Activity Log API ────────────────────────────────────────────
/** Re-export ActivityLogEntry type from core for convenience */
export type { ActivityLogEntry, ActivityEventType } from "@kb/core";
export type { ActivityLogEntry, ActivityEventType } from "@fusion/core";
/** Fetch activity log entries */
export function fetchActivityLog(options?: { limit?: number; since?: string; type?: ActivityEventType }): Promise<ActivityLogEntry[]> {
@@ -1281,11 +1281,11 @@ export function fetchWorkflowResults(taskId: string): Promise<WorkflowStepResult
// ── Workflow Step Templates ──────────────────────────────────────────────
/** Re-export WorkflowStepTemplate type from core */
export type { WorkflowStepTemplate } from "@kb/core";
export type { WorkflowStepTemplate } from "@fusion/core";
/** Fetch all built-in workflow step templates */
export function fetchWorkflowStepTemplates(): Promise<{ templates: import("@kb/core").WorkflowStepTemplate[] }> {
return api<{ templates: import("@kb/core").WorkflowStepTemplate[] }>("/workflow-step-templates");
export function fetchWorkflowStepTemplates(): Promise<{ templates: import("@fusion/core").WorkflowStepTemplate[] }> {
return api<{ templates: import("@fusion/core").WorkflowStepTemplate[] }>("/workflow-step-templates");
}
/** Create a workflow step from a built-in template */
@@ -1477,7 +1477,7 @@ export function cancelSubtaskBreakdown(sessionId: string): Promise<void> {
// ── Agent API ────────────────────────────────────────────────────────────
import type { Agent, AgentDetail, AgentCapability, AgentState, AgentHeartbeatEvent, AgentCreateInput, AgentUpdateInput } from "@kb/core";
import type { Agent, AgentDetail, AgentCapability, AgentState, AgentHeartbeatEvent, AgentCreateInput, AgentUpdateInput } from "@fusion/core";
export type { Agent, AgentDetail, AgentCapability, AgentState, AgentHeartbeatEvent, AgentCreateInput, AgentUpdateInput };
/** Fetch all agents, optionally filtered by state or role */

View File

@@ -1,7 +1,7 @@
import { useState, useEffect, useCallback, useRef } from "react";
import { X, History, Trash2, Filter, RefreshCw, CheckCircle, XCircle, ArrowRight, Plus, Settings, AlertCircle, Loader2 } from "lucide-react";
import { fetchActivityLog, clearActivityLog, type ActivityLogEntry, type ActivityEventType } from "../api";
import type { Task } from "@kb/core";
import type { Task } from "@fusion/core";
interface ActivityLogModalProps {
isOpen: boolean;

View File

@@ -1,4 +1,5 @@
import { useState, useEffect, useCallback } from "react";
import type { JSX } from "react";
import { X, Plus, Play, Pause, Square, Activity, Heart, Trash2, RefreshCw, Bot } from "lucide-react";
import type { Agent, AgentCapability, AgentState } from "../api";
import { fetchAgents, createAgent, updateAgentState, deleteAgent } from "../api";

View File

@@ -1,4 +1,4 @@
import type { AgentLogEntry } from "@kb/core";
import type { AgentLogEntry } from "@fusion/core";
import { ProviderIcon } from "./ProviderIcon";
import { useRef, useEffect } from "react";

View File

@@ -1,5 +1,5 @@
import type { Task, TaskDetail, Column as ColumnType, TaskCreateInput } from "@kb/core";
import { COLUMNS } from "@kb/core";
import type { Task, TaskDetail, Column as ColumnType, TaskCreateInput } from "@fusion/core";
import { COLUMNS } from "@fusion/core";
import { Column } from "./Column";
import type { ToastType } from "../hooks/useToast";
import { useState, useMemo, useEffect, useCallback, useRef } from "react";

View File

@@ -1,7 +1,7 @@
import { memo, useMemo, useState, useCallback, useEffect } from "react";
import { useFlashOnIncrease } from "../hooks/useFlashOnIncrease";
import type { Task, TaskDetail, Column as ColumnType, TaskCreateInput } from "@kb/core";
import { COLUMN_LABELS, COLUMN_DESCRIPTIONS } from "@kb/core";
import type { Task, TaskDetail, Column as ColumnType, TaskCreateInput } from "@fusion/core";
import { COLUMN_LABELS, COLUMN_DESCRIPTIONS } from "@fusion/core";
import { TaskCard } from "./TaskCard";
import { WorktreeGroup } from "./WorktreeGroup";
import { QuickEntryBox } from "./QuickEntryBox";

View File

@@ -1,5 +1,5 @@
import { GitPullRequest, CircleDot } from "lucide-react";
import type { IssueInfo, PrInfo } from "@kb/core";
import type { IssueInfo, PrInfo } from "@fusion/core";
import type { ToastType } from "../hooks/useToast";
interface GitHubBadgeProps {

View File

@@ -1,5 +1,5 @@
import { useState, useEffect, useCallback, useRef } from "react";
import type { Task } from "@kb/core";
import type { Task } from "@fusion/core";
import {
apiFetchGitHubIssues,
apiImportGitHubIssue,

View File

@@ -1,5 +1,5 @@
import { useState, useEffect, useCallback, useRef, useMemo } from "react";
import type { Task } from "@kb/core";
import type { Task } from "@fusion/core";
import type { ToastType } from "../hooks/useToast";
import type {
GitStatus,

View File

@@ -1,6 +1,6 @@
import { useState, useCallback, useEffect, useRef } from "react";
import { Brain, Link, Lightbulb, ListTree, Zap } from "lucide-react";
import type { Task, TaskCreateInput, Settings } from "@kb/core";
import type { Task, TaskCreateInput, Settings } from "@fusion/core";
import type { ToastType } from "../hooks/useToast";
import { fetchModels, uploadAttachment, fetchSettings } from "../api";
import type { ModelInfo } from "../api";

View File

@@ -1,7 +1,7 @@
import { useState, useCallback, useMemo, Fragment, useEffect, useRef } from "react";
import { LayoutGrid, List as ListIcon, ArrowUpDown, ArrowUp, ArrowDown, Search, Link, Columns3, EyeOff, Eye, ChevronRight } from "lucide-react";
import type { Task, TaskDetail, Column, TaskStep, TaskCreateInput } from "@kb/core";
import { COLUMN_LABELS, COLUMNS } from "@kb/core";
import type { Task, TaskDetail, Column, TaskStep, TaskCreateInput } from "@fusion/core";
import { COLUMN_LABELS, COLUMNS } from "@fusion/core";
import { fetchTaskDetail } from "../api";
import type { ModelInfo } from "../api";
import { QuickEntryBox } from "./QuickEntryBox";

View File

@@ -1,7 +1,7 @@
import { useState, useEffect, useCallback, useMemo, useRef } from "react";
import { fetchModels, updateTask } from "../api";
import type { ModelInfo } from "../api";
import type { Task, TaskDetail } from "@kb/core";
import type { Task, TaskDetail } from "@fusion/core";
import type { ToastType } from "../hooks/useToast";
import { CustomModelDropdown } from "./CustomModelDropdown";
import { ProviderIcon } from "./ProviderIcon";

View File

@@ -1,5 +1,5 @@
import { useState, useCallback, useEffect, useRef, useMemo } from "react";
import type { Task, TaskCreateInput, ModelPreset, Settings, WorkflowStep } from "@kb/core";
import type { Task, TaskCreateInput, ModelPreset, Settings, WorkflowStep } from "@fusion/core";
import type { ToastType } from "../hooks/useToast";
import { uploadAttachment, fetchModels, fetchSettings, fetchWorkflowSteps, refineText, getRefineErrorMessage, type RefinementType } from "../api";
import type { ModelInfo } from "../api";

View File

@@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import { PlanningModeModal } from "./PlanningModeModal";
import { TaskDetailModal } from "./TaskDetailModal";
import type { Task, TaskDetail, PlanningQuestion, PlanningSummary, MergeResult } from "@kb/core";
import type { Task, TaskDetail, PlanningQuestion, PlanningSummary, MergeResult } from "@fusion/core";
// Mock the API functions
const mockStartPlanning = vi.fn();

View File

@@ -1,5 +1,5 @@
import { useState, useCallback, useEffect, useRef } from "react";
import type { Task, PlanningQuestion, PlanningSummary } from "@kb/core";
import type { Task, PlanningQuestion, PlanningSummary } from "@fusion/core";
import {
startPlanning,
startPlanningStreaming,

View File

@@ -1,6 +1,6 @@
import { useState, useCallback } from "react";
import { GitPullRequest, ExternalLink, RefreshCw, Plus, MessageSquare } from "lucide-react";
import type { PrInfo } from "@kb/core";
import type { PrInfo } from "@fusion/core";
import { createPr, refreshPrStatus, type PrRefreshResponse } from "../api";
import type { ToastType } from "../hooks/useToast";

View File

@@ -1,6 +1,6 @@
import { useState, useCallback, useRef, useEffect } from "react";
import type { ToastType } from "../hooks/useToast";
import type { Task, TaskCreateInput } from "@kb/core";
import type { Task, TaskCreateInput } from "@fusion/core";
import type { ModelInfo, RefinementType } from "../api";
import { fetchModels, refineText, getRefineErrorMessage } from "../api";
import { Link, Brain, Lightbulb, ListTree, Sparkles, Save } from "lucide-react";

View File

@@ -1,6 +1,6 @@
import { useState, useCallback } from "react";
import { Play, Pause, Pencil, Trash2, Clock, CheckCircle, XCircle, ChevronDown, ChevronUp, Layers } from "lucide-react";
import type { ScheduledTask, AutomationRunResult, AutomationStepResult } from "@kb/core";
import type { ScheduledTask, AutomationRunResult, AutomationStepResult } from "@fusion/core";
/**
* Format a duration in milliseconds to a human-readable string.

View File

@@ -1,8 +1,8 @@
import { useState, useCallback, useEffect } from "react";
import type { ScheduledTask, ScheduledTaskCreateInput, ScheduleType, AutomationStep } from "@kb/core";
import type { ScheduledTask, ScheduledTaskCreateInput, ScheduleType, AutomationStep } from "@fusion/core";
import { ScheduleStepsEditor } from "./ScheduleStepsEditor";
/** Mapping from preset schedule types to their cron expressions. Mirrored from @kb/core. */
/** Mapping from preset schedule types to their cron expressions. Mirrored from @fusion/core. */
const PRESET_CRON: Record<Exclude<ScheduleType, "custom">, string> = {
hourly: "0 * * * *",
daily: "0 0 * * *",

View File

@@ -1,6 +1,6 @@
import { useState, useCallback } from "react";
import { Plus, Trash2, ChevronUp, ChevronDown, Pencil, GripVertical } from "lucide-react";
import type { AutomationStep, AutomationStepType } from "@kb/core";
import type { AutomationStep, AutomationStepType } from "@fusion/core";
import { StepTypeBadge } from "./StepTypeBadge";
interface ScheduleStepsEditorProps {

View File

@@ -1,6 +1,6 @@
import { useState, useEffect, useCallback } from "react";
import { Plus, Clock } from "lucide-react";
import type { ScheduledTask, ScheduledTaskCreateInput } from "@kb/core";
import type { ScheduledTask, ScheduledTaskCreateInput } from "@fusion/core";
import {
fetchAutomations,
createAutomation,

View File

@@ -1,6 +1,6 @@
import { useState, useEffect, useCallback, useRef } from "react";
import { THINKING_LEVELS, GLOBAL_SETTINGS_KEYS, PROJECT_SETTINGS_KEYS } from "@kb/core";
import type { Settings, GlobalSettings, ThemeMode, ColorTheme, ModelPreset } from "@kb/core";
import { THINKING_LEVELS, GLOBAL_SETTINGS_KEYS, PROJECT_SETTINGS_KEYS } from "@fusion/core";
import type { Settings, GlobalSettings, ThemeMode, ColorTheme, ModelPreset } from "@fusion/core";
import { fetchSettings, updateSettings, updateGlobalSettings, fetchAuthStatus, loginProvider, logoutProvider, fetchModels, testNtfyNotification } from "../api";
import type { AuthProvider, ModelInfo } from "../api";
import type { ToastType } from "../hooks/useToast";

View File

@@ -1,5 +1,5 @@
import { useState, useCallback } from "react";
import type { TaskDetail } from "@kb/core";
import type { TaskDetail } from "@fusion/core";
import { addSteeringComment } from "../api";
import type { ToastType } from "../hooks/useToast";

View File

@@ -1,5 +1,5 @@
import { Terminal, Sparkles } from "lucide-react";
import type { AutomationStepType } from "@kb/core";
import type { AutomationStepType } from "@fusion/core";
interface StepTypeBadgeProps {
type: AutomationStepType;

View File

@@ -1,5 +1,5 @@
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import type { Task } from "@kb/core";
import type { Task } from "@fusion/core";
import {
startSubtaskBreakdown,
connectSubtaskStream,

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi } from "vitest";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import { TaskCard } from "./TaskCard";
import type { Task } from "@kb/core";
import type { Task } from "@fusion/core";
// Mock lucide-react to avoid SVG rendering issues in test env
vi.mock("lucide-react", () => ({

View File

@@ -1,6 +1,6 @@
import { memo, useCallback, useState, useRef, useEffect, useMemo } from "react";
import { Link, Clock, Layers, Pencil, ChevronDown, Folder } from "lucide-react";
import type { Task, TaskDetail, Column, PrInfo, IssueInfo } from "@kb/core";
import type { Task, TaskDetail, Column, PrInfo, IssueInfo } from "@fusion/core";
import { fetchTaskDetail, uploadAttachment } from "../api";
import { GitHubBadge } from "./GitHubBadge";
import { pickPreferredBadge } from "./TaskCardBadge";

View File

@@ -1,5 +1,5 @@
import { memo, useEffect } from "react";
import type { IssueInfo, PrInfo } from "@kb/core";
import type { IssueInfo, PrInfo } from "@fusion/core";
import { useBadgeWebSocket } from "../hooks/useBadgeWebSocket";
import { GitHubBadge } from "./GitHubBadge";

View File

@@ -2,8 +2,8 @@ import { useCallback, useEffect, useRef, useState } from "react";
import { Pencil } from "lucide-react";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
import type { Task, TaskDetail, TaskAttachment, Column, MergeResult, PrInfo } from "@kb/core";
import { COLUMN_LABELS, VALID_TRANSITIONS } from "@kb/core";
import type { Task, TaskDetail, TaskAttachment, Column, MergeResult, PrInfo } from "@fusion/core";
import { COLUMN_LABELS, VALID_TRANSITIONS } from "@fusion/core";
import { uploadAttachment, deleteAttachment, updateTask, pauseTask, unpauseTask, fetchTaskDetail, requestSpecRevision, approvePlan, rejectPlan, refineTask } from "../api";
import type { ToastType } from "../hooks/useToast";
import { useAgentLogs } from "../hooks/useAgentLogs";

View File

@@ -1,6 +1,6 @@
import { useCallback } from "react";
import { Sun, Moon, Monitor } from "lucide-react";
import type { ThemeMode, ColorTheme } from "@kb/core";
import type { ThemeMode, ColorTheme } from "@fusion/core";
interface ThemeSelectorProps {
themeMode: ThemeMode;

View File

@@ -1,7 +1,7 @@
import { describe, it, expect } from "vitest";
import { render, screen } from "@testing-library/react";
import { WorkflowResultsTab } from "./WorkflowResultsTab";
import type { WorkflowStepResult } from "@kb/core";
import type { WorkflowStepResult } from "@fusion/core";
describe("WorkflowResultsTab", () => {
const mockResults: WorkflowStepResult[] = [

View File

@@ -1,4 +1,4 @@
import type { WorkflowStepResult } from "@kb/core";
import type { WorkflowStepResult } from "@fusion/core";
interface WorkflowResultsTabProps {
taskId: string;

View File

@@ -1,5 +1,5 @@
import { useState, useEffect, useCallback } from "react";
import type { WorkflowStep, WorkflowStepInput } from "@kb/core";
import type { WorkflowStep, WorkflowStepInput } from "@fusion/core";
import {
fetchWorkflowSteps,
createWorkflowStep,

View File

@@ -1,5 +1,5 @@
import { memo } from "react";
import type { Task, TaskDetail } from "@kb/core";
import type { Task, TaskDetail } from "@fusion/core";
import { ClipboardList, GitBranch } from "lucide-react";
import { TaskCard } from "./TaskCard";
import type { ToastType } from "../hooks/useToast";

View File

@@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import { ActivityLogModal } from "../ActivityLogModal";
import * as apiModule from "../../api";
import type { ActivityLogEntry } from "@kb/core";
import type { ActivityLogEntry } from "@fusion/core";
// Mock the API module
vi.mock("../../api", () => ({

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi } from "vitest";
import { render, screen } from "@testing-library/react";
import { AgentLogViewer } from "../AgentLogViewer";
import type { AgentLogEntry } from "@kb/core";
import type { AgentLogEntry } from "@fusion/core";
function makeEntry(overrides: Partial<AgentLogEntry> = {}): AgentLogEntry {
return {

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent, waitFor, act } from "@testing-library/react";
import { App } from "../../App";
import type { Settings } from "@kb/core";
import type { Settings } from "@fusion/core";
const defaultSettings: Settings = {
maxConcurrent: 2,

View File

@@ -2,9 +2,9 @@ import React from "react";
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent } from "@testing-library/react";
import { Board } from "../Board";
import { COLUMNS } from "@kb/core";
import { COLUMNS } from "@fusion/core";
import type { Task } from "@kb/core";
import type { Task } from "@fusion/core";
const columnRenderCounts: Record<string, number> = {};

View File

@@ -3,7 +3,7 @@ import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { Column } from "../Column";
import type { Task, Column as ColumnType } from "@kb/core";
import type { Task, Column as ColumnType } from "@fusion/core";
// Mock child components to keep tests focused on the Column badge behavior
const taskCardRenderSpy = vi.fn();

View File

@@ -1,6 +1,6 @@
import { describe, it, expect, vi } from "vitest";
import { render, screen, fireEvent } from "@testing-library/react";
import type { IssueInfo, PrInfo } from "@kb/core";
import type { IssueInfo, PrInfo } from "@fusion/core";
import { GitHubBadge } from "../GitHubBadge";
describe("GitHubBadge", () => {

View File

@@ -8,7 +8,7 @@ import {
apiImportGitHubPull,
fetchGitRemotes,
} from "../../api";
import type { Task } from "@kb/core";
import type { Task } from "@fusion/core";
import type { GitRemote } from "../../api";
// Mock the API module

View File

@@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { GitManagerModal } from "../GitManagerModal";
import type { Task } from "@kb/core";
import type { Task } from "@fusion/core";
// Mock the API module with all functions
vi.mock("../../api", async () => {

View File

@@ -2,7 +2,7 @@ import type { ComponentProps } from "react";
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import { InlineCreateCard } from "../InlineCreateCard";
import type { Task, Column } from "@kb/core";
import type { Task, Column } from "@fusion/core";
import { fetchModels, fetchSettings } from "../../api";
import type { ModelInfo } from "../../api";

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi } from "vitest";
import { render, screen, fireEvent, waitFor, within } from "@testing-library/react";
import { ListView } from "../ListView";
import type { Task, TaskDetail } from "@kb/core";
import type { Task, TaskDetail } from "@fusion/core";
// Mock the API
vi.mock("../../api", () => ({

View File

@@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, waitFor, within } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { ModelSelectorTab } from "../ModelSelectorTab";
import type { Task } from "@kb/core";
import type { Task } from "@fusion/core";
import * as api from "../../api";
vi.mock("../../api", async () => {

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import { NewTaskModal } from "../NewTaskModal";
import type { Task, Column } from "@kb/core";
import type { Task, Column } from "@fusion/core";
// Mock the api module
vi.mock("../../api", () => ({

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { render, screen, fireEvent, waitFor, act } from "@testing-library/react";
import { QuickEntryBox } from "../QuickEntryBox";
import type { Task } from "@kb/core";
import type { Task } from "@fusion/core";
const MOCK_MODELS = [
{

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent } from "@testing-library/react";
import { ScheduleCard } from "../ScheduleCard";
import type { ScheduledTask, AutomationRunResult } from "@kb/core";
import type { ScheduledTask, AutomationRunResult } from "@fusion/core";
// Mock lucide-react
vi.mock("lucide-react", () => ({

View File

@@ -1,10 +1,10 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import { ScheduleForm } from "../ScheduleForm";
import type { ScheduledTask } from "@kb/core";
import type { ScheduledTask } from "@fusion/core";
// Mock @kb/core to provide type-only exports (no runtime values needed)
vi.mock("@kb/core", () => ({}));
// Mock @fusion/core to provide type-only exports (no runtime values needed)
vi.mock("@fusion/core", () => ({}));
function makeSchedule(overrides: Partial<ScheduledTask> = {}): ScheduledTask {
return {

View File

@@ -1,10 +1,10 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent } from "@testing-library/react";
import { ScheduleStepsEditor } from "../ScheduleStepsEditor";
import type { AutomationStep } from "@kb/core";
import type { AutomationStep } from "@fusion/core";
// Mock @kb/core
vi.mock("@kb/core", () => ({}));
// Mock @fusion/core
vi.mock("@fusion/core", () => ({}));
// Mock lucide-react
vi.mock("lucide-react", () => ({

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import { ScheduledTasksModal } from "../ScheduledTasksModal";
import type { ScheduledTask, AutomationRunResult } from "@kb/core";
import type { ScheduledTask, AutomationRunResult } from "@fusion/core";
// Mock lucide-react
vi.mock("lucide-react", () => ({
@@ -17,8 +17,8 @@ vi.mock("lucide-react", () => ({
ChevronUp: () => <span data-testid="icon-up"></span>,
}));
// Mock @kb/core (no runtime values needed — ScheduleForm inlines presets)
vi.mock("@kb/core", () => ({}));
// Mock @fusion/core (no runtime values needed — ScheduleForm inlines presets)
vi.mock("@fusion/core", () => ({}));
// Mock the API module
const mockFetchAutomations = vi.fn();

View File

@@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { SettingsModal } from "../SettingsModal";
import type { Settings } from "@kb/core";
import type { Settings } from "@fusion/core";
const defaultSettings: Settings = {
maxConcurrent: 2,

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import { SteeringTab } from "../SteeringTab";
import type { TaskDetail } from "@kb/core";
import type { TaskDetail } from "@fusion/core";
// Mock the API module
vi.mock("../../api", () => ({

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent, waitFor, act } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import type { Column, Task, TaskDetail } from "@kb/core";
import type { Column, Task, TaskDetail } from "@fusion/core";
import { TaskCard } from "../TaskCard";
import React, { useState } from "react";

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi } from "vitest";
import { render, screen, fireEvent, act, waitFor } from "@testing-library/react";
import { TaskDetailModal } from "../TaskDetailModal";
import type { TaskDetail, Column, MergeResult, Task } from "@kb/core";
import type { TaskDetail, Column, MergeResult, Task } from "@fusion/core";
vi.mock("../../api", () => ({
uploadAttachment: vi.fn(),

View File

@@ -1,6 +1,6 @@
import { describe, it, expect, vi } from "vitest";
import { render, screen, fireEvent } from "@testing-library/react";
import { COLOR_THEMES } from "@kb/core";
import { COLOR_THEMES } from "@fusion/core";
import { ThemeSelector } from "../ThemeSelector";
describe("ThemeSelector", () => {

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import { WorkflowStepManager } from "../WorkflowStepManager";
import type { WorkflowStep } from "@kb/core";
import type { WorkflowStep } from "@fusion/core";
const mockSteps: WorkflowStep[] = [
{

View File

@@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { renderHook, act } from "@testing-library/react";
import { useBatchBadgeFetch, __resetBatchBadgeStoreForTests } from "../useBatchBadgeFetch";
import * as api from "../../api";
import type { BatchStatusResult } from "@kb/core";
import type { BatchStatusResult } from "@fusion/core";
// Mock the API module
vi.mock("../../api", () => ({

View File

@@ -19,7 +19,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { renderHook, act, waitFor } from "@testing-library/react";
import { useTasks } from "../useTasks";
import * as api from "../../api";
import type { Task, Column } from "@kb/core";
import type { Task, Column } from "@fusion/core";
// Mock the api module
vi.mock("../../api", () => ({

View File

@@ -1,7 +1,7 @@
import { readFileSync } from "node:fs";
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { renderHook, act } from "@testing-library/react";
import { COLOR_THEMES } from "@kb/core";
import { COLOR_THEMES } from "@fusion/core";
import { useTheme, getThemeInitScript } from "../useTheme";
describe("useTheme", () => {

View File

@@ -1,5 +1,5 @@
import { useState, useEffect, useRef, useCallback } from "react";
import type { AgentLogEntry } from "@kb/core";
import type { AgentLogEntry } from "@fusion/core";
import { fetchAgentLogs } from "../api";
export const MAX_LOG_ENTRIES = 500;

View File

@@ -1,5 +1,5 @@
import { useCallback, useEffect, useRef, useSyncExternalStore } from "react";
import type { IssueInfo, PrInfo } from "@kb/core";
import type { IssueInfo, PrInfo } from "@fusion/core";
interface BadgeUpdatedMessage {
type: "badge:updated";

View File

@@ -1,6 +1,6 @@
import { useCallback, useRef, useState } from "react";
import { fetchBatchStatus } from "../api";
import type { BatchStatusResult } from "@kb/core";
import type { BatchStatusResult } from "@fusion/core";
// Module-level store to share batch data across hook instances
const batchBadgeStore = {

View File

@@ -1,5 +1,5 @@
import { useState, useEffect, useRef, useCallback } from "react";
import type { AgentLogEntry } from "@kb/core";
import type { AgentLogEntry } from "@fusion/core";
import { fetchAgentLogs } from "../api";
export const MAX_LOG_ENTRIES = 500;

View File

@@ -1,5 +1,5 @@
import { useState, useEffect, useCallback, useRef } from "react";
import type { Task, Column, TaskCreateInput, MergeResult } from "@kb/core";
import type { Task, Column, TaskCreateInput, MergeResult } from "@fusion/core";
import * as api from "../api";
function normalizeTask(task: Task): Task {

View File

@@ -1,5 +1,5 @@
import { useState, useEffect, useCallback, useLayoutEffect } from "react";
import { COLOR_THEMES, type ThemeMode, type ColorTheme } from "@kb/core";
import { COLOR_THEMES, type ThemeMode, type ColorTheme } from "@fusion/core";
const THEME_MODE_STORAGE_KEY = "kb-dashboard-theme-mode";
const COLOR_THEME_STORAGE_KEY = "kb-dashboard-color-theme";

View File

@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import type { ModelPreset } from "@kb/core";
import type { ModelPreset } from "@fusion/core";
import {
applyPresetToSelection,
generatePresetId,

View File

@@ -1,4 +1,4 @@
import type { ModelPreset } from "@kb/core";
import type { ModelPreset } from "@fusion/core";
export function getPresetByName(presets: ModelPreset[], name: string): ModelPreset | undefined {
const normalizedName = name.trim().toLowerCase();

View File

@@ -1,6 +1,6 @@
import { describe, it, expect } from "vitest";
import { groupByWorktree, getWorktreeLabel } from "./worktreeGrouping";
import type { Task } from "@kb/core";
import type { Task } from "@fusion/core";
function makeTask(overrides: Partial<Task> & { id: string }): Task {
return {

View File

@@ -1,4 +1,4 @@
import type { Task } from "@kb/core";
import type { Task } from "@fusion/core";
export interface WorktreeGroupData {
label: string;
@@ -18,8 +18,8 @@ export function getWorktreeLabel(worktreePath: string): string {
/**
* Topological sort of tasks by dependency order.
* Mirrors resolveDependencyOrder from @kb/core but inlined to avoid
* build alias issues (Vite aliases @kb/core to types.ts only).
* Mirrors resolveDependencyOrder from @fusion/core but inlined to avoid
* build alias issues (Vite aliases @fusion/core to types.ts only).
*/
function resolveDependencyOrder(tasks: Task[]): string[] {
const taskMap = new Map(tasks.map((t) => [t.id, t]));