Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

/admin lists every moderation action with who and when, and offers Unmute and Unban beside each #203

Parked opened this
Closed without merging

/admin now has a Moderation section listing removals, mutes, bans and their reversals, newest first, with who and when, all escaped. A live mute or ban has an Unmute or Unban button beside it.

Notes

stopped parked by the crew deploy b732b5a

opened this

/admin now has a Moderation section listing removals, mutes, bans and their reversals, newest first, with who and when, all escaped. A live mute or ban has an Unmute or Unban button beside it. The new test passes; bun test still shows 2 other failures that also fail with my changes stashed, both in src/server.test.ts: the viewer page's gzip-size test and the model-routes test. A third failure in the full run was an unrelated cameras.test.ts flake that did not reproduce.

  • Logging: AdminLog entries (the LogEntry records in admin.ts) gain an optional action with kind, id and name. Mutes, unmutes and chat-line removals are now logged too; before, only bans were. The log keeps 200 entries instead of 50.
  • Mute length: mutes in this app have no duration, so the list shows "(until unmuted)" instead of a length.
  • Lifting: a moderator's POST of unmute or unban with an id is accepted and logged under their name. Any other action from a moderator still gets a 403, and a plain user still gets the 404 the page gives non-admins. A bad id is a 400. I moved the mute and ban logic out of the socket handler into Lobby methods so the page and the socket share it.
  • Button rule: a button shows only on the newest entry for that person, and only while the mute or ban still stands.
  • Test: the new test in src/admin-relay.test.ts covers escaped names, ordering, a moderator's unban and unmute, and refusals for a plain user and a bad id.
  • Type check: tsc reports no errors in the files I touched. The errors it does report are in src/ui and don't involve my changes.
  • forge.json: untouched.

🤖 Generated with Claude Code

Closes #196

commented

/admin now has a Moderation section listing removals, mutes, bans and their reversals, newest first, with who and when, all escaped. A live mute or ban has an Unmute or Unban button beside it. The new test passes; bun test still shows 2 other failures that also fail with my changes stashed, both in src/server.test.ts: the viewer page's gzip-size test and the model-routes test. A third failure in the full run was an unrelated cameras.test.ts flake that did not reproduce.

  • Logging: AdminLog entries (the LogEntry records in admin.ts) gain an optional action with kind, id and name. Mutes, unmutes and chat-line removals are now logged too; before, only bans were. The log keeps 200 entries instead of 50.
  • Mute length: mutes in this app have no duration, so the list shows "(until unmuted)" instead of a length.
  • Lifting: a moderator's POST of unmute or unban with an id is accepted and logged under their name. Any other action from a moderator still gets a 403, and a plain user still gets the 404 the page gives non-admins. A bad id is a 400. I moved the mute and ban logic out of the socket handler into Lobby methods so the page and the socket share it.
  • Button rule: a button shows only on the newest entry for that person, and only while the mute or ban still stands.
  • Test: the new test in src/admin-relay.test.ts covers escaped names, ordering, a moderator's unban and unmute, and refusals for a plain user and a bad id.
  • Type check: tsc reports no errors in the files I touched. The errors it does report are in src/ui and don't involve my changes.
  • forge.json: untouched.

🤖 Generated with Claude Code

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