Skip to content

Commit 13f814a

Browse files
patrickrbclaude
andauthored
chore(cleanup): delete dead code (commented-out blocks + orphaned exports) (#193)
Two known scraps + four exports that ts-prune flagged as unreferenced (verified by hand). Nothing here changes runtime behavior. Commented-out scaffolding (from the original cleanup plan): - src/app/layout.tsx — Geist font imports + const declarations sat commented with a "temporarily disabled for build" note. Even fully uncommented they wouldn't have re-enabled the font (the body className uses `font-sans antialiased`, not the geist variables). Re-adding Geist later is a fresh task; the commented placeholder was just rot. - src/app/stations/[id]/edit/page.tsx — `// const [testingLotw, setTestingLotw] = useState(false); // Unused - for future LoTW validation`. The "future" comment had no path; if it ever lands, add the state then. Orphaned exports (zero references in src/, verified with git grep): - src/lib/qrz.ts `validateQRZCredentials` — explicitly marked "(legacy)" in its own comment; superseded by validateQRZApiKey. Delete the legacy. - src/components/LotwSyncIndicator.tsx `LotwStatusBadge` — sibling helper appended after the main component, never imported anywhere. - src/components/QRZSyncIndicator.tsx `QRZStatusBadge` — same pattern. - src/components/LotwSettings.tsx — entire file unused (no import sites). Removing the two badge helpers freed up the `Badge` import in both LotwSyncIndicator.tsx and QRZSyncIndicator.tsx; dropped those too. Intentionally kept (ts-prune flagged, but architecturally meaningful): - Auth helpers: requireAuth, requireAdmin, withApiAuth - Permission helpers: isAdmin, isModerator, getRolePermissions - API utilities: successWithRateLimit, errorResponse, corsJsonResponse - Settings CRUD: getSetting, getSettingsByCategory, createSetting, deleteSetting, SettingValue - Type exports across types/awards.ts and models/ These are utility-belt/scaffolding code with clear architectural intent (the auth and settings systems are partly wired). Deleting them removes affordances; if they stay unused indefinitely they can be revisited. Verification: lint baseline drops 52→51 (one LotwSettings React hooks warning is gone), typecheck clean, build succeeds. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c277e33 commit 13f814a

6 files changed

Lines changed: 0 additions & 606 deletions

File tree

src/app/layout.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
import type { Metadata } from "next";
2-
// Font loading temporarily disabled for build in restricted environment
3-
// import { Geist, Geist_Mono } from "next/font/google";
42
import "./globals.css";
53
import { UserProvider } from "@/contexts/UserContext";
64
import { ThemeProvider } from "@/contexts/ThemeContext";
75
import Footer from "@/components/Footer";
86
import InstallationChecker from "@/components/InstallationChecker";
97

10-
// const geistSans = Geist({
11-
// variable: "--font-geist-sans",
12-
// subsets: ["latin"],
13-
// });
14-
15-
// const geistMono = Geist_Mono({
16-
// variable: "--font-geist-mono",
17-
// subsets: ["latin"],
18-
// });
19-
208
export const metadata: Metadata = {
219
title: "Nextlog - Amateur Radio Logging",
2210
description: "Modern amateur radio contact logging and station management",

src/app/stations/[id]/edit/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ export default function EditStationPage({ params }: { params: Promise<{ id: stri
132132
const [validatingQrz, setValidatingQrz] = useState(false);
133133
const [qrzValidation, setQrzValidation] = useState<{ valid: boolean; message: string } | null>(null);
134134
const [showLotwPassword, setShowLotwPassword] = useState(false);
135-
// const [testingLotw, setTestingLotw] = useState(false); // Unused - for future LoTW validation
136135
const [certFile, setCertFile] = useState<File | null>(null);
137136
const [certName, setCertName] = useState('');
138137
const [certPassword, setCertPassword] = useState('');

0 commit comments

Comments
 (0)