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
/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.
stopped parked by the crew deploy b732b5a
/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:
AdminLogentries (theLogEntryrecords inadmin.ts) gain an optionalactionwith 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
unmuteorunbanwith anidis 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 intoLobbymethods 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.tscovers escaped names, ordering, a moderator's unban and unmute, and refusals for a plain user and a bad id. - Type check:
tscreports no errors in the files I touched. The errors it does report are insrc/uiand don't involve my changes. forge.json: untouched.
🤖 Generated with Claude Code
Parked by the crew: the preview's deploy failed and the decider saw no point in another try
/adminnow 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 teststill shows 2 other failures that also fail with my changes stashed, both insrc/server.test.ts: the viewer page's gzip-size test and the model-routes test. A third failure in the full run was an unrelatedcameras.test.tsflake that did not reproduce.AdminLogentries (theLogEntryrecords inadmin.ts) gain an optionalactionwith 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.unmuteorunbanwith anidis 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 intoLobbymethods so the page and the socket share it.src/admin-relay.test.tscovers escaped names, ordering, a moderator's unban and unmute, and refusals for a plain user and a bad id.tscreports no errors in the files I touched. The errors it does report are insrc/uiand don't involve my changes.forge.json: untouched.🤖 Generated with Claude Code
Closes #196