feat(ingest): read a summoning campaign as a banner

Every game names its gacha something else, and inferType only knew the
five words the game8 sources use. Fate/Grand Order calls its banners
"Summoning Campaign" — the whole of that page's banner vocabulary — so
without this every FGO pull lands as "other" and the type filter stops
meaning anything for that lane.

Nothing on the current English page carries the word, so no checked-in
expected output moves; the unit case is what pins the behaviour until
the next refresh brings a banner in.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
Lucas Winther
2026-08-18 21:30:09 +02:00
co-authored by Claude Opus 5
parent 4698ebc0c7
commit e42ac84b40
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -373,7 +373,11 @@ function parseRange(
export function inferType(title: string): EventType { export function inferType(title: string): EventType {
const t = title.toLowerCase(); const t = title.toLowerCase();
if (/\brerun\b/.test(t)) return "rerun"; if (/\brerun\b/.test(t)) return "rerun";
if (/\b(banner|wish|warp|convene|gacha)\b/.test(t)) return "banner"; // Every game names its gacha something else — "Summoning Campaign" is the
// Fate/Grand Order one, and it is the whole of that page's banner vocabulary.
if (/\b(banner|wish|warp|convene|gacha|summon(?:ing)?)\b/.test(t)) {
return "banner";
}
if (/\b(login|log-in|sign-in|check-in|daily bonus)\b/.test(t)) return "login"; if (/\b(login|log-in|sign-in|check-in|daily bonus)\b/.test(t)) return "login";
if (/\b(challenge|trial|onslaught|abyss|tower|test runs?|clash|combat)\b/.test(t)) if (/\b(challenge|trial|onslaught|abyss|tower|test runs?|clash|combat)\b/.test(t))
return "challenge"; return "challenge";
+1
View File
@@ -178,6 +178,7 @@ describe("inferType", () => {
["Gold Clash", "challenge"], ["Gold Clash", "challenge"],
["Seize the Day Login Bonus", "login"], ["Seize the Day Login Bonus", "login"],
["Epitome Invocation Banner", "banner"], ["Epitome Invocation Banner", "banner"],
["Chaldea Boys Collection Summoning Campaign", "banner"],
["Mutual Aid in Bloom: Into the Frostlands", "other"], ["Mutual Aid in Bloom: Into the Frostlands", "other"],
]; ];
test.each(cases)("%s → %s", (title, expected) => { test.each(cases)("%s → %s", (title, expected) => {