Skip to content

Commit 27684a9

Browse files
ryan-williamsclaude
andcommitted
Fix TypeScript errors in CompareView and ScanDetails
- Prefix unused `getProgress` prop with `_` to satisfy noUnusedLocals - Remove unused `dim` style declaration - Remove unused `ScanHistoryItem` import - Remove unused `current` variable in treemap ancestor loop - Widen `parent` type to include `undefined` for optional chaining 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent dfb2b96 commit 27684a9

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

ui/src/components/CompareView.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ function CompareRowComponent({
439439
routeType,
440440
onScan,
441441
isScanning,
442-
getProgress,
442+
getProgress: _getProgress,
443443
scan1,
444444
scan2,
445445
}: {
@@ -473,7 +473,6 @@ function CompareRowComponent({
473473
const compareUrl = params.toString() ? `${basePath}?${params}` : basePath
474474

475475
const td: React.CSSProperties = { padding: '8px 6px', textAlign: 'right', fontFamily: 'monospace', fontSize: '0.85em', whiteSpace: 'nowrap' }
476-
const dim: React.CSSProperties = { color: '#8b949e' }
477476

478477
// Size values
479478
const sizeBefore = row.status === 'added' ? '-' : formatSize(row.size_old ?? row.size)

ui/src/components/ScanDetails.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { FaChevronDown, FaChevronRight, FaExclamationTriangle, FaExchangeAlt, Fa
55
import { LazyPlot as Plot } from './LazyPlot'
66
import { useQuery } from '@tanstack/react-query'
77
import { fetchScanDetails, fetchScanHistory, startScan, fetchScanStatus, deletePath } from '../api'
8-
import type { Row, ScanJob, ScanProgress, ScanHistoryItem } from '../api'
8+
import type { Row, ScanJob, ScanProgress } from '../api'
99
import { useScanProgress } from '../hooks/useScanProgress'
1010
import { useRecentPaths } from '../hooks/useRecentPaths'
1111

@@ -435,12 +435,10 @@ function Treemap({ root, rows }: { root: Row; rows: Row[] }) {
435435

436436
// Find top-level ancestor
437437
let topLevel = row.parent
438-
let current = row
439438
while (topLevel && topLevel !== '.') {
440439
const parentRow = rows.find(r => r.path === topLevel)
441440
if (!parentRow || parentRow.parent === '.') break
442441
topLevel = parentRow.parent
443-
current = parentRow
444442
}
445443

446444
// topLevel is now the direct child of root, or we use the immediate parent
@@ -465,7 +463,7 @@ function Treemap({ root, rows }: { root: Row; rows: Row[] }) {
465463

466464
// Ensure parent chain is included
467465
for (const row of [...topRows]) {
468-
let parent = row.parent
466+
let parent: string | null | undefined = row.parent
469467
while (parent && parent !== '.' && !included.has(parent)) {
470468
const parentRow = subtreeRows.find(r => r.path === parent)
471469
if (parentRow) {

0 commit comments

Comments
 (0)