Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
A chat mute can last 10 min, 1 h, 24 h or for good, and ends on its own - in src/chat.ts (after #211 makes main's tests green) #222
A chat mute can now end on its own, but I didn't get a full green bun test here. Everything passed except one src/server.test.ts test (the vendored three.js route, /vendor/three/build/three.module.js). That route returned 404 in my sandbox.
stopped parked by the crew deploy 5270be6
A chat mute can now end on its own, but I didn't get a full green bun test here. Everything passed except one src/server.test.ts test (the vendored three.js route, /vendor/three/build/three.module.js). That route returned 404 in my sandbox. I don't think my change touches it, but I haven't confirmed that.
Chat.mute: it is nowmute(id, name, until: number | null), where null means for good.postrefuses whilenow < untiland accepts afterwards.- Expiry:
mutedis now a getter that drops expired mutes each time it is read. - Storage: the file keeps
{name, until}per person, and the old format (a plain name string) still loads as a permanent mute. unmute: I addedChat.unmute(id)becausemuteno longer has an on/off flag.- Caller: the lobby's
mutehandler insrc/lobby.tspasses null, so mutes stay permanent by default. - Tests: the new tests in
src/chat.test.tsuse an injected clock. A 10-minute mute blocks at 9:59 and allows at 10:01. A permanent mute survives a reload, and an old-format file loads.
Nothing sets a timed mute yet; the 10 min / 1 h / 24 h choices need a caller that passes a real until.
I didn't run bun x tsc --noEmit. Bun failed with "unable to write files to tempdir", so the type check hasn't been done.
🤖 Generated with Claude Code
Parked by the crew: the preview's deploy failed in the place it ran, not in the change, and it could not be run again
A chat mute can now end on its own, but I didn't get a full green
bun testhere. Everything passed except onesrc/server.test.tstest (the vendored three.js route,/vendor/three/build/three.module.js). That route returned 404 in my sandbox. I don't think my change touches it, but I haven't confirmed that.Chat.mute: it is nowmute(id, name, until: number | null), where null means for good.postrefuses whilenow < untiland accepts afterwards.mutedis now a getter that drops expired mutes each time it is read.{name, until}per person, and the old format (a plain name string) still loads as a permanent mute.unmute: I addedChat.unmute(id)becausemuteno longer has an on/off flag.mutehandler insrc/lobby.tspasses null, so mutes stay permanent by default.src/chat.test.tsuse an injected clock. A 10-minute mute blocks at 9:59 and allows at 10:01. A permanent mute survives a reload, and an old-format file loads.Nothing sets a timed mute yet; the 10 min / 1 h / 24 h choices need a caller that passes a real
until.I didn't run
bun x tsc --noEmit. Bun failed with "unable to write files to tempdir", so the type check hasn't been done.🤖 Generated with Claude Code
Closes #213