refactor(decnet_web/DeckyFleet): move IntervalEditor out

Verbatim move of the per-decky mutation-interval modal (~60 LOC)
into its own file. Saves null when the toggle is off, minutes
otherwise.

- New DeckyFleet/IntervalEditor.tsx
- IntervalEditor.test.tsx covers null-current disabled path,
  numeric-current enabled path, and CANCEL not firing onSave.
- src/test/fixtures/decky.ts now derives DeckyFixture from the
  canonical Decky type (the fixture's loose swarm shape was
  missing host_address/host_status; aligning to Decky catches
  that statically).
This commit is contained in:
2026-05-09 04:55:30 -04:00
parent 032ffbb4eb
commit b6ff288dcf
4 changed files with 137 additions and 79 deletions

View File

@@ -1,21 +1,6 @@
export interface DeckyFixture {
name: string;
ip: string;
services: string[];
distro: string;
hostname: string;
archetype: string | null;
service_config: Record<string, Record<string, unknown>>;
mutate_interval: number | null;
last_mutated: number;
swarm?: {
host_uuid: string;
host_name: string;
state: string;
last_error: string | null;
last_seen: string | null;
};
}
import type { Decky } from '../../components/DeckyFleet/types';
export type DeckyFixture = Decky;
export const makeDecky = (overrides: Partial<DeckyFixture> = {}): DeckyFixture => ({
name: 'decoy-01',