0.22.0: moderators, applied for per niche and decided by an admin - #91
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
moderatoronniche_members.role, and addsniche_claims.roleinoperator|moderator)./<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./admin/knowledgeclaims table, now with a "For" column, and the existing admin-only decision route.decideClaimmakes a moderator with share cap zero and no score or tier-history rows, and does not mark the niche operated./admin/submissionsand its API) filtered to the collections their niches feed, and approve or reject those; approving into any other collection is refused.canReviewre-checks the store on every decision;user.moderatesfromloadUseronly drives the Queue link in the nav.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