feat(media): primary media storage, growth goals, retention and delivery tools
CI / build (push) Has been cancelled

Event photos and videos are now stored only on the NFS/local share named in
Settings -> Media storage. Uploads, photo editing, video processing and the
per-event filing step refuse to run until that share is configured and
writable, so nothing is silently written inside the container. Video
originals, renditions, posters and sidecars share one folder on the share.

Also adds volunteer growth goals with a mentor queue, an admin retention and
storage sweep with a cron entry point, cached gallery thumbnails with
per-folder ZIP downloads, a server-rendered booth-sheet PDF, and in-app
confirm/release for every upcoming assignment.

Service reminders now ignore the one-off event reminder rule, which had been
queueing an extra bogus reminder for each published service.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-20 23:21:34 +00:00
parent cb5976edb2
commit f7a0c8618f
68 changed files with 3237 additions and 297 deletions
+82 -11
View File
@@ -40,6 +40,16 @@ import {
type PositionSummary,
type RequirementDraft,
} from "@/components/app/admin/positions-panel";
import { listGrowthQueue } from "@/db/growthGoals";
import { retentionSummary } from "@/db/retention";
import {
RetentionPanel,
type RetentionSummaryView,
} from "@/components/app/admin/retention-panel";
import {
MentorQueuePanel,
type QueueGoalView,
} from "@/components/app/growth/mentor-queue-panel";
export const metadata = { title: "Admin" };
@@ -70,17 +80,29 @@ export default async function AdminPage() {
const role = (session?.user as { systemRole?: SystemRole } | undefined)?.systemRole;
if (!hasPermission(role, "admin.settings")) redirect("/schedule");
const [users, rules, log, services, matrix, positions, skillRows, emailSettings] =
await Promise.all([
listUsersForAdmin(),
listRules(),
listNotifications({ limit: 25 }),
listServices({ active: false }),
listSkillsMatrix(),
listPositions({ active: false }),
listSkills({ active: true }),
getEmailSettings(),
]);
const [
users,
rules,
log,
services,
matrix,
positions,
skillRows,
emailSettings,
growthQueue,
retention,
] = await Promise.all([
listUsersForAdmin(),
listRules(),
listNotifications({ limit: 25 }),
listServices({ active: false }),
listSkillsMatrix(),
listPositions({ active: false }),
listSkills({ active: true }),
getEmailSettings(),
listGrowthQueue(),
retentionSummary(),
]);
const requirementSets = await Promise.all(
positions.map((position) => getPositionSkills(position.id)),
@@ -107,6 +129,27 @@ export default async function AdminPage() {
lastServedOn: row.lastServedOn ?? null,
}));
const retentionView: RetentionSummaryView = retention;
const queueGoals: QueueGoalView[] = growthQueue.map((goal) => ({
id: goal.id,
userName: goal.userName,
email: goal.email,
skillName: goal.skillName,
targetLevel: goal.targetLevel,
targetDate: goal.targetDate,
status: goal.status,
mentorUserId: goal.mentorUserId,
mentorName: goal.mentorName,
shadowCount: goal.shadowCount,
verifiedLevel: goal.verifiedLevel,
mentorCandidates: goal.mentorCandidates.map((candidate) => ({
userId: candidate.userId,
displayName: candidate.displayName,
verifiedLevel: candidate.verifiedLevel,
})),
}));
const managedUsers: ManagedUser[] = users.map((user) => ({
id: user.id,
email: user.email,
@@ -186,6 +229,20 @@ export default async function AdminPage() {
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle className="text-lg">Mentor queue</CardTitle>
<CardDescription>
Volunteers asking to grow. Assign a mentor who is already
mentor-ready for that skill, then log shadows and sign the goal off.
Levels themselves are verified in the matrix above.
</CardDescription>
</CardHeader>
<CardContent>
<MentorQueuePanel goals={queueGoals} />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle className="text-lg">Positions &amp; requirements</CardTitle>
@@ -259,6 +316,20 @@ export default async function AdminPage() {
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle className="text-lg">Retention &amp; storage</CardTitle>
<CardDescription>
What the database and the upload volume are holding, and what the
next sweep would remove. Sent mail and used tokens past their window
are deleted; queued mail never is.
</CardDescription>
</CardHeader>
<CardContent>
<RetentionPanel summary={retentionView} />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle className="text-lg">Backup &amp; restore</CardTitle>