A report may carry a screenshot
The 🐞 form takes a picture beside its words — PNG, JPEG, or WebP, under 2.5 MB, previewed before sending. The socket's message cap is far too small for one, so the picture goes through a plain HTTP door after the report is filed, addressed to the report's id, one per report within the hour, checked by its own first bytes, and kept in feedback-images/ beside the reports with a line on the report saying so. The desk's skill knows where to look. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
d76a18d5e6
commit
48350a3686
@@ -221,6 +221,13 @@ export interface FeedbackReport {
|
||||
happened: string;
|
||||
expected: string;
|
||||
reply?: { at: string; text: string; status: string };
|
||||
/** A screenshot's file name under feedback-images/, when one was sent. */
|
||||
image?: string;
|
||||
}
|
||||
|
||||
/** Where players' screenshots rest, beside the reports. */
|
||||
export function feedbackImageDir(): string {
|
||||
return join(dataRoot(), "feedback-images");
|
||||
}
|
||||
|
||||
export function readFeedback(): FeedbackReport[] {
|
||||
@@ -233,7 +240,9 @@ export function readFeedback(): FeedbackReport[] {
|
||||
try { line = JSON.parse(raw); } catch { continue; }
|
||||
if (typeof line.reportId === "string") {
|
||||
const report = reports.get(line.reportId);
|
||||
if (report) {
|
||||
if (report && typeof line.image === "string") {
|
||||
report.image = line.image;
|
||||
} else if (report) {
|
||||
report.reply = {
|
||||
at: String(line.at ?? ""), text: String(line.text ?? ""), status: String(line.status ?? "resolved"),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user