Skip to content

0.22.0: moderators, applied for per niche and decided by an admin - #91

Merged
ralyodio merged 2 commits into
mainfrom
moderators
Sep 13, 2026
Merged

0.22.0: moderators, applied for per niche and decided by an admin#91
ralyodio merged 2 commits into
mainfrom
moderators

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Anthony: "we need moderators on nichedb.dev we should allow people to apply to moderate ... more than 1 ok of mods ... only me (is_admin) should have access to approve".

A moderator is a niche member with a role of its own (migration 0020 admits moderator on niche_members.role, and adds niche_claims.role in operator|moderator).

  • Applying: /<niche>/moderate, three questions, signed in. It is a claim marked with the role; one open claim per person per niche as before; a member of any role is told they are in.
  • Deciding: the existing /admin/knowledge claims table, now with a "For" column, and the existing admin-only decision route. decideClaim makes a moderator with share cap zero and no score or tier-history rows, and does not mark the niche operated.
  • What a moderator may do: see the suggestion queue (/admin/submissions and its API) filtered to the collections their niches feed, and approve or reject those; approving into any other collection is refused. canReview re-checks the store on every decision; user.moderates from loadUser only drives the Queue link in the nav.
  • Elsewhere: the niche page lists moderators apart from experts with an "Apply to moderate" link; manifest.json and skill.md list operators only; the agent-question routes treat any role but operator or specialist like an observer.
  • Tests: test/moderators.test.js (schema constraints and the approval statements against PGlite), apps/web/src/routes/moderate.test.js (apply page and post, double application, member, sign-in, and the queue as a moderator, an admin and a stranger see it). Full suite green; biome clean.

Version 0.22.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MwAoNvWzezmBHeT7oDHo3C

ralyodio and others added 2 commits September 13, 2026 08:50
A moderator is a niche member with a role of its own: they review what is
suggested for the niche's collection and earn nothing (share cap zero, no
score row), several may moderate one niche, and applying is a claim marked
with the role, decided on /admin/knowledge by an admin alone. GET/POST
/<niche>/moderate takes the application; the niche page lists moderators
apart from experts; the suggestion queue and its API open to a moderator
for the collections their niches feed and nothing else, and a moderator
approves into that collection only. The agent-question routes treat a
moderator like an observer. Tests against the in-process Postgres for the
schema and the approval statements, and over fake stores for the routes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MwAoNvWzezmBHeT7oDHo3C
@ralyodio
ralyodio merged commit ecd3ce7 into main Sep 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant