Add reversible administrator room archiving
Organize closed rooms with archive filters, live-authorized atomic receipts and exact saved retries. Preserve saved games, timestamps, credentials, discussion and AI deadlines. Unarchive leaves play closed; reopen requires unarchive, and removal/restoration preserves both flags. Verified types, lint, 5379 offline tests, 52 HTTP tests and build. Twenty dedicated administrator HTTP groups and independent privacy/persistence review passed. Desktop/mobile browser QA confirmed a single archive after a lost response and refresh, readable recovery text, mobile unarchive and separate reopening, and saved-seat restoration. All 2,049 baseline rooms, 4,348 seats and related records preserved. Authenticated production admin acceptance awaits authorized QA access; full admin and rules gates remain open.
This commit is contained in:
1 parent
98b1b3261b
commit
e918e2e0c0
35 files changed
+3624
-38
No files matched your search
@@ -0,0 +1,28 @@
|
||||
CREATE TABLE `admin_room_archives` (
|
||||
`operation_id` text PRIMARY KEY NOT NULL,
|
||||
`actor_admin_id` text NOT NULL,
|
||||
`room_code` text NOT NULL,
|
||||
`request_hash` text NOT NULL,
|
||||
`expected_version` integer NOT NULL,
|
||||
`expected_revision` integer NOT NULL,
|
||||
`applied_version` integer NOT NULL,
|
||||
`applied_revision` integer NOT NULL,
|
||||
`archived` integer NOT NULL,
|
||||
`reason` text NOT NULL,
|
||||
`before_metadata` text NOT NULL,
|
||||
`after_metadata` text NOT NULL,
|
||||
`created_at` integer NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `admin_room_archives_room` ON `admin_room_archives` (`room_code`,`created_at`);--> statement-breakpoint
|
||||
CREATE TABLE `room_archives` (
|
||||
`room_code` text PRIMARY KEY NOT NULL,
|
||||
`archived` integer DEFAULT 0 NOT NULL,
|
||||
`revision` integer DEFAULT 0 NOT NULL,
|
||||
`archived_at` integer,
|
||||
`updated_at` integer NOT NULL,
|
||||
FOREIGN KEY (`room_code`) REFERENCES `rooms`(`code`) ON UPDATE no action ON DELETE cascade,
|
||||
CONSTRAINT "room_archives_archived" CHECK("room_archives"."archived" IN (0, 1)),
|
||||
CONSTRAINT "room_archives_revision" CHECK("room_archives"."revision" >= 0),
|
||||
CONSTRAINT "room_archives_time" CHECK(("room_archives"."archived" = 1 AND "room_archives"."archived_at" IS NOT NULL) OR ("room_archives"."archived" = 0 AND "room_archives"."archived_at" IS NULL))
|
||||
);
|
||||
File diff suppressed because it is too large.
Load diff
@@ -99,6 +99,13 @@
|
||||
"when": 1790042692212,
|
||||
"tag": "0013_admin_room_closure",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 14,
|
||||
"version": "6",
|
||||
"when": 1790044461950,
|
||||
"tag": "0014_admin_room_archive",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user