From f0e8a8c12fc7b974ea26b658c2a1fdceecce4be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Tue, 27 Oct 2026 09:13:34 +0500 Subject: [PATCH 1/2] feat(reports): add Custom Races upstream destination --- changelog.d/20261027-custom-races-reports.md | 7 +++++++ crates/coa-core/src/report.rs | 16 ++++++++++++---- src/dev/mock.ts | 2 +- src/i18n/locales/de.ts | 1 + src/i18n/locales/en.ts | 1 + src/i18n/locales/es.ts | 1 + src/i18n/locales/fr.ts | 1 + src/i18n/locales/ru.ts | 1 + src/i18n/locales/zh.ts | 1 + src/lib/api.ts | 2 +- src/lib/report.ts | 3 ++- src/screens/ReportPage.tsx | 1 + 12 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 changelog.d/20261027-custom-races-reports.md diff --git a/changelog.d/20261027-custom-races-reports.md b/changelog.d/20261027-custom-races-reports.md new file mode 100644 index 0000000..75de221 --- /dev/null +++ b/changelog.d/20261027-custom-races-reports.md @@ -0,0 +1,7 @@ +--- +area: manager +type: added +audience: admins +title: Send custom race problem reports directly to their maintainer +--- +The report form now includes Custom Races as a separate destination. diff --git a/crates/coa-core/src/report.rs b/crates/coa-core/src/report.rs index e4ac64a..31fdbb8 100644 --- a/crates/coa-core/src/report.rs +++ b/crates/coa-core/src/report.rs @@ -1,5 +1,4 @@ -//! Where a problem report goes. A report about the bots goes to the repository of the bot system in question, anything -//! else to the Manager's own. The repositories come from the module catalog, so there is one list to keep right. +//! Problem-report destinations for the Manager, bot systems and upstream custom races. use std::path::Path; @@ -36,7 +35,7 @@ fn catalog_repo(id: &str) -> Option { .and_then(|e| repo_of(&e.repo)) } -/// The three places, in the order the page lists them. A bot system whose repository is unknown falls back to the Manager's. +/// Report destinations in display order. Custom-race reports go to the upstream asset maintainer. pub fn targets() -> Vec { let mut v = vec![Target { id: "manager", @@ -52,6 +51,11 @@ pub fn targets() -> Vec { }); } } + v.push(Target { + id: "custom-races", + repo: "ilusixn/azerothcore-wotlk-coa".into(), + ours: false, + }); v } @@ -103,7 +107,7 @@ mod tests { use super::*; #[test] - fn the_three_targets_come_from_the_catalog() { + fn report_targets_route_to_their_maintainers() { let t = targets(); let repo = |id: &str| t.iter().find(|x| x.id == id).map(|x| x.repo.clone()); assert_eq!( @@ -116,6 +120,8 @@ mod tests { ); assert_eq!(repo("squid").as_deref(), Some("Zyth45/mod-playerbots")); assert!(t.iter().find(|x| x.id == "squid").is_some_and(|x| !x.ours)); + assert_eq!(repo("custom-races").as_deref(), Some("ilusixn/azerothcore-wotlk-coa")); + assert!(t.iter().find(|x| x.id == "custom-races").is_some_and(|x| !x.ours)); } #[test] @@ -135,6 +141,8 @@ mod tests { #[test] fn only_the_new_issue_pages_of_the_targets_are_allowed() { + assert!(is_new_issue_url("https://github.com/ilusixn/azerothcore-wotlk-coa/issues/new?title=a&body=b")); + assert!(!is_new_issue_url("https://github.com/ilusixn/azerothcore-wotlk-coa/issues/newer")); assert!(is_new_issue_url( "https://github.com/Zyth45/mod-playerbots/issues/new" )); diff --git a/src/dev/mock.ts b/src/dev/mock.ts index 86c037d..2430cff 100644 --- a/src/dev/mock.ts +++ b/src/dev/mock.ts @@ -90,7 +90,7 @@ export {}; } if(cmd==="module_save_settings") { moduleEdits[args.module] = {...moduleEdits[args.module], ...args.changes}; return Object.keys(args.changes); } if(cmd==="report_context") return {manager_version:"0.3.1",windows:"Windows 11 (build 26200)",install_kind:"new",server_version:"0.261001.10",suggested_target:"companions",bots_version:"0.2.1 · 1a2b3c4d"}; - if(cmd==="report_targets") return [{id:"manager",repo:"Corfirean/coa-server-manager",ours:true},{id:"companions",repo:"Corfirean/mod-coa-playerbots",ours:true},{id:"squid",repo:"Zyth45/mod-playerbots",ours:false}]; + if(cmd==="report_targets") return [{id:"manager",repo:"Corfirean/coa-server-manager",ours:true},{id:"companions",repo:"Corfirean/mod-coa-playerbots",ours:true},{id:"squid",repo:"Zyth45/mod-playerbots",ours:false},{id:"custom-races",repo:"ilusixn/azerothcore-wotlk-coa",ours:false}]; if(cmd==="open_link"){(window as any).__lastLink=args.url;return null;} if(cmd==="export_diagnostics") return "C:\\Users\\you\\Desktop\\CoA-Diagnostics-20261001-140000.zip"; if(cmd==="list_crashes") return []; diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts index 15b3049..00a1b74 100644 --- a/src/i18n/locales/de.ts +++ b/src/i18n/locales/de.ts @@ -721,6 +721,7 @@ const de: Partial> = { "rep.target.manager": "CoA Server Manager, der Server oder andere Module", "rep.target.companions": "CoA Companions (Bots und das CoABotUI-Addon)", "rep.target.squid": "SQUID Playerbots", + "rep.target.custom-races": "Custom Races (Völker und Client-Patches)", "rep.targetPublic": "Der Bericht wird öffentlich auf GitHub in {repo} veröffentlicht.", "rep.botsVersion": "Bot-Version", "rep.withDiag": "Diagnose für mich sammeln (empfohlen)", diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index 5818d44..2b59825 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -777,6 +777,7 @@ const en = { "rep.target.manager": "CoA Server Manager, the server or other modules", "rep.target.companions": "CoA Companions (bots and the CoABotUI addon)", "rep.target.squid": "SQUID Playerbots", + "rep.target.custom-races": "Custom Races (races and client patches)", "rep.targetPublic": "The report will be public on GitHub in {repo}.", "rep.botsVersion": "Bot release", "rep.withDiag": "Collect the diagnostics for me (recommended)", diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index 6ba5721..2501bac 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -721,6 +721,7 @@ const es: Partial> = { "rep.target.manager": "CoA Server Manager, el servidor u otros módulos", "rep.target.companions": "CoA Companions (bots y el addon CoABotUI)", "rep.target.squid": "SQUID Playerbots", + "rep.target.custom-races": "Custom Races (razas y parches del cliente)", "rep.targetPublic": "El informe será público en GitHub, en {repo}.", "rep.botsVersion": "Versión de los bots", "rep.withDiag": "Reunir el diagnóstico por mí (recomendado)", diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts index dbe5a51..8c6765f 100644 --- a/src/i18n/locales/fr.ts +++ b/src/i18n/locales/fr.ts @@ -721,6 +721,7 @@ const fr: Partial> = { "rep.target.manager": "CoA Server Manager, le serveur ou d’autres modules", "rep.target.companions": "CoA Companions (bots et addon CoABotUI)", "rep.target.squid": "SQUID Playerbots", + "rep.target.custom-races": "Custom Races (races et correctifs client)", "rep.targetPublic": "Le rapport sera public sur GitHub dans {repo}.", "rep.botsVersion": "Version des bots", "rep.withDiag": "Rassembler le diagnostic pour moi (recommandé)", diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts index 89e0760..cd35309 100644 --- a/src/i18n/locales/ru.ts +++ b/src/i18n/locales/ru.ts @@ -760,6 +760,7 @@ const ru: Partial> = { "rep.target.manager": "CoA Server Manager, сервер или другие модули", "rep.target.companions": "CoA Companions (боты и аддон CoABotUI)", "rep.target.squid": "SQUID Playerbots", + "rep.target.custom-races": "Custom Races (расы и клиентские патчи)", "rep.targetPublic": "Репорт будет публичным на GitHub в {repo}.", "rep.botsVersion": "Версия ботов", "rep.withDiag": "Собрать диагностику за меня (рекомендуется)", diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts index a513de8..ac0c9a1 100644 --- a/src/i18n/locales/zh.ts +++ b/src/i18n/locales/zh.ts @@ -736,6 +736,7 @@ const zh = { "rep.target.manager": "CoA Server Manager、服务器或其他模块", "rep.target.companions": "CoA Companions(机器人与 CoABotUI 插件)", "rep.target.squid": "SQUID Playerbots", + "rep.target.custom-races": "Custom Races(种族与客户端补丁)", "rep.targetPublic": "该报告将公开发布在 GitHub 的 {repo}。", "rep.botsVersion": "机器人版本", "rep.withDiag": "替我收集诊断信息(推荐)", diff --git a/src/lib/api.ts b/src/lib/api.ts index be9488f..0e6c840 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -257,7 +257,7 @@ export interface ReportContext { bots_version: string | null; } -export type ReportTargetId = "manager" | "companions" | "squid"; +export type ReportTargetId = "manager" | "companions" | "squid" | "custom-races"; /** A place a problem report can go: its GitHub repository as `owner/name`. */ export interface ReportTarget { diff --git a/src/lib/report.ts b/src/lib/report.ts index b3669b3..6992b52 100644 --- a/src/lib/report.ts +++ b/src/lib/report.ts @@ -31,7 +31,8 @@ export function reportBody(r: ReportInput): string { `**Windows version:** ${r.windows || "unknown"} `, `**Fresh install or imported server:** ${r.installKind === "new" ? "Fresh install" : "Imported server"} `, ...(r.serverVersion ? [`**Server version:** ${r.serverVersion} `] : []), - ...(r.target !== "manager" ? [`**Bot system:** ${r.target === "squid" ? "SQUID Playerbots" : "CoA Companions"}${r.botsVersion ? ` ${r.botsVersion}` : ""} `] : []), + ...(r.target === "squid" || r.target === "companions" ? [`**Bot system:** ${r.target === "squid" ? "SQUID Playerbots" : "CoA Companions"}${r.botsVersion ? ` ${r.botsVersion}` : ""} `] : []), + ...(r.target === "custom-races" ? ["**Component:** Custom Races "] : []), "", "**What happened?** ", text(r.what, "Describe the problem."), diff --git a/src/screens/ReportPage.tsx b/src/screens/ReportPage.tsx index 07fe1ab..4717ab1 100644 --- a/src/screens/ReportPage.tsx +++ b/src/screens/ReportPage.tsx @@ -12,6 +12,7 @@ const TARGET_LABEL: Record = { manager: "rep.target.manager", companions: "rep.target.companions", squid: "rep.target.squid", + "custom-races": "rep.target.custom-races", }; const FALLBACK: ReportTarget = { id: "manager", repo: "Corfirean/coa-server-manager", ours: true }; From 7888dbc76311cc082a7f6c9d24604dd59e739aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Tue, 27 Oct 2026 10:25:10 +0500 Subject: [PATCH 2/2] feat(reports): add separate Content Scaling destination --- changelog.d/20261027-content-scaling-reports.md | 7 +++++++ crates/coa-core/src/report.rs | 5 ++++- src/dev/mock.ts | 2 +- src/i18n/locales/de.ts | 1 + src/i18n/locales/en.ts | 1 + src/i18n/locales/es.ts | 1 + src/i18n/locales/fr.ts | 1 + src/i18n/locales/ru.ts | 1 + src/i18n/locales/zh.ts | 1 + src/lib/api.ts | 2 +- src/lib/report.ts | 1 + src/screens/ReportPage.tsx | 1 + 12 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 changelog.d/20261027-content-scaling-reports.md diff --git a/changelog.d/20261027-content-scaling-reports.md b/changelog.d/20261027-content-scaling-reports.md new file mode 100644 index 0000000..0daf24d --- /dev/null +++ b/changelog.d/20261027-content-scaling-reports.md @@ -0,0 +1,7 @@ +--- +area: manager +type: added +audience: admins +title: Report Content Scaling problems directly to its repository +--- +The report form now includes a separate Content Scaling destination. diff --git a/crates/coa-core/src/report.rs b/crates/coa-core/src/report.rs index 31fdbb8..4cc1b65 100644 --- a/crates/coa-core/src/report.rs +++ b/crates/coa-core/src/report.rs @@ -42,7 +42,7 @@ pub fn targets() -> Vec { repo: MANAGER_REPO.into(), ours: true, }]; - for (id, module) in [("companions", "companions"), ("squid", "playerbots")] { + for (id, module) in [("companions", "companions"), ("squid", "playerbots"), ("content-scaling", "content-scaling")] { if let Some(repo) = catalog_repo(module) { v.push(Target { id, @@ -122,6 +122,8 @@ mod tests { assert!(t.iter().find(|x| x.id == "squid").is_some_and(|x| !x.ours)); assert_eq!(repo("custom-races").as_deref(), Some("ilusixn/azerothcore-wotlk-coa")); assert!(t.iter().find(|x| x.id == "custom-races").is_some_and(|x| !x.ours)); + assert_eq!(repo("content-scaling").as_deref(), Some("Corfirean/mod-coa-content-scaling")); + assert!(t.iter().find(|x| x.id == "content-scaling").is_some_and(|x| x.ours)); } #[test] @@ -141,6 +143,7 @@ mod tests { #[test] fn only_the_new_issue_pages_of_the_targets_are_allowed() { + assert!(is_new_issue_url("https://github.com/Corfirean/mod-coa-content-scaling/issues/new?title=a&body=b")); assert!(is_new_issue_url("https://github.com/ilusixn/azerothcore-wotlk-coa/issues/new?title=a&body=b")); assert!(!is_new_issue_url("https://github.com/ilusixn/azerothcore-wotlk-coa/issues/newer")); assert!(is_new_issue_url( diff --git a/src/dev/mock.ts b/src/dev/mock.ts index 2430cff..616aed6 100644 --- a/src/dev/mock.ts +++ b/src/dev/mock.ts @@ -90,7 +90,7 @@ export {}; } if(cmd==="module_save_settings") { moduleEdits[args.module] = {...moduleEdits[args.module], ...args.changes}; return Object.keys(args.changes); } if(cmd==="report_context") return {manager_version:"0.3.1",windows:"Windows 11 (build 26200)",install_kind:"new",server_version:"0.261001.10",suggested_target:"companions",bots_version:"0.2.1 · 1a2b3c4d"}; - if(cmd==="report_targets") return [{id:"manager",repo:"Corfirean/coa-server-manager",ours:true},{id:"companions",repo:"Corfirean/mod-coa-playerbots",ours:true},{id:"squid",repo:"Zyth45/mod-playerbots",ours:false},{id:"custom-races",repo:"ilusixn/azerothcore-wotlk-coa",ours:false}]; + if(cmd==="report_targets") return [{id:"manager",repo:"Corfirean/coa-server-manager",ours:true},{id:"companions",repo:"Corfirean/mod-coa-playerbots",ours:true},{id:"squid",repo:"Zyth45/mod-playerbots",ours:false},{id:"custom-races",repo:"ilusixn/azerothcore-wotlk-coa",ours:false},{id:"content-scaling",repo:"Corfirean/mod-coa-content-scaling",ours:true}]; if(cmd==="open_link"){(window as any).__lastLink=args.url;return null;} if(cmd==="export_diagnostics") return "C:\\Users\\you\\Desktop\\CoA-Diagnostics-20261001-140000.zip"; if(cmd==="list_crashes") return []; diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts index 00a1b74..4be4c6e 100644 --- a/src/i18n/locales/de.ts +++ b/src/i18n/locales/de.ts @@ -721,6 +721,7 @@ const de: Partial> = { "rep.target.manager": "CoA Server Manager, der Server oder andere Module", "rep.target.companions": "CoA Companions (Bots und das CoABotUI-Addon)", "rep.target.squid": "SQUID Playerbots", + "rep.target.content-scaling": "Content Scaling (Schwierigkeits- und Stufenskalierung)", "rep.target.custom-races": "Custom Races (Völker und Client-Patches)", "rep.targetPublic": "Der Bericht wird öffentlich auf GitHub in {repo} veröffentlicht.", "rep.botsVersion": "Bot-Version", diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index 2b59825..070e8e1 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -777,6 +777,7 @@ const en = { "rep.target.manager": "CoA Server Manager, the server or other modules", "rep.target.companions": "CoA Companions (bots and the CoABotUI addon)", "rep.target.squid": "SQUID Playerbots", + "rep.target.content-scaling": "Content Scaling (difficulty and level scaling)", "rep.target.custom-races": "Custom Races (races and client patches)", "rep.targetPublic": "The report will be public on GitHub in {repo}.", "rep.botsVersion": "Bot release", diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index 2501bac..2d5bd56 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -721,6 +721,7 @@ const es: Partial> = { "rep.target.manager": "CoA Server Manager, el servidor u otros módulos", "rep.target.companions": "CoA Companions (bots y el addon CoABotUI)", "rep.target.squid": "SQUID Playerbots", + "rep.target.content-scaling": "Content Scaling (ajuste de dificultad y niveles)", "rep.target.custom-races": "Custom Races (razas y parches del cliente)", "rep.targetPublic": "El informe será público en GitHub, en {repo}.", "rep.botsVersion": "Versión de los bots", diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts index 8c6765f..92b997c 100644 --- a/src/i18n/locales/fr.ts +++ b/src/i18n/locales/fr.ts @@ -721,6 +721,7 @@ const fr: Partial> = { "rep.target.manager": "CoA Server Manager, le serveur ou d’autres modules", "rep.target.companions": "CoA Companions (bots et addon CoABotUI)", "rep.target.squid": "SQUID Playerbots", + "rep.target.content-scaling": "Content Scaling (ajustement de la difficulté et des niveaux)", "rep.target.custom-races": "Custom Races (races et correctifs client)", "rep.targetPublic": "Le rapport sera public sur GitHub dans {repo}.", "rep.botsVersion": "Version des bots", diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts index cd35309..32d5647 100644 --- a/src/i18n/locales/ru.ts +++ b/src/i18n/locales/ru.ts @@ -760,6 +760,7 @@ const ru: Partial> = { "rep.target.manager": "CoA Server Manager, сервер или другие модули", "rep.target.companions": "CoA Companions (боты и аддон CoABotUI)", "rep.target.squid": "SQUID Playerbots", + "rep.target.content-scaling": "Content Scaling (масштабирование сложности и уровней)", "rep.target.custom-races": "Custom Races (расы и клиентские патчи)", "rep.targetPublic": "Репорт будет публичным на GitHub в {repo}.", "rep.botsVersion": "Версия ботов", diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts index ac0c9a1..6ba2254 100644 --- a/src/i18n/locales/zh.ts +++ b/src/i18n/locales/zh.ts @@ -736,6 +736,7 @@ const zh = { "rep.target.manager": "CoA Server Manager、服务器或其他模块", "rep.target.companions": "CoA Companions(机器人与 CoABotUI 插件)", "rep.target.squid": "SQUID Playerbots", + "rep.target.content-scaling": "Content Scaling(难度与等级缩放)", "rep.target.custom-races": "Custom Races(种族与客户端补丁)", "rep.targetPublic": "该报告将公开发布在 GitHub 的 {repo}。", "rep.botsVersion": "机器人版本", diff --git a/src/lib/api.ts b/src/lib/api.ts index 0e6c840..68c55e0 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -257,7 +257,7 @@ export interface ReportContext { bots_version: string | null; } -export type ReportTargetId = "manager" | "companions" | "squid" | "custom-races"; +export type ReportTargetId = "manager" | "companions" | "squid" | "custom-races" | "content-scaling"; /** A place a problem report can go: its GitHub repository as `owner/name`. */ export interface ReportTarget { diff --git a/src/lib/report.ts b/src/lib/report.ts index 6992b52..6fd4530 100644 --- a/src/lib/report.ts +++ b/src/lib/report.ts @@ -33,6 +33,7 @@ export function reportBody(r: ReportInput): string { ...(r.serverVersion ? [`**Server version:** ${r.serverVersion} `] : []), ...(r.target === "squid" || r.target === "companions" ? [`**Bot system:** ${r.target === "squid" ? "SQUID Playerbots" : "CoA Companions"}${r.botsVersion ? ` ${r.botsVersion}` : ""} `] : []), ...(r.target === "custom-races" ? ["**Component:** Custom Races "] : []), + ...(r.target === "content-scaling" ? ["**Component:** Content Scaling "] : []), "", "**What happened?** ", text(r.what, "Describe the problem."), diff --git a/src/screens/ReportPage.tsx b/src/screens/ReportPage.tsx index 4717ab1..c08a680 100644 --- a/src/screens/ReportPage.tsx +++ b/src/screens/ReportPage.tsx @@ -13,6 +13,7 @@ const TARGET_LABEL: Record = { companions: "rep.target.companions", squid: "rep.target.squid", "custom-races": "rep.target.custom-races", + "content-scaling": "rep.target.content-scaling", }; const FALLBACK: ReportTarget = { id: "manager", repo: "Corfirean/coa-server-manager", ours: true };