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

Migrated from github.com/Trevato/SO-ARM100

A moderator can delete a chat line over /live - the first moderator action, server-checked and logged #239

Parked opened this
Closed without merging

A signed-in moderator can now send delete over /live. Every other owner action is still owner-only. src/lobby.test.ts passes (30 tests).

Notes

stopped parked by the crew deploy 29ad05c

opened this

A signed-in moderator can now send delete over /live. Every other owner action is still owner-only. src/lobby.test.ts passes (30 tests). I couldn't type-check: bun x tsc and bun install both fail in this sandbox with a read-only temp dir error. The forge's check will be the first type check.

  • Who counts: a seat is a moderator only if the forge signed its identity (a new verified flag on the seat) and admin.isModerator(name) is true. A guest who picks a moderator's name is refused.
  • Refusals: a plain user and a moderator's settings or pause still get "only the owner can do that".
  • Delete path: the owner and the moderator now share one deleteLine helper in src/lobby.ts. It validates the id and removes the line. It then records deleted chat line N in the admin log under the actor's name, broadcasts unsaid, and refreshes the owners' admin view. The owner's deletes are now logged too, which they weren't before.
  • Tests:

- A moderator deletes a line, everyone receives unsaid, and the log entry names the moderator. - A plain user is refused. - A moderator's settings and pause are refused, and paused stays false. - A guest with a moderator's name is refused and nothing is logged.

  • forge.json is untouched.

🤖 Generated with Claude Code

Closes #225

commented

A signed-in moderator can now send delete over /live. Every other owner action is still owner-only. src/lobby.test.ts passes (30 tests). I couldn't type-check: bun x tsc and bun install both fail in this sandbox with a read-only temp dir error. The forge's check will be the first type check.

  • Who counts: a seat is a moderator only if the forge signed its identity (a new verified flag on the seat) and admin.isModerator(name) is true. A guest who picks a moderator's name is refused.
  • Refusals: a plain user and a moderator's settings or pause still get "only the owner can do that".
  • Delete path: the owner and the moderator now share one deleteLine helper in src/lobby.ts. It validates the id and removes the line. It then records deleted chat line N in the admin log under the actor's name, broadcasts unsaid, and refreshes the owners' admin view. The owner's deletes are now logged too, which they weren't before.
  • Tests:

- A moderator deletes a line, everyone receives unsaid, and the log entry names the moderator. - A plain user is refused. - A moderator's settings and pause are refused, and paused stays false. - A guest with a moderator's name is refused and nothing is logged.

  • forge.json is untouched.

🤖 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