From 543fee5d5623dedcb4a40a4cdf329b05efae2763 Mon Sep 17 00:00:00 2001 From: Developer Date: Tue, 2 Jun 2026 23:07:37 +0000 Subject: [PATCH] fix: correct CSS module import paths after file renames (Task 4.4) - Fix incorrect relative paths in feature components after directory restructure - Components in features/{domain}/ were importing ./features/{domain}/X.module.css instead of ./X.module.css - Affected: AppShell, GitToolbar, FileEditor, CommitDialog, CommitPanel, MergeDialog, SettingsTabLayout, InstanceList, TerminalComponent Quality gates: tsc (pass), eslint (pass), build (pass) Refs: repo-restructure Task 4.4 --- apps/web/scripts/check-structure.js | 8 +- .../components/features/git/CommitDialog.tsx | 2 +- .../components/features/git/CommitPanel.tsx | 2 +- .../components/features/git/FileEditor.tsx | 2 +- .../components/features/git/GitToolbar.tsx | 2 +- .../components/features/git/MergeDialog.tsx | 2 +- .../features/session/InstanceList.tsx | 2 +- .../features/settings/SettingsTabLayout.tsx | 2 +- .../features/terminal/TerminalComponent.tsx | 2 +- apps/web/src/components/layout/AppShell.tsx | 2 +- apps/web/src/router.tsx | 97 +++++++++++-------- 11 files changed, 70 insertions(+), 53 deletions(-) diff --git a/apps/web/scripts/check-structure.js b/apps/web/scripts/check-structure.js index 2f221fd..eae68ec 100644 --- a/apps/web/scripts/check-structure.js +++ b/apps/web/scripts/check-structure.js @@ -41,14 +41,10 @@ function checkFileSize(filePath, maxLines = 300) { const relative = path.relative(SRC_DIR, filePath); if (lines > maxLines) { if (OVERSIZE_ALLOWLIST.includes(relative)) { - console.warn( - `⚠️ OVERSIZED (${lines} lines, allowlisted): ${relative}`, - ); + console.warn(`⚠️ OVERSIZED (${lines} lines, allowlisted): ${relative}`); warnings++; } else { - console.error( - `❌ OVERSIZED (${lines} lines): ${relative}`, - ); + console.error(`❌ OVERSIZED (${lines} lines): ${relative}`); errors++; } } diff --git a/apps/web/src/components/features/git/CommitDialog.tsx b/apps/web/src/components/features/git/CommitDialog.tsx index 97e6b04..28957eb 100644 --- a/apps/web/src/components/features/git/CommitDialog.tsx +++ b/apps/web/src/components/features/git/CommitDialog.tsx @@ -1,4 +1,4 @@ -import styles from "./features/git/CommitDialog.module.css"; +import styles from "./CommitDialog.module.css"; import React, { useState } from "react"; import { Icon } from "../../ui/Icon"; diff --git a/apps/web/src/components/features/git/CommitPanel.tsx b/apps/web/src/components/features/git/CommitPanel.tsx index 665ec34..4b45176 100644 --- a/apps/web/src/components/features/git/CommitPanel.tsx +++ b/apps/web/src/components/features/git/CommitPanel.tsx @@ -1,7 +1,7 @@ import { useState } from "react"; import { commitChanges } from "../../../api/git-repositories"; -import styles from "./features/git/CommitPanel.module.css"; +import styles from "./CommitPanel.module.css"; interface CommitPanelProps { projectId: string; diff --git a/apps/web/src/components/features/git/FileEditor.tsx b/apps/web/src/components/features/git/FileEditor.tsx index 06bd03e..8ff15f5 100644 --- a/apps/web/src/components/features/git/FileEditor.tsx +++ b/apps/web/src/components/features/git/FileEditor.tsx @@ -1,4 +1,4 @@ -import styles from "./features/git/FileEditor.module.css"; +import styles from "./FileEditor.module.css"; import React, { useCallback, useEffect, useState } from "react"; import { useSearchParams } from "react-router-dom"; import { apiClient } from "../../../api/client"; diff --git a/apps/web/src/components/features/git/GitToolbar.tsx b/apps/web/src/components/features/git/GitToolbar.tsx index 9b4000e..4e5f848 100644 --- a/apps/web/src/components/features/git/GitToolbar.tsx +++ b/apps/web/src/components/features/git/GitToolbar.tsx @@ -11,7 +11,7 @@ import { } from "../../../api/git-repositories"; import { Icon } from "../../ui/Icon"; import { MergeDialog } from "./MergeDialog"; -import styles from "./features/git/GitToolbar.module.css"; +import styles from "./GitToolbar.module.css"; interface GitToolbarProps { projectId: string; diff --git a/apps/web/src/components/features/git/MergeDialog.tsx b/apps/web/src/components/features/git/MergeDialog.tsx index 04c832d..2a4fc90 100644 --- a/apps/web/src/components/features/git/MergeDialog.tsx +++ b/apps/web/src/components/features/git/MergeDialog.tsx @@ -1,4 +1,4 @@ -import styles from "./features/git/MergeDialog.module.css"; +import styles from "./MergeDialog.module.css"; import { useState } from "react"; import { mergeBranches } from "../../../api/git-repositories"; diff --git a/apps/web/src/components/features/session/InstanceList.tsx b/apps/web/src/components/features/session/InstanceList.tsx index 1d6b8f5..bb34fd0 100644 --- a/apps/web/src/components/features/session/InstanceList.tsx +++ b/apps/web/src/components/features/session/InstanceList.tsx @@ -13,7 +13,7 @@ import { startInstance, stopInstance, } from "../../../api/sessions"; -import styles from "./features/session/InstanceList.module.css"; +import styles from "./InstanceList.module.css"; const API_BASE_URL = import.meta.env.VITE_API_BASE_URL ?? "http://localhost:8000"; diff --git a/apps/web/src/components/features/settings/SettingsTabLayout.tsx b/apps/web/src/components/features/settings/SettingsTabLayout.tsx index b0307ad..ed91848 100644 --- a/apps/web/src/components/features/settings/SettingsTabLayout.tsx +++ b/apps/web/src/components/features/settings/SettingsTabLayout.tsx @@ -1,6 +1,6 @@ import React from "react"; import { Link, useLocation } from "react-router-dom"; -import styles from "./features/settings/SettingsTabLayout.module.css"; +import styles from "./SettingsTabLayout.module.css"; interface Tab { id: string; diff --git a/apps/web/src/components/features/terminal/TerminalComponent.tsx b/apps/web/src/components/features/terminal/TerminalComponent.tsx index 3d0c6d4..f10913c 100644 --- a/apps/web/src/components/features/terminal/TerminalComponent.tsx +++ b/apps/web/src/components/features/terminal/TerminalComponent.tsx @@ -10,7 +10,7 @@ import type { ServerControlMessage, TerminalConnectionState, } from "../../../types/terminal"; -import styles from "./features/terminal/TerminalComponent.module.css"; +import styles from "./TerminalComponent.module.css"; interface TerminalProps { instanceId: string; diff --git a/apps/web/src/components/layout/AppShell.tsx b/apps/web/src/components/layout/AppShell.tsx index e65c3ed..a670ab1 100644 --- a/apps/web/src/components/layout/AppShell.tsx +++ b/apps/web/src/components/layout/AppShell.tsx @@ -8,7 +8,7 @@ import { useAuth } from "../../state/auth"; import { useSessions } from "../../state/sessions"; import { Icon } from "../ui/Icon"; import type { IconName } from "../../utils/icons"; -import styles from "./layout/AppShell.module.css"; +import styles from "./AppShell.module.css"; const NAV_ITEMS: { to: string; label: string; icon: IconName }[] = [ { to: "/", label: "Home", icon: "dashboard" }, diff --git a/apps/web/src/router.tsx b/apps/web/src/router.tsx index e87842e..193e5e6 100644 --- a/apps/web/src/router.tsx +++ b/apps/web/src/router.tsx @@ -19,42 +19,63 @@ import { ToolTypesPage } from "./pages/ToolTypesPage"; import { SessionsPage } from "./pages/SessionsPage"; export const AppRouter = () => { - return ( - - } /> - } /> - } /> - } /> - } /> - - - - } - > - } /> - } /> - } /> - } /> - } /> - } /> - } /> - }> - } /> - } /> - } /> - } /> - } /> - } /> - - } /> - } /> - } /> - - } /> - } /> - - ); + return ( + + } /> + } /> + } + /> + } + /> + } + /> + + + + } + > + } /> + } /> + } /> + } + /> + } + /> + } + /> + } /> + }> + } /> + } /> + } /> + } /> + } /> + } /> + + } /> + } + /> + } /> + + } /> + } /> + + ); };