fix: complete refactoring integration — rename remaining snake_case API files and fix test imports

During refactoring verification found several remaining inconsistencies:

API files (kebab-case naming):
- Rename config_profiles.ts → config-profiles.ts
- Rename tool_definitions.ts → tool-definitions.ts
- Update all imports across 8 files

Missing Python __init__.py (backend package structure):
- Add utils/__init__.py
- Add services/__init__.py
- Add schemas/__init__.py
- Add services/build/__init__.py

Test file import fixes (component reorganization fallout):
- DashboardPage.test.tsx: import from ./dashboard → ./DashboardPage
- ProjectsPage.test.tsx: import from ./projects → ./ProjectsPage
- event-toast-bridge.test.tsx: fix relative paths for moved components
  (../state/events → ../../../state/events, ./toast-rules → ../../toast-rules)
- notification-center.test.tsx: fix relative path
  (../state/notifications → ../../../state/notifications)

Quality gates: tsc --noEmit (pass), build (pass), py_compile (pass)
Tests: 9/12 test files pass (3 pre-existing UI test failures unrelated to refactoring)
This commit is contained in:
Developer
2026-06-05 09:30:44 +00:00
parent 6553a8845b
commit a9e2dd3552
16 changed files with 16 additions and 16 deletions
@@ -1,12 +1,12 @@
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { render, act } from "@testing-library/react";
import { EventToastBridge } from "./event-toast-bridge";
import { useEventContext } from "../state/events";
import { useEventContext } from "../../../state/events";
import { getUserConfig } from "../../../api/settings";
import { handleEventToast } from "./toast-rules";
import { handleEventToast } from "../../toast-rules";
import type { InstanceEventPayload } from "../../../types/events";
vi.mock("../state/events", () => ({
vi.mock("../../../state/events", () => ({
useEventContext: vi.fn(),
}));
@@ -14,8 +14,8 @@ vi.mock("../../../api/settings", () => ({
getUserConfig: vi.fn(),
}));
vi.mock("./toast-rules", async (importOriginal) => {
const actual = await importOriginal<typeof import("./toast-rules")>();
vi.mock("../../toast-rules", async (importOriginal) => {
const actual = await importOriginal<typeof import("../../toast-rules")>();
return {
...actual,
handleEventToast: vi.fn(),
@@ -1,7 +1,7 @@
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { render, screen, fireEvent, cleanup } from "@testing-library/react";
import { NotificationCenter } from "./notification-center";
import { NotificationProvider } from "../state/notifications";
import { NotificationProvider } from "../../../state/notifications";
vi.mock("../../../api/notifications", () => ({
getNotifications: vi.fn(),