mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-22 03:25:56 +00:00
Collect all diagnostics in one click and route reports to the right project
- The diagnostic package now also holds crash reports and small crash dumps from Core/Crashes, Windows' own crash records for the server programs (needed for crashes that bypass the server's crash handler), the newest update journals, the bot, supervisor and updater logs, and a view of which server programs run and from where. The folder with the file opens after export. - JSON files in the package keep valid JSON after secrets are removed. - The problem report asks what the problem is about and opens the new-issue page of the Manager, CoA Companions or SQUID Playerbots, preselecting the bot system that is switched on. One button collects diagnostics and opens the report. - Targets come from the module catalog; only their new-issue pages may be opened. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3f700ee8f4
commit
b3c50a7b39
20 files changed
+637
-58
No files matched your search
@@ -234,6 +234,19 @@ export interface ReportContext {
|
||||
windows: string;
|
||||
install_kind: "new" | "imported";
|
||||
server_version: string | null;
|
||||
/** where the form starts: the bot system that is switched on, else the Manager */
|
||||
suggested_target: ReportTargetId;
|
||||
/** the release of the bot system that is on */
|
||||
bots_version: string | null;
|
||||
}
|
||||
|
||||
export type ReportTargetId = "manager" | "companions" | "squid";
|
||||
|
||||
/** A place a problem report can go: its GitHub repository as `owner/name`. */
|
||||
export interface ReportTarget {
|
||||
id: ReportTargetId;
|
||||
repo: string;
|
||||
ours: boolean;
|
||||
}
|
||||
|
||||
export interface InstallRequirements {
|
||||
@@ -419,6 +432,7 @@ export const api = {
|
||||
allSettings: (id: string) => invoke<AllSetting[]>("all_settings", { id }),
|
||||
allSettingsSave: (id: string, changes: Record<string, string>) => invoke<string[]>("all_settings_save", { id, changes }),
|
||||
reportContext: (id: string) => invoke<ReportContext>("report_context", { id }),
|
||||
reportTargets: () => invoke<ReportTarget[]>("report_targets"),
|
||||
listAccounts: (id: string) => invoke<AccountInfo[]>("list_accounts", { id }),
|
||||
accountSetPassword: (id: string, name: string, password: string) => invoke<void>("account_set_password", { id, name, password }),
|
||||
accountSetAccess: (id: string, name: string, level: number) => invoke<void>("account_set_access", { id, name, level }),
|
||||
|
||||
+13
-4
@@ -1,9 +1,14 @@
|
||||
import type { ReportTarget, ReportTargetId } from "./api";
|
||||
|
||||
/** The text of a problem report, always in English so whoever reads it on GitHub can follow it; the person's own words go in as typed. */
|
||||
export interface ReportInput {
|
||||
managerVersion: string;
|
||||
windows: string;
|
||||
installKind: "new" | "imported";
|
||||
serverVersion: string | null;
|
||||
/** where the report goes; a bot repository is told which Manager and bot release it came from */
|
||||
target: ReportTargetId;
|
||||
botsVersion: string | null;
|
||||
what: string;
|
||||
expected: string;
|
||||
steps: string;
|
||||
@@ -11,7 +16,10 @@ export interface ReportInput {
|
||||
diagnostics: boolean;
|
||||
}
|
||||
|
||||
export const NEW_ISSUE_URL = "https://github.com/Corfirean/coa-server-manager/issues/new";
|
||||
/** The "new issue" page of a repository given as `owner/name`. */
|
||||
export function newIssueUrl(repo: string): string {
|
||||
return `https://github.com/${repo}/issues/new`;
|
||||
}
|
||||
const PRIVACY = "> Please remove passwords, tokens, private IP information or other sensitive data before posting logs.";
|
||||
|
||||
export function reportBody(r: ReportInput): string {
|
||||
@@ -23,6 +31,7 @@ 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}` : ""} `] : []),
|
||||
"",
|
||||
"**What happened?** ",
|
||||
text(r.what, "Describe the problem."),
|
||||
@@ -54,9 +63,9 @@ export function encodeQuery(s: string): string {
|
||||
.join("");
|
||||
}
|
||||
|
||||
/** A link that opens GitHub's "new issue" page with the title and text filled in. */
|
||||
export function issueUrl(title: string, body: string): string {
|
||||
return `${NEW_ISSUE_URL}?labels=bug&title=${encodeQuery(title)}&body=${encodeQuery(body)}`;
|
||||
/** A link that opens GitHub's "new issue" page of `target` with the title and text filled in. The bug label is only asked for in our own repositories. */
|
||||
export function issueUrl(target: Pick<ReportTarget, "repo" | "ours">, title: string, body: string): string {
|
||||
return `${newIssueUrl(target.repo)}?${target.ours ? "labels=bug&" : ""}title=${encodeQuery(title)}&body=${encodeQuery(body)}`;
|
||||
}
|
||||
|
||||
/** Links longer than this are not reliable in every browser; the full text is then copied to the clipboard instead. */
|
||||
|
||||
Reference in new issue
Block a user