Keep admin and seat recovery notices readable

Show progress during initial admin and seat-control submissions; retain exact recovery instructions for uncertain requests and explicit retries. Keep seat recovery and handover confirmations above the table until Continue without blocking gameplay. Use readable 16px text and 44px controls.

Verified isolated checkpoint: types, lint, 5381 offline tests, 52 HTTP tests and build. Local delayed/lost-response browser QA covered admin creation, durable retry, handover and seat recovery, mobile readability and saved-seat restoration. Existing 2098 rooms and 4455 seats preserved. Deployment acceptance follows separately.
This commit is contained in:
Quintine committed 2026-09-26 13:36:05 +10:00
1 parent e918e2e0c0
commit 137f9223f1
15 files changed
+134 -31

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { Children, isValidElement } from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import { SeatConfirmation } from '../components/seat-confirmation';
import { Button } from '../components/ui/button';
for (const kind of ['recovery', 'handover'] as const) {
void test(`${kind} confirmation explains revoked access and only acknowledges on Continue`, () => {
let acknowledged = 0;
const notice = SeatConfirmation({ kind, onContinue: () => { acknowledged++; } });
const markup = renderToStaticMarkup(notice);
assert.match(markup, /<output/);
assert.match(markup, /revoked/);
assert.match(markup, /font-size:1rem/);
assert.match(markup, /<button[^>]*type="button"[^>]*>Continue<\/button>/);
assert.doesNotMatch(markup, /autofocus|aria-modal/);
if (kind === 'handover') assert.match(markup, /Protect your saved seat/);
assert.equal(acknowledged, 0);
const button = Children.toArray(notice.props.children).filter(isValidElement).find(child => child.type === Button);
assert.ok(button);
(button.props as { onClick: () => void }).onClick();
assert.equal(acknowledged, 1);
});
}