Add administrator pause and joining-lock controls

Provide authenticated owner/operator room controls with live account binding, durable audit and exact saved retries. Pause gates human, bot and automatic writes while preserving recovery, discussion and taking back control. Resume keeps decisions and restores AI pacing. Add directory availability filters and player notices.

Verified types, lint, 5223 offline tests, 52 HTTP tests and build. Independent persistence/privacy review and authenticated HTTP acceptance passed. Desktop/mobile browser QA confirmed lost-response refresh/retry makes one audit row and resume restores controls. Existing games preserved. Authenticated deployed admin acceptance remains pending explicit QA access confirmation.
This commit is contained in:
Quintine committed 2026-09-22 10:41:09 +10:00
1 parent f29d05620c
commit 8c922b446b
39 files changed
+3196 -104

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
CREATE TABLE `admin_room_audit` (
`operation_id` text PRIMARY KEY NOT NULL,
`actor_admin_id` text NOT NULL,
`room_code` text NOT NULL,
`action` text DEFAULT 'room_control' NOT NULL,
`reason` text NOT NULL,
`expected_revision` integer NOT NULL,
`before_paused` integer NOT NULL,
`before_join_locked` integer NOT NULL,
`after_paused` integer NOT NULL,
`after_join_locked` integer NOT NULL,
`created_at` integer NOT NULL
);
--> statement-breakpoint
CREATE INDEX `admin_room_audit_room` ON `admin_room_audit` (`room_code`,`created_at`);--> statement-breakpoint
CREATE TABLE `room_controls` (
`room_code` text PRIMARY KEY NOT NULL,
`paused` integer DEFAULT 0 NOT NULL,
`join_locked` integer DEFAULT 0 NOT NULL,
`revision` integer DEFAULT 0 NOT NULL,
`updated_at` integer NOT NULL,
FOREIGN KEY (`room_code`) REFERENCES `rooms`(`code`) ON UPDATE no action ON DELETE cascade,
CONSTRAINT "room_controls_paused" CHECK("room_controls"."paused" IN (0, 1)),
CONSTRAINT "room_controls_join_locked" CHECK("room_controls"."join_locked" IN (0, 1)),
CONSTRAINT "room_controls_revision" CHECK("room_controls"."revision" >= 0)
);
File diff suppressed because it is too large. Load diff
+7
View File
@@ -64,6 +64,13 @@
"when": 1790032690330,
"tag": "0008_admin_access",
"breakpoints": true
},
{
"idx": 9,
"version": "6",
"when": 1790035625313,
"tag": "0009_admin_room_controls",
"breakpoints": true
}
]
}