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
+2
-1
@@ -189,7 +189,7 @@ export default function Home() {
|
||||
if (
|
||||
!data.botsPending ||
|
||||
removedRooms.current.has(room) ||
|
||||
data.roomControl?.paused ||
|
||||
data.roomControl?.paused || data.roomControl?.closed ||
|
||||
activeRoom.current !== room ||
|
||||
data.me !== activeSeat.current ||
|
||||
data.version < (knownVersions.current.get(room) ?? -1) ||
|
||||
@@ -526,6 +526,7 @@ export default function Home() {
|
||||
|
||||
async function send(action: Action) {
|
||||
if (!game || removedRooms.current.has(game.code) || mutationPending.current || recovery.current) return;
|
||||
if (game.roomControl?.closed) { setNotice('An administrator closed this room. The saved table remains readable; play resumes after reopening.'); return; }
|
||||
if (game.roomControl?.paused && !(action.type === 'setAutopilot' && action.difficulty === null)) {
|
||||
setNotice('An administrator paused this room. Game decisions will be available when the room resumes.');
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user