Add administrative room close and reopen controls
Preserve readable private tables, discussion and pending games while closure blocks new play, joins, messages, AI and seat mutations. Add live-authorized atomic closure audits, room-version/revision fences, dedicated controls and exact saved retries. Reopen with the saved pause/join settings and current credentials; restoring a removed but closed room keeps its AI stopped. Verified types, lint, 5356 offline tests, 52 HTTP tests and build. Seventeen dedicated authenticated HTTP groups and independent privacy/persistence review passed. Desktop/mobile browser QA confirmed one close after a lost response and refresh, persistent readable notices, retained private draft, mobile reopening and saved-seat refresh. All 2,001 baseline rooms, 4,243 seats and related records preserved. Positive production admin acceptance awaits authorized QA access; full admin and rules gates remain open.
This commit is contained in:
1 parent
238de3860d
commit
98b1b3261b
49 files changed
+4255
-86
No files matched your search
@@ -17,6 +17,9 @@ export class ClientRequestError extends Error {
|
||||
}
|
||||
}
|
||||
|
||||
export const isRoomClosed = (error: unknown): error is ClientRequestError =>
|
||||
error instanceof ClientRequestError && error.code === 'ROOM_CLOSED';
|
||||
|
||||
export const isRoomRemoved = (error: unknown): error is ClientRequestError =>
|
||||
error instanceof ClientRequestError && error.code === 'ROOM_REMOVED';
|
||||
|
||||
@@ -33,7 +36,7 @@ export function subscribeRoomRemoval(listener: (room: string) => void) {
|
||||
export function requestMayHaveCompleted(error: unknown): boolean {
|
||||
// Creation/recovery can commit before their final private read loses to removal.
|
||||
// A temporary removal is never proof that a preceding mutation did not commit.
|
||||
if (isRoomRemoved(error)) return true;
|
||||
if (isRoomRemoved(error) || isRoomClosed(error)) return true;
|
||||
if (!(error instanceof ClientRequestError) || error.kind !== 'http')
|
||||
return true;
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user