Files
Dune/lib/admin-directory.ts
T
Quintine e918e2e0c0 Add reversible administrator room archiving
Organize closed rooms with archive filters, live-authorized atomic receipts and exact saved retries. Preserve saved games, timestamps, credentials, discussion and AI deadlines. Unarchive leaves play closed; reopen requires unarchive, and removal/restoration preserves both flags.

Verified types, lint, 5379 offline tests, 52 HTTP tests and build. Twenty dedicated administrator HTTP groups and independent privacy/persistence review passed. Desktop/mobile browser QA confirmed a single archive after a lost response and refresh, readable recovery text, mobile unarchive and separate reopening, and saved-seat restoration. All 2,049 baseline rooms, 4,348 seats and related records preserved. Authenticated production admin acceptance awaits authorized QA access; full admin and rules gates remain open.
2026-09-22 12:55:44 +10:00

27 lines
753 B
TypeScript

/** Public operational metadata only; never a player view or a saved game. */
import type { RoomControl } from './room-control';
export type AdminRoom = {
code: string;
version: number;
removed: boolean;
archived: boolean;
updatedAt: number;
status: 'lobby' | 'setup' | 'playing' | 'finished' | 'unreadable';
host: string | null;
players: { id: string; name: string; faction: string; control: 'human' | 'ai' | 'autopilot' }[];
advanced: boolean;
preview: boolean;
expansions: string[];
modules: string[];
turn: number | null;
phase: string;
pending: { label: string; owners: string[] };
control: RoomControl;
};
export type AdminDirectory = {
rooms: AdminRoom[];
total: number;
page: number;
pageSize: number;
};