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:
1 parent
f29d05620c
commit
8c922b446b
39 files changed
+3196
-104
No files matched your search
@@ -85,7 +85,7 @@ export async function POST(req: Request) {
|
||||
ownerId: input.ownerId,
|
||||
grantId: input.grantId,
|
||||
});
|
||||
if (result.view.botsPending || needsAutomaticRoomRecovery(result.view))
|
||||
if (!result.view.roomControl?.paused && (result.view.botsPending || needsAutomaticRoomRecovery(result.view)))
|
||||
waitUntil(resumeRoom(code));
|
||||
return Response.json(result, { headers: noStore });
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ export async function GET(req: Request) {
|
||||
const view = await readSeatView(code, id);
|
||||
// Reconnect resumes persisted automatic effects/acknowledgements and AI work
|
||||
// after an interruption. Actual human choices remain engine-owned decisions.
|
||||
if (view.botsPending || needsAutomaticRoomRecovery(view))
|
||||
if (!view.roomControl?.paused && (view.botsPending || needsAutomaticRoomRecovery(view)))
|
||||
waitUntil(resumeRoom(code));
|
||||
return Response.json(view, {
|
||||
headers: { 'Cache-Control': 'no-store' },
|
||||
@@ -132,7 +132,7 @@ export async function POST(req: Request) {
|
||||
)
|
||||
throw new RuleError('The action is invalid.');
|
||||
const view = await act(code, id, body.version, body.action);
|
||||
if (view.botsPending || needsAutomaticRoomRecovery(view))
|
||||
if (!view.roomControl?.paused && (view.botsPending || needsAutomaticRoomRecovery(view)))
|
||||
waitUntil(resumeRoom(code));
|
||||
return Response.json(view, {
|
||||
headers: { 'Cache-Control': 'no-store' },
|
||||
|
||||
Reference in new issue
Block a user