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
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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" },
|
||||
|
||||
+28
-7
@@ -23,9 +23,18 @@ export const AppRouter = () => {
|
||||
<Routes>
|
||||
<Route path="/login" element={<LoginRedirectPage />} />
|
||||
<Route path="/sessions" element={<Navigate to="/" replace />} />
|
||||
<Route path="/ssh-keys" element={<Navigate to="/settings/ssh-keys" replace />} />
|
||||
<Route path="/tool-types" element={<Navigate to="/settings/tool-types" replace />} />
|
||||
<Route path="/tool-configs" element={<Navigate to="/settings/tool-configs" replace />} />
|
||||
<Route
|
||||
path="/ssh-keys"
|
||||
element={<Navigate to="/settings/ssh-keys" replace />}
|
||||
/>
|
||||
<Route
|
||||
path="/tool-types"
|
||||
element={<Navigate to="/settings/tool-types" replace />}
|
||||
/>
|
||||
<Route
|
||||
path="/tool-configs"
|
||||
element={<Navigate to="/settings/tool-configs" replace />}
|
||||
/>
|
||||
<Route
|
||||
path="/"
|
||||
element={
|
||||
@@ -37,9 +46,18 @@ export const AppRouter = () => {
|
||||
<Route index element={<HomePage />} />
|
||||
<Route path="projects" element={<ProjectsPage />} />
|
||||
<Route path="projects/:projectId" element={<RepoWorkspace />} />
|
||||
<Route path="projects/:projectId/repositories" element={<GitRepositoriesPage />} />
|
||||
<Route path="projects/:projectId/repositories/:repoId/history" element={<GitHistoryPage />} />
|
||||
<Route path="projects/:projectId/settings/*" element={<ProjectSettingsPage />} />
|
||||
<Route
|
||||
path="projects/:projectId/repositories"
|
||||
element={<GitRepositoriesPage />}
|
||||
/>
|
||||
<Route
|
||||
path="projects/:projectId/repositories/:repoId/history"
|
||||
element={<GitHistoryPage />}
|
||||
/>
|
||||
<Route
|
||||
path="projects/:projectId/settings/*"
|
||||
element={<ProjectSettingsPage />}
|
||||
/>
|
||||
<Route path="profile" element={<ProfilePage />} />
|
||||
<Route path="settings" element={<SettingsPage />}>
|
||||
<Route index element={<Navigate to="general" replace />} />
|
||||
@@ -50,7 +68,10 @@ export const AppRouter = () => {
|
||||
<Route path="*" element={<Navigate to="general" replace />} />
|
||||
</Route>
|
||||
<Route path="tool-workshop" element={<ToolWorkshopPage />} />
|
||||
<Route path="instances/:instanceId/terminal" element={<TerminalPage />} />
|
||||
<Route
|
||||
path="instances/:instanceId/terminal"
|
||||
element={<TerminalPage />}
|
||||
/>
|
||||
<Route path="sessions" element={<SessionsPage />} />
|
||||
</Route>
|
||||
<Route path="/404" element={<NotFoundPage />} />
|
||||
|
||||
Reference in New Issue
Block a user