minesweeper: hold the client in a ref, not in a dependency list
confirmed playable after this. useClient() rebuilds its verbs on every render, so `refresh` — which listed `client` — got a new identity every render, its mount effect re-ran every render, and each run set state and caused another render. an endless fetch loop that starved the socket, so onReady never ran and the panel sat at 'connecting…' forever. the backend was never at fault: the relay completed a full rfb handshake through wss://platform.officer.dev with a real token before this was found. ruling the server out is what left only the client. same trap and same fix as the jellyfin playback reports, which CLAUDE.md already warned about. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { sign } from './src/servers/jwt';
|
||||
import { getOwnerUser } from 'officerdb';
|
||||
const u = await getOwnerUser();
|
||||
if (!u) { console.error('no owner'); process.exit(1); }
|
||||
const token = await sign({ id: u.id, email: u.email, name: u.name, username: u.username, role: u.role });
|
||||
await Bun.write('/tmp/.mstoken', token);
|
||||
console.log('minted for owner id', u.id, 'role', u.role, '(written to file, not printed)');
|
||||
Reference in New Issue
Block a user