Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Commit 09e9df4

Browse files
committed
FEA-1497: Fix pre-existing lint errors blocking CI (Phase 0)
The CI "Tests" job runs `pnpm lint` as a step (bash -e), so the 19 pre-existing eslint errors on PR #264 failed the whole check before the test run. Clear them so CI is green. Unused imports/vars (dead code in 264's renderer + DB layer): - database/index.ts: drop unused SessionRow/AgentRow/EventRow/ HookEventPayload type imports. - DashboardPage.tsx: drop unused Card*/Badge/RankedBar imports and the now-orphaned toolUsage/maxToolCount locals. - ApprovalsPanel.tsx: drop unused CardHeader/CardTitle. - Topbar.tsx / SettingsPanel.tsx: drop unused useCallback. eslint config (parserOptions.project parse errors on 4 renderer files): - src/renderer is Vite-built and excluded from tsconfig.json, so its .ts/.d.ts files cannot resolve under the type-aware lint block (project: ./tsconfig.json). Add `ignores: ["src/renderer/**"]` to that block so renderer files are linted by the recommended (syntactic) config instead of erroring; matches the existing tsconfig boundary. Testing (CI-equivalent, all green locally): - pnpm install --frozen-lockfile: exit 0 - pnpm -C apps/desktop lint: 0 errors - pnpm typecheck (-r): exit 0 - pnpm test (-r): exit 0 (0 failures; 14 skips: 13 generated-gated + 2 documented FEA-1497 retarget-skips) Risks: - Renderer (.ts/.tsx) is now linted without type-aware rules (no-floating-promises), consistent with it being outside the tsconfig program; full renderer type-aware lint + typecheck is a Phase 1 follow-up. - Import removals are dead-code only; no behavior change.
1 parent 3911766 commit 09e9df4

6 files changed

Lines changed: 9 additions & 11 deletions

File tree

apps/desktop/eslint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ export default tseslint.config(
77
...tseslint.configs.recommended,
88
{
99
files: ["src/**/*.ts"],
10+
// src/renderer is built by Vite and is excluded from tsconfig.json, so it
11+
// is not part of the type-aware TypeScript program. Exclude it from this
12+
// type-checked block too (otherwise its .ts/.d.ts files error with
13+
// "parserOptions.project ... file not found"); renderer files are still
14+
// linted by the recommended (syntactic) config above.
15+
ignores: ["src/renderer/**"],
1016
languageOptions: {
1117
parserOptions: {
1218
project: "./tsconfig.json",

apps/desktop/src/main/database/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { createSessionStore } from "./sessions.js";
66
import { createAgentStore } from "./agents.js";
77
import { createEventStore } from "./events.js";
88
import { createDashboardQueries } from "./dashboard.js";
9-
import type { DashboardSummary, SessionRow, AgentRow, EventRow, HookEventPayload } from "./types.js";
9+
import type { DashboardSummary } from "./types.js";
1010

1111
export interface AgentDatabase {
1212
sessions: ReturnType<typeof createSessionStore>;

apps/desktop/src/renderer/components/approvals/ApprovalsPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState, useEffect, useCallback } from "react";
22
import { Button } from "@closedloop-ai/design-system/components/ui/button";
33
import { Badge } from "@closedloop-ai/design-system/components/ui/badge";
4-
import { Card, CardContent, CardHeader, CardTitle } from "@closedloop-ai/design-system/components/ui/card";
4+
import { Card, CardContent } from "@closedloop-ai/design-system/components/ui/card";
55

66
interface Approval {
77
id: string;

apps/desktop/src/renderer/components/dashboard/DashboardPage.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { useState } from "react";
2-
import { Card, CardContent, CardHeader, CardTitle } from "@closedloop-ai/design-system/components/ui/card";
3-
import { Badge } from "@closedloop-ai/design-system/components/ui/badge";
42
import { MetricCard } from "@closedloop-ai/design-system/components/ui/primitives/metric-card";
5-
import { RankedBar } from "@closedloop-ai/design-system/components/ui/primitives/ranked-bar";
63
import { MonitorDot, Bot, Zap, Layers } from "lucide-react";
74
import { useQueryCache } from "../../hooks/useQueryCache";
85
import { ActivityFeedView } from "../feed/ActivityFeedView";
@@ -41,9 +38,6 @@ export function DashboardPage() {
4138
);
4239
}
4340

44-
const toolUsage = analytics?.toolUsage ?? [];
45-
const maxToolCount = toolUsage.length > 0 ? toolUsage[0].count : 1;
46-
4741
return (
4842
<div className="flex flex-col h-full">
4943
{/* Summary cards */}

apps/desktop/src/renderer/components/layout/Topbar.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { useCallback } from "react";
2-
31
interface TopbarProps {
42
collapsed: boolean;
53
onToggleSidebar: () => void;

apps/desktop/src/renderer/components/settings/SettingsPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState, useEffect, useCallback } from "react";
1+
import { useState, useEffect } from "react";
22
import { Button } from "@closedloop-ai/design-system/components/ui/button";
33
import { Card, CardContent, CardHeader, CardTitle } from "@closedloop-ai/design-system/components/ui/card";
44

0 commit comments

Comments
 (0)