Add recoverable administrator room removal and restoration

Preserve room JSON, seats, credentials and messages while removed rooms deny ordinary reads and writes. Add deliberate room-scoped controls, removed-directory filters, persistent player notices and live-authorized atomic version/revision audit receipts. Retain uncertain room/seat requests and hidden recovery drafts through removal; restore the prior pause/join settings without reviving revoked credentials.

Fix AI readiness after a joining human or human faction change so real lobby starts remain legal.

Verified types, lint, 5314 offline tests, 52 HTTP tests and build. Fourteen authenticated HTTP groups and independent privacy/persistence review passed. Desktop/mobile browser QA confirmed a saved removal after a lost response and refresh, one audit on exact retry, persistent notices and recovery draft continuity. All 1,945 baseline rooms, 4,121 seats and related records preserved. Positive authenticated production admin acceptance remains pending authorized QA operator access; full admin and rules gates remain open.
This commit is contained in:
Quintine committed 2026-09-22 12:01:22 +10:00
1 parent c0cc4de9e1
commit 238de3860d
44 files changed
+4626 -90

No files matched your search

+7 -3
View File
@@ -6,7 +6,7 @@ import type { GameView } from '@/game/engine';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Textarea } from '@/components/ui/textarea';
import { requestJson, requestMayHaveCompleted } from '@/lib/client-request';
import { isRoomRemoved, requestJson, requestMayHaveCompleted } from '@/lib/client-request';
import { clearHandoverOwner } from '@/lib/seat-handover';
import {
createRecoveryAttempt,
@@ -96,7 +96,9 @@ export function SeatRecoverySetup({
const mayHaveSaved = requestMayHaveCompleted(error);
setUncertain(mayHaveSaved);
setMessage(
mayHaveSaved
isRoomRemoved(error)
? `${(error as Error).message} Keep this same recovery kit and this page open. Retry saving after the room is restored.`
: mayHaveSaved
? 'Saving was not confirmed and may have completed. Keep this same kit. Retry saving to confirm it; no retry has been sent automatically.'
: `${(error as Error).message} Your kit remains below. Review the current table and retry when ready.`,
);
@@ -307,7 +309,9 @@ export function SeatRecoveryClaim({
setUncertain(mayHaveRecovered);
onUncertain?.(mayHaveRecovered);
setMessage(
mayHaveRecovered
isRoomRemoved(error)
? `${(error as Error).message} Your exact recovery request is retained. Keep this page open and retry it after restoration.`
: mayHaveRecovered
? 'Recovery was not confirmed and may have completed. Retry this same request below. Keep this page open to preserve its exact retry details; no retry is automatic.'
: `${(error as Error).message} You can retry the same request or inspect a different saved kit.`,
);