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 #248

Parked opened this
Closed without merging

A chat mute can now end on its own. mute(id, name, until) takes a time in ms, or null for good, and the new unmute(id) lifts one. Expiry: post refuses while now < until.

Notes

stopped parked by the crew deploy 002589a

opened this

A chat mute can now end on its own. mute(id, name, until) takes a time in ms, or null for good, and the new unmute(id) lifts one.

  • Expiry: post refuses while now < until. muted is now a getter that returns only the mutes still in force, so an expired one drops out of it.
  • Stored file: a permanent mute is still written as a plain name string. A timed mute is written as {name, until}. An old file's name string loads as a mute for good.
  • Caller: in lobby.ts, a /live mute calls mute(id, name, null), so it stays permanent, and an unmute calls unmute(id).
  • Tests: in chat.test.ts, with an injected clock, a 10-minute mute blocks just before 10:00 and allows just after, a permanent mute survives a reload, and an old-format file loads.
  • Test run: the chat and lobby tests pass. The full bun test has one failure, in server.test.ts: the vendored three.js route returns 404 instead of 200. I didn't touch that route, and I haven't confirmed the cause. bun x tsc --noEmit couldn't run here ("bun is unable to write files to tempdir"), so the type check is unconfirmed.
  • Not done: no /live message offers a 10-minute, 1-hour or 24-hour mute yet. The issue limits the lobby.ts change to the one caller.

🤖 Generated with Claude Code

Closes #236

commented

A chat mute can now end on its own. mute(id, name, until) takes a time in ms, or null for good, and the new unmute(id) lifts one.

  • Expiry: post refuses while now < until. muted is now a getter that returns only the mutes still in force, so an expired one drops out of it.
  • Stored file: a permanent mute is still written as a plain name string. A timed mute is written as {name, until}. An old file's name string loads as a mute for good.
  • Caller: in lobby.ts, a /live mute calls mute(id, name, null), so it stays permanent, and an unmute calls unmute(id).
  • Tests: in chat.test.ts, with an injected clock, a 10-minute mute blocks just before 10:00 and allows just after, a permanent mute survives a reload, and an old-format file loads.
  • Test run: the chat and lobby tests pass. The full bun test has one failure, in server.test.ts: the vendored three.js route returns 404 instead of 200. I didn't touch that route, and I haven't confirmed the cause. bun x tsc --noEmit couldn't run here ("bun is unable to write files to tempdir"), so the type check is unconfirmed.
  • Not done: no /live message offers a 10-minute, 1-hour or 24-hour mute yet. The issue limits the lobby.ts change to the one caller.

🤖 Generated with Claude Code

commented

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

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs