refactor(decnet_web/AttackerDetail): extract ServicesTargeted section

Lift the SERVICES TARGETED collapsible — interactive two-tone badge
chips with click-to-filter — into its own section. The selection
state was already lifted into useAttackerDetail in the prior
commits, so the section just consumes serviceFilter /
setServiceFilter as props.

- New AttackerDetail/sections/ServicesTargeted.tsx
- ServicesTargeted.test.tsx covers badge rendering, empty state,
  inactive-click-sets-filter, and active-click-clears-filter
- AttackerFixture grows ip_leaks/ip_leaks_total fields so the
  TimelineSection rotation test (added in the prior commit) keeps
  passing under the new factory shape
This commit is contained in:
2026-05-09 04:44:25 -04:00
parent 95e1a4ab7a
commit 7b21f31078
4 changed files with 183 additions and 46 deletions

View File

@@ -25,6 +25,19 @@ export interface AttackerFixture {
behavior: null;
service_activity: { interacted: string[]; scanned: string[] };
observations: never[];
ip_leaks?: Array<{
timestamp: string;
decky?: string;
service?: string;
bounty_type: string;
payload: {
source_ip?: string;
real_ip_claim?: string;
source_header?: string;
headers_seen?: Record<string, string>;
};
}>;
ip_leaks_total?: number;
}
export const makeAttacker = (overrides: Partial<AttackerFixture> = {}): AttackerFixture => ({