[PR #19] [MERGED] Staff dashboards: the Moderation dashboard (applications, moderation stats) #22

Closed
opened 2026-11-03 04:02:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon-site/pull/19
Author: @ludovic111
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @ludovic111

Base: main ← Head: feat/staff-mod


📝 Commits (1)

  • 2c3dcb0 Staff dashboards: the Moderation dashboard (applications, moderation stats)

📊 Changes

6 files changed (+100 additions, -12 deletions)

View changed files

📝 build.mjs (+1 -1)
📝 src/staff-apps.js (+9 -4)
➕ src/staff-mod.js (+83 -0)
📝 src/staff-page.js (+1 -1)
📝 src/staff-stats.js (+5 -5)
📝 src/style.css (+1 -1)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Last site part of the staff dashboards: /staff/mod for the 🛡️ Mods (and Ludovic). Kira's side is merged and deployed (kira#79 adds the voters' names to the applications list).

What it adds

  • Applications: Mod and Support applications in the shared view from #17 (Support also shows on the Team dashboard, where Team holders vote too). Ballot names now come from Kira, since Mods can't read the Team's member list.
  • Moderation stats (mod/stats, counts only): tiles for the last 7 and 30 days (reports, mod-mail, warnings/timeouts, kicks/bans, AutoMod, applications waiting and decided), weekly charts (reports and mod-mail, warnings and timeouts, kicks and bans, AutoMod, joins and leaves), and the weekly table with CSV/JSON export.
  • Nothing of the Team's roadmap, decisions or kanban reaches this page (Kira refuses team/* to Mod-only accounts).
  • Fixes in the applications view: a closed vote no longer says the ballot can be changed; a decline never shows "Role given"; the "Decided" heading had the display size (.section .title won).

Tests

  • npm test: 51 pass.
  • Chromium against Kira's dev API (fake store): Ludovic approves an application in its veto window → Accepted; "Take the role back" → logged with Kira's answer. The dev server has no Discord side, so the card truthfully says "Role not given · DM not sent · discord side not loaded" and "remove the role in Discord by hand". Mod stats render 5 charts; no page errors.
  • Screenshots (fake data, Mac mini): ~/builds/horizon-site/staff-shots/mod-applications-{dark,light}.png, mod-applications-voter.png, mod-stats-{dark,light}.png, mod-owner-after-revoke.png, mod-phone.png.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon-site/pull/19 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/staff-mod` --- ### 📝 Commits (1) - [`2c3dcb0`](https://github.com/horizon-rust/horizon-site/commit/2c3dcb0707106819f0d8753050685de331cfd5d8) Staff dashboards: the Moderation dashboard (applications, moderation stats) ### 📊 Changes **6 files changed** (+100 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `build.mjs` (+1 -1) 📝 `src/staff-apps.js` (+9 -4) ➕ `src/staff-mod.js` (+83 -0) 📝 `src/staff-page.js` (+1 -1) 📝 `src/staff-stats.js` (+5 -5) 📝 `src/style.css` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Last site part of the staff dashboards: `/staff/mod` for the 🛡️ Mods (and Ludovic). Kira's side is merged and deployed (kira#79 adds the voters' names to the applications list). ## What it adds - **Applications**: Mod and Support applications in the shared view from #17 (Support also shows on the Team dashboard, where Team holders vote too). Ballot names now come from Kira, since Mods can't read the Team's member list. - **Moderation stats** (`mod/stats`, counts only): tiles for the last 7 and 30 days (reports, mod-mail, warnings/timeouts, kicks/bans, AutoMod, applications waiting and decided), weekly charts (reports and mod-mail, warnings and timeouts, kicks and bans, AutoMod, joins and leaves), and the weekly table with CSV/JSON export. - Nothing of the Team's roadmap, decisions or kanban reaches this page (Kira refuses `team/*` to Mod-only accounts). - Fixes in the applications view: a closed vote no longer says the ballot can be changed; a decline never shows "Role given"; the "Decided" heading had the display size (`.section .title` won). ## Tests - `npm test`: 51 pass. - Chromium against Kira's dev API (fake store): Ludovic approves an application in its veto window → Accepted; "Take the role back" → logged with Kira's answer. The dev server has no Discord side, so the card truthfully says "Role not given · DM not sent · discord side not loaded" and "remove the role in Discord by hand". Mod stats render 5 charts; no page errors. - Screenshots (fake data, Mac mini): `~/builds/horizon-site/staff-shots/mod-applications-{dark,light}.png`, `mod-applications-voter.png`, `mod-stats-{dark,light}.png`, `mod-owner-after-revoke.png`, `mod-phone.png`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:02:26 +07:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon-site#22
No description provided.