~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A moderator reviews, labels, takes down and reports from one dialog

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:console/moderation-actions

What changes

Review. Each row's Review button opens one dialog for everything a moderator does about the subject, as Ozone's action panel does. For an account, it has these parts:

  • Labels: the labels it wears, each with a × to take it back (the console now calls fyi.opensocial.negateLabel).
  • Add a label: the labels the group has used, to add with one press, and a field for another.
  • Take down: a line on what it does and a button, behind a confirmation. It shows only to roles with takedown.
  • Decision: a note, then Cancel, Escalate and Resolve.
  • History: opened out underneath.

Posts are still labelled from a terminal only. Labelling one takes its CID, which the queue doesn't keep.

Find an account. A search box at the top of the queue's card takes the place of "Label someone". It finds anyone in the group by handle and opens their Review, whether or not they are in the list. The page asks for ?review=<did>, and the search box goes there. For someone the queue has never had, Review says "Not in the queue". In place of a decision it offers Report this account, which asks why, which rule they broke if any, and what happened. The report goes through fyi.opensocial.createReport into the open queue, as a member's report would.

Rows show the labels a subject wears, outlined, after the word "Labelled", apart from the reasons it was reported for.

The Moderating guide's steps and pictures follow, with a new section on acting on someone nobody reported. The e2e flow now covers finding, adding, removing and re-adding a label, taking an account down, escalating, resolving, and reporting.

Why

Labelling was a dialog apart from the subject, typed by handle, with takedown a label you had to know to type and no way to take a label back in the console. Ozone acts on one subject from one panel, and reaches that panel for anyone through its command palette ("Take action on…") and its "Report Account". This follows that, keeping to the console's small dialogs.

The labels offered are the ones the group has used on the subjects the page loads. A group's labeler can declare labelValues, but nothing here sets any beyond !hide and !takedown, and they live in the meta space, which listSpaceRecords doesn't serve.

How it was checked

  • svelte-check, the layer check and the dialog-titles check pass here. So does just docs, with the guide's pictures redrawn by just shots.

  • Every state was drawn with just look, including:

    • the queue, and Review as an admin and as a moderator without takedown;
    • labelling and removing a label, on a phone and in the dark;
    • the takedown confirmation, and Find's result for someone not in the queue;
    • the report dialog, and the queue after reporting.

    A fresh agent critiqued the pictures. Fixed from it: Find was a dialog (the house rules keep finding out of dialogs); a field label changed between states; buttons spilled out of a dialog on a phone; part headings weighed less than the fields under them; Take down repeated its heading; wordy report copy; and worn labels weren't set apart from reasons.

  • The e2e flow and the coverage gate are left to CI. No Rust changed.

Shortcomings

  • The takedown confirmation's act is the primary colour, not danger. ConfirmDialog asks that of an act that can be undone, and removing !takedown undoes it.
  • On a phone, Resolve wraps under Cancel and Escalate.
  • The labels to add come only from this page's subjects. Another tab's labels aren't offered.
  • The list's title stays "Subjects".

🤖 Generated with Claude Code

queue-alice-desktop-light.png

review-alice-phone-dark.png

takedown-alice-desktop-light.png

found-alice-desktop-light.png

moderating-found.png

report-alice-desktop-light.png

carol-carol-desktop-light.png

Approved

This pull replaces the label and resolve dialogs with one Review dialog per subject. It adds label removal, takedown behind a confirmation, and a handle search that opens Review for anyone. For an account nobody reported, Review offers a report. I read the TypeScript, Svelte and server changes. I did not open the PNG shots, the generated .txt files, the guide prose, app.css or the e2e spec. I found nothing that must change. I ran no checks myself, and the pull says CI runs the e2e flow and the coverage gate.

The logic reads correctly:

  • labelsOf replays events in order, and labelsUsed leaves out the takedown labels.
  • A found account is added only when it is not already in the loaded list.
  • The closed handler drops ?review= once the dialog closes.

Two things to check, neither of which blocks:

  • ruleList builds each rule's URI by hand in +page.server.ts (at://${group}/space/fyi.opensocial.meta/self/${group}/fyi.opensocial.rule/<rkey>). If that shape differs from what createReport accepts for rule, reports that cite a rule will fail. Make sure the e2e report step cites a rule, or that a test does.
  • The free-text "Add a label" field sends any value to ?/label, including !takedown and !hide. Someone with label but not takedown can type one. Check that the host's applyLabel refuses this for roles without takedown. The old dialog behaved the same way, so this isn't new.
Approved

The only change since my last review is in Dialog.svelte. opened used to be read once in onMount. It now sits in a $effect, so a dialog whose row was already drawn opens when opened turns true. The :popover-open check stops it opening twice. The effect reads only opened, so it reruns only when opened changes. Closing the dialog doesn't reopen it, and the closed handler clears ?review=. I found nothing that must change, and I didn't run the checks.

Both points from my last review are still open, and neither blocks the merge:

  • Check that the ruleList URI shape matches what createReport accepts for rule.
  • Check that applyLabel refuses !takedown and !hide for roles without takedown.
Merged as 159508a