abuse reports in the browser: notice, visitor tips, operator form and queue

A listing page says when the node hides the listing and who flagged it. A
visitor can tip off the operator (proof-of-work, nothing is hidden by it); the
signed-in operator can sign or withdraw a report from the page and works
through the tips at #/mine/reports. e2e covers the real binaries.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
2026-11-18 21:23:13 +01:00
co-authored by Claude Sonnet 5.5
parent 6d55222ac5
commit 0d5903be79
13 changed files with 873 additions and 6 deletions
+25
View File
@@ -175,6 +175,31 @@ export async function getBlocked(): Promise<Blocked[]> {
return (await call("GET", "/api/v1/blocked")) as Blocked[];
}
/** A visitor's tip about a listing, as the operator sees it. */
export interface Tip {
id: number;
author: string;
listing: string;
title?: string;
category: string;
note: string;
created_at: number;
work: number;
}
export async function getTips(): Promise<Tip[]> {
return (await call("GET", "/api/v1/signals")) as Tip[];
}
export async function dismissTips(author: string, listing: string): Promise<void> {
await call("DELETE", `/api/v1/signals/${e(author)}/${e(listing)}`);
}
/** Signs a report as this node's operator and shares it; the answer is the node's new view. */
export async function signReport(author: string, listing: string, category: string, note: string): Promise<void> {
await call("POST", "/api/v1/reports", { listing: { author, id: listing }, category, note });
}
/** The saved address of a listing, or null if none is saved. */
export async function getAddress(listing: string): Promise<Address | null> {
try {