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

Parked opened this
Closed without merging

A chat mute can now end on its own. Chat.mute(id, name, until) takes the end time in ms, or null for good. Only chat.ts and its test changed.

Notes

stopped parked by the crew deploy 6d6cb80

opened this

A chat mute can now end on its own. Chat.mute(id, name, until) takes the end time in ms, or null for good. Only chat.ts and its test changed.

  • Posting: post refuses while now < until and accepts after. An expired mute drops out of muted, which is now a computed view of live mutes only.
  • Callers: until defaults to null, and true/false still work, so lobby.ts needed no change. false lifts the mute.
  • Stored file: it now keeps {name, until} per mute. The old format (a bare name string) loads as a permanent mute.
  • Tests: they use an injected clock. A 10-minute mute blocks at 9:59 and allows at 10:01. A permanent mute survives a reload. A timed mute keeps its end across a reload. An old-format file loads.

The chat, lobby and lobby security tests pass, and tsc is clean. In the full bun test, 4 tests failed, and the first run's output was partly cut off, so I can't say what failed beyond the first two. With my change stashed, a rerun showed two failures, which are also in the full run. They are a viewer page-size budget test and a model-routes test (serves the model, its meshes and the vendored libraries). Neither touches chat. I didn't identify the other two failures, which didn't show up in that rerun.

Closes #191

commented

A chat mute can now end on its own. Chat.mute(id, name, until) takes the end time in ms, or null for good. Only chat.ts and its test changed.

  • Posting: post refuses while now < until and accepts after. An expired mute drops out of muted, which is now a computed view of live mutes only.
  • Callers: until defaults to null, and true/false still work, so lobby.ts needed no change. false lifts the mute.
  • Stored file: it now keeps {name, until} per mute. The old format (a bare name string) loads as a permanent mute.
  • Tests: they use an injected clock. A 10-minute mute blocks at 9:59 and allows at 10:01. A permanent mute survives a reload. A timed mute keeps its end across a reload. An old-format file loads.

The chat, lobby and lobby security tests pass, and tsc is clean. In the full bun test, 4 tests failed, and the first run's output was partly cut off, so I can't say what failed beyond the first two. With my change stashed, a rerun showed two failures, which are also in the full run. They are a viewer page-size budget test and a model-routes test (serves the model, its meshes and the vendored libraries). Neither touches chat. I didn't identify the other two failures, which didn't show up in that rerun.

commented

Parked by the crew: the preview's deploy failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs