F.14: Fediverse Admin Nest panel — moderation + crosspost queues#21
Open
kh0pper wants to merge 1 commit intof13-crosspost-scheduler-gcfrom
Open
F.14: Fediverse Admin Nest panel — moderation + crosspost queues#21kh0pper wants to merge 1 commit intof13-crosspost-scheduler-gcfrom
kh0pper wants to merge 1 commit intof13-crosspost-scheduler-gcfrom
Conversation
Follow-up #2 after Phase 2. Closes the operator UX gap F.11 and F.13 flagged: until now, moderation_actions (F.11) and crosspost_log (F.13) were only accessible through MCP tools — no click-through UI. One panel, two tabs: **Moderation Queue** — shows pending, confirmed, expired, rejected, and all moderation_actions rows from the federated bundles. Columns: • bundle + action_type • payload (all key/value pairs from the queued action) • timing (requested-ago, expires-in with F.13 GC awareness, confirmed-ago) • status badge • Confirm / Reject buttons (only for pending) Confirming records operator approval in moderation_actions (status='confirmed', confirmed_by, confirmed_at). It does NOT yet auto-fire the action against the federated bundle — that's a follow-up scheduler. The panel's help text flags this; for now, confirm + invoke the bundle's own verb by hand is the expected flow. **Crosspost Queue** — shows queued/ready/published/manual/error/cancelled entries from crosspost_log. Columns: • route (source→target + source_app#id + target_app#id once published) • preview (first 180 chars of transformed_payload_json) • timing (fires-in / published-ago / cancelled-ago + created-ago + error snippet) • status badge • Cancel button (for queued/ready), Retry button (for error — flips to ready and clears error so the F.13 scheduler picks it up again) **Files** - servers/gateway/dashboard/panels/fediverse.js — the panel. Server-side rendered HTML; no client JS. Style tokens from the Nest palette (crow-bg-elevated, crow-accent, crow-text-*). All user-visible data escaped via local escapeHtml() (defensive — the payload_json contents come from bundles' queueModerationAction and could carry XSS if rendered raw). Tab + filter state via ?tab= and ?filter= query params. Flash messages via ?flash= for post-action redirects. - servers/gateway/dashboard/index.js — imports fediversePanel, registers alongside the other built-ins, adds POST /dashboard/fediverse/action route that dispatches to panel.handleAction for the four button actions. - servers/gateway/dashboard/nav-registry.js — adds "connections" category → "core" group so the new panel lands in the sidebar's Core section next to Messages and Contacts. - CLAUDE.md — built-in panels list now includes Fediverse Admin. **Verified** - node --check on all files - npm run check passes - Panel imports cleanly (registry sees it at /dashboard/fediverse) **Remaining punch list** - Auto-fire moderation actions when confirmed (the panel's help text explicitly calls this out as deferred). Would live in a new scheduler tick that polls moderation_actions WHERE status='confirmed' AND confirmed_at < now AND applied_at IS NULL, then calls the corresponding bundle's publish verb. Deferred because each bundle needs its own handler (defederate on pixelfed vs block_instance on lemmy vs block_domain on mastodon, all different REST shapes). - Pagination: panel caps at 100 rows per query. For busy instances this will need cursor-based paging. Cross that bridge when operators hit it.
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.
Summary
Follow-up #2 after Phase 2. Closes the operator UX gap F.11/F.13 flagged: until now,
moderation_actions(F.11) andcrosspost_log(F.13) were only accessible through MCP tools. This PR adds a click-through Nest panel.What lands
One panel at
/dashboard/fediverse, two tabs:Moderation Queue (
?tab=moderation)moderation_actionsrows.status='confirmed',confirmed_by,confirmed_at). It does NOT yet auto-fire the action against the federated bundle — that's a follow-up scheduler (help text flags this).Crosspost Queue (
?tab=crosspost)crosspost_logrows.errorrows toready+ clears the error so the F.13 scheduler picks them up on its next tick.Implementation
servers/gateway/dashboard/panels/fediverse.js(new) — SSR HTML, no client JS. All user-visible data escaped defensively via localescapeHtml()(payloads come from bundles'queueModerationActionand could carry XSS if rendered raw). Tab + filter state via?tab=and?filter=query params. Flash messages via?flash=.servers/gateway/dashboard/index.js— imports + registers the panel, addsPOST /dashboard/fediverse/actiondispatching topanel.handleActionfor the four button actions.servers/gateway/dashboard/nav-registry.js— addsconnectionscategory →coregroup so the panel lands in the sidebar's Core section.CLAUDE.md— built-in panels list updated.Test plan
node --checkon all filesnpm run checkpassesmoderation_actions+crosspost_logrows (deferred — needs the gateway running in a non-sandboxed environment)Follow-ups
Rollout position
Stacked on F.13.
🤖 Generated with Claude Code