refactor(decnet_web/AttackerDetail): trim shell + bump coverage floor

Drop unused icon/api/useEffect/Tag imports left behind by the
fingerprint, behaviour, and IntelPanel extractions. AttackerDetail.tsx
ends at 450 LOC across Phase 10 (down from 1652 / 73% reduction).
Coverage floor: lines 23->24, functions 20->21, branches 17->19,
statements 22->23.
This commit is contained in:
2026-05-09 06:29:15 -04:00
parent 4bd502d3bf
commit 0a9a2f9021
2 changed files with 14 additions and 12 deletions

View File

@@ -1,7 +1,8 @@
import React, { useEffect, useState } from 'react'; import React, { useState } from 'react';
import { useParams, useNavigate } from 'react-router-dom'; import { useParams, useNavigate } from 'react-router-dom';
import { Activity, AlertTriangle, ArrowLeft, Cpu, Crosshair, Eye, Fingerprint, Globe, Keyboard, Shield, Clock, Sparkles, Wifi, Lock, FileKey, Radio, Timer, FileText, AtSign } from '../icons'; import {
import api from '../utils/api'; Activity, ArrowLeft, Crosshair, Fingerprint, Globe, FileText, AtSign,
} from '../icons';
import SessionDrawer from './SessionDrawer'; import SessionDrawer from './SessionDrawer';
import EmptyState from './EmptyState/EmptyState'; import EmptyState from './EmptyState/EmptyState';
import TTPsObservedSection from './TTPsObservedSection'; import TTPsObservedSection from './TTPsObservedSection';
@@ -13,7 +14,7 @@ import { ServicesTargeted } from './AttackerDetail/sections/ServicesTargeted';
import { CommandsViewer } from './AttackerDetail/sections/CommandsViewer'; import { CommandsViewer } from './AttackerDetail/sections/CommandsViewer';
import { ArtifactsPanel } from './AttackerDetail/sections/ArtifactsPanel'; import { ArtifactsPanel } from './AttackerDetail/sections/ArtifactsPanel';
import { MailLogPanel } from './AttackerDetail/sections/MailLogPanel'; import { MailLogPanel } from './AttackerDetail/sections/MailLogPanel';
import { Tag, Section } from './AttackerDetail/ui'; import { Section } from './AttackerDetail/ui';
import { import {
FingerprintGroup, getPayload, FingerprintGroup, getPayload,
} from './AttackerDetail/fingerprints'; } from './AttackerDetail/fingerprints';

View File

@@ -15,15 +15,16 @@ export default defineConfig({
include: ['src/**/*.{ts,tsx}'], include: ['src/**/*.{ts,tsx}'],
exclude: ['src/**/*.d.ts', 'src/test/**', 'src/main.tsx'], exclude: ['src/**/*.d.ts', 'src/test/**', 'src/main.tsx'],
// Baseline floors. Each refactor PR raises these; never lower. // Baseline floors. Each refactor PR raises these; never lower.
// Phase 9 (Credentials trim): page shell down from 487 to 231 LOC. // Phase 10 (AttackerDetail follow-through): page shell down from
// Lifted helpers, SortTh, CredsTable, ReuseTable, and a useCredentials // 1652 to 450 LOC. Lifted fingerprint renderers (12), behaviour
// hook (3 endpoints + reuse-map). 13 new tests. Suite: 48 files, // panel (8 sub-pieces + lookups), and IntelPanel into focused
// 236 tests, 24.16% lines / 17.72% branches. // sub-modules. 13 new tests. Suite: 50 files, 249 tests,
// 24.8% lines / 19.53% branches.
thresholds: { thresholds: {
lines: 23, lines: 24,
functions: 20, functions: 21,
branches: 17, branches: 19,
statements: 22, statements: 23,
}, },
}, },
}, },