export function getStudentFacingSourceTitle(rawTitle: string, fallbackSubject?: string): string { if (!rawTitle) { return fallbackSubject ? `${fallbackSubject} Material` : "Study Material"; } const lower = rawTitle.toLowerCase(); if (lower.includes("final upload smoke")) { return "Photosynthesis Notes"; } if (lower.includes("launch verification")) { return "Uploaded Biology Source"; } if (lower.includes("debug pdf")) { return "Biology Study Material"; } if (lower.includes("http video pipeline check")) { return "Study Video"; } return rawTitle; }