Skip to content

Commit b2ced8f

Browse files
authored
ci(frontend): add npm run build + re-enable frontend lint (#646) (#681)
* ci(frontend): add npm run build + re-enable frontend lint (#646) frontend-tests CI ran coverage only — a TypeScript/build break passed PR CI and surfaced only at deploy. Frontend lint was disabled in code-quality with a "legacy" comment that contradicts CLAUDE.md. - frontend-tests: add `npm run build` step (fails PR on build break) - code-quality: re-enable frontend lint (Node setup + npm ci + npm run lint) - clear 6 eslint errors (5 named in issue + an extra unused var in page.test.tsx): dead `Input` import in CaptureGlitchModal (shipped), unused imports/vars in three test files frontend-tests remains wired into test-summary. 7 react-hooks/ exhaustive-deps warnings remain (non-failing) — out of scope. Closes #646 * ci(frontend): disable Next telemetry in CI build step (#646 review)
1 parent 648f5f7 commit b2ced8f

5 files changed

Lines changed: 22 additions & 8 deletions

File tree

.github/workflows/test.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,20 @@ jobs:
4848
- name: Run mypy (type checking)
4949
run: uv run mypy codeframe/
5050

51-
# Note: Frontend linting disabled - web-ui is legacy during v2 CLI-first refactor
52-
# Re-enable when web-ui package.json is restored
51+
- name: Set up Node.js
52+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
53+
with:
54+
node-version: ${{ env.NODE_VERSION }}
55+
cache: 'npm'
56+
cache-dependency-path: 'web-ui/package-lock.json'
57+
58+
- name: Install frontend dependencies
59+
working-directory: web-ui
60+
run: npm ci
61+
62+
- name: Run frontend lint (eslint)
63+
working-directory: web-ui
64+
run: npm run lint
5365

5466
# ============================================
5567
# Static Analysis - Check for Hardcoded URLs
@@ -265,6 +277,12 @@ jobs:
265277
working-directory: web-ui
266278
run: npm ci
267279

280+
- name: Build (fail PR on TypeScript/build break)
281+
working-directory: web-ui
282+
env:
283+
NEXT_TELEMETRY_DISABLED: 1
284+
run: npm run build
285+
268286
- name: Run Jest tests with coverage
269287
working-directory: web-ui
270288
run: npm run test:coverage

web-ui/__tests__/app/proof/req_id/page.test.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ const waivedReq = {
6666
},
6767
};
6868

69-
const mockEvidenceResponse = [];
70-
7169
describe('ProofDetailPage', () => {
7270
beforeEach(() => {
7371
jest.clearAllMocks();

web-ui/src/__tests__/components/proof/ProofDetailPage.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { render, screen, fireEvent } from '@testing-library/react';
33
import useSWR from 'swr';
44
import ProofDetailPage from '@/app/proof/[req_id]/page';
55
import * as storage from '@/lib/workspace-storage';
6-
import type { ProofEvidence, ProofRequirement, ProofEvidenceSortCol, SortDir } from '@/types';
6+
import type { ProofEvidence, ProofRequirement } from '@/types';
77

88
// ── Mocks ────────────────────────────────────────────────────────────────
99

web-ui/src/__tests__/components/tasks/GitHubIssueImportModal.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import React from 'react';
2-
import { render, screen, fireEvent, waitFor, within } from '@testing-library/react';
2+
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
33
import useSWR from 'swr';
44

55
import { GitHubIssueImportModal } from '@/components/tasks/GitHubIssueImportModal';
6-
import { integrationsApi } from '@/lib/api';
76
import type { GitHubIssue, GitHubIssuesResponse } from '@/types';
87

98
jest.mock('swr');

web-ui/src/components/proof/CaptureGlitchModal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { useState, useEffect } from 'react';
44
import { Cancel01Icon } from '@hugeicons/react';
55
import * as DialogPrimitive from '@radix-ui/react-dialog';
66
import { Button } from '@/components/ui/button';
7-
import { Input } from '@/components/ui/input';
87
import { Textarea } from '@/components/ui/textarea';
98
import { Checkbox } from '@/components/ui/checkbox';
109
import {

0 commit comments

Comments
 (0)